public class BAMRecord extends SAMRecord
SAMRecord.SAMTagAndValue| Modifier and Type | Field and Description |
|---|---|
static short |
CIGAR_SIZE_MULTIPLIER
Constant for converting between the number of operators in a Cigar and the length
of the int[] array needed to represent it in the BAM format
|
static int |
MAX_CIGAR_ELEMENT_LENGTH |
static int |
MAX_CIGAR_OPERATORS
Maximal number of cigar operators that can be represented normally in the cigar part of the bam record.
|
MAX_INSERT_SIZE, mMateReferenceIndex, mReferenceIndex, NO_ALIGNMENT_CIGAR, NO_ALIGNMENT_REFERENCE_INDEX, NO_ALIGNMENT_REFERENCE_NAME, NO_ALIGNMENT_START, NO_MAPPING_QUALITY, NULL_QUALS, NULL_QUALS_STRING, NULL_SEQUENCE, NULL_SEQUENCE_STRING, serialVersionUID, TAGS_TO_REVERSE, TAGS_TO_REVERSE_COMPLEMENT, UNKNOWN_MAPPING_QUALITY| Modifier | Constructor and Description |
|---|---|
protected |
BAMRecord(SAMFileHeader header,
int referenceID,
int coordinate,
short readNameLength,
short mappingQuality,
int indexingBin,
int cigarLen,
int flags,
int readLen,
int mateReferenceID,
int mateCoordinate,
int insertSize,
byte[] restOfData)
Create a new BAM Record.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearAttributes()
Removes all attributes.
|
protected void |
eagerDecode()
Force all the lazily-initialized attributes to be decoded.
|
java.lang.Object |
getAttribute(short tag) |
int |
getAttributesBinarySize()
Depending on the concrete implementation, the binary file size of attributes may be known without
computing them all.
|
byte[] |
getBaseQualities()
Do not modify the value returned by this method.
|
protected SAMBinaryTagAndValue |
getBinaryAttributes() |
Cigar |
getCigar()
Do not modify the value returned by this method.
|
int |
getCigarLength()
Avoids decoding CIGAR in order to get length.
|
byte[] |
getReadBases()
Do not modify the value returned by this method.
|
int |
getReadLength()
Avoids decoding binary block to get read length.
|
java.lang.String |
getReadName() |
int |
getReadNameLength()
Avoids decoding read name to get read name length.
|
byte[] |
getVariableBinaryRepresentation()
If this record has a valid binary representation of the variable-length portion of a binary record stored,
return that byte array, otherwise return null.
|
protected void |
setAttribute(short tag,
java.lang.Object value,
boolean isUnsignedArray) |
void |
setBaseQualities(byte[] value) |
void |
setCigar(Cigar cigar)
For setting the Cigar string when changed.
|
void |
setCigarString(java.lang.String value) |
void |
setReadBases(byte[] value) |
void |
setReadName(java.lang.String value) |
clone, computeIndexingBinIfAbsent, deepCopy, equals, format, getAlignmentBlocks, getAlignmentEnd, getAlignmentStart, getAttribute, getAttributes, getBaseQualityString, getByteArrayAttribute, getByteAttribute, getCharacterAttribute, getCigarString, getContig, getDuplicateReadFlag, getEnd, getFileSource, getFirstOfPairFlag, getFlags, getFloatArrayAttribute, getFloatAttribute, getHeader, getInferredInsertSize, getIntegerAttribute, getMappingQuality, getMateAlignmentStart, getMateNegativeStrandFlag, getMateReferenceIndex, getMateReferenceName, getMateUnmappedFlag, getNotPrimaryAlignmentFlag, getOriginalBaseQualities, getPairedReadName, getProperPairFlag, getReadFailsVendorQualityCheckFlag, getReadGroup, getReadNegativeStrandFlag, getReadPairedFlag, getReadPositionAtReferencePosition, getReadPositionAtReferencePosition, getReadPositionAtReferencePosition, getReadString, getReadUnmappedFlag, getReferenceIndex, getReferenceName, getReferencePositionAtReadPosition, getReferencePositionAtReadPosition, getSAMFlags, getSAMString, getSecondOfPairFlag, getShortAttribute, getSignedByteArrayAttribute, getSignedIntArrayAttribute, getSignedShortArrayAttribute, getStart, getStringAttribute, getSupplementaryAlignmentFlag, getTransientAttribute, getUnclippedEnd, getUnclippedStart, getUnsignedByteArrayAttribute, getUnsignedIntArrayAttribute, getUnsignedIntegerAttribute, getUnsignedIntegerAttribute, getUnsignedShortArrayAttribute, getValidationStringency, hasAttribute, hashCode, initializeCigar, isAllowedAttributeValue, isSecondaryAlignment, isSecondaryOrSupplementary, isUnsignedArrayAttribute, isValid, isValid, removeTransientAttribute, resolveIndexFromName, resolveNameFromIndex, reverseComplement, reverseComplement, reverseComplement, setAlignmentStart, setAttribute, setAttribute, setAttributes, setBaseQualityString, setDuplicateReadFlag, setFileSource, setFirstOfPairFlag, setFlags, setHeader, setHeaderStrict, setInferredInsertSize, setMappingQuality, setMateAlignmentStart, setMateNegativeStrandFlag, setMateReferenceIndex, setMateReferenceName, setMateUnmappedFlag, setNotPrimaryAlignmentFlag, setOriginalBaseQualities, setProperPairFlag, setReadFailsVendorQualityCheckFlag, setReadNegativeStrandFlag, setReadPairedFlag, setReadString, setReadUmappedFlag, setReadUnmappedFlag, setReferenceIndex, setReferenceName, setSecondaryAlignment, setSecondOfPairFlag, setSupplementaryAlignmentFlag, setTransientAttribute, setUnsignedArrayAttribute, setValidationStringency, toString, validateCigarfinalize, getClass, notify, notifyAll, wait, wait, waitcontains, contigsMatch, getLengthOnReference, overlaps, withinDistanceOfpublic static final short CIGAR_SIZE_MULTIPLIER
public static final int MAX_CIGAR_OPERATORS
When a BAM record is decoded, the sentinel cigar informs of the existance of the CG tag, which is decoded and removed. The sentinel value is then replaced with the actual cigar (in memory).
public static final int MAX_CIGAR_ELEMENT_LENGTH
protected BAMRecord(SAMFileHeader header, int referenceID, int coordinate, short readNameLength, short mappingQuality, int indexingBin, int cigarLen, int flags, int readLen, int mateReferenceID, int mateCoordinate, int insertSize, byte[] restOfData)
protected void eagerDecode()
eagerDecode in class SAMRecordpublic byte[] getVariableBinaryRepresentation()
getVariableBinaryRepresentation in class SAMRecordpublic int getAttributesBinarySize()
getAttributesBinarySize in class SAMRecordpublic void setReadName(java.lang.String value)
setReadName in class SAMRecordpublic void setCigar(Cigar cigar)
SAMRecordSAMRecord.initializeCigar(htsjdk.samtools.Cigar)public void setCigarString(java.lang.String value)
setCigarString in class SAMRecordpublic void setReadBases(byte[] value)
setReadBases in class SAMRecordpublic void setBaseQualities(byte[] value)
setBaseQualities in class SAMRecordprotected void setAttribute(short tag,
java.lang.Object value,
boolean isUnsignedArray)
setAttribute in class SAMRecordpublic void clearAttributes()
clearAttributes in class SAMRecordpublic int getReadLength()
getReadLength in class SAMRecordpublic java.lang.String getReadName()
getReadName in class SAMRecordpublic int getReadNameLength()
getReadNameLength in class SAMRecordpublic Cigar getCigar()
SAMRecordpublic int getCigarLength()
getCigarLength in class SAMRecordpublic byte[] getReadBases()
SAMRecordgetReadBases in class SAMRecordpublic byte[] getBaseQualities()
SAMRecordgetBaseQualities in class SAMRecordpublic java.lang.Object getAttribute(short tag)
getAttribute in class SAMRecordtag - Binary representation of a 2-char String tag as created by SAMTagUtil.SAMRecord.getAttribute(java.lang.String)protected SAMBinaryTagAndValue getBinaryAttributes()
getBinaryAttributes in class SAMRecord