public class SRALazyRecord extends SAMRecord
SAMRecord.SAMTagAndValueMAX_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 |
|---|---|
|
SRALazyRecord(SAMFileHeader header,
SRAAccession accession,
ngs.ReadCollection run,
ngs.AlignmentIterator alignmentIterator,
java.lang.String readId,
java.lang.String alignmentId) |
|
SRALazyRecord(SAMFileHeader header,
SRAAccession accession,
ngs.ReadCollection run,
ngs.ReadIterator unalignmentIterator,
java.lang.String readId,
int unalignedReadFragmentIndex) |
protected |
SRALazyRecord(SAMFileHeader header,
SRAAccession accession,
java.lang.String readId,
int unalignedReadFragmentIndex) |
protected |
SRALazyRecord(SAMFileHeader header,
SRAAccession accession,
java.lang.String readId,
java.lang.String alignmentId) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearAttributes()
Removes all attributes.
|
java.lang.Object |
clone()
Performs a deep copy of the SAMRecord and detaches a copy from NGS iterator
|
void |
detachFromIterator()
Is being called when original NGS iterator is being moved to the next object.
|
boolean |
equals(java.lang.Object o)
For records equality, we should only compare read id, reference and position on the reference.
|
java.lang.String |
format() |
int |
getAlignmentStart() |
java.lang.Object |
getAttribute(short tag) |
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.
|
java.lang.String |
getCigarString() |
boolean |
getFirstOfPairFlag()
the read is the first read in a pair.
|
int |
getFlags()
It is preferable to use the get*Flag() methods that handle the flag word symbolically.
|
int |
getInferredInsertSize() |
int |
getMappingQuality() |
int |
getMateAlignmentStart() |
boolean |
getMateNegativeStrandFlag()
strand of the mate (false for forward; true for reverse strand).
|
java.lang.Integer |
getMateReferenceIndex()
Returns the mate reference index for this record.
|
java.lang.String |
getMateReferenceName() |
boolean |
getMateUnmappedFlag()
the mate is unmapped.
|
boolean |
getProperPairFlag()
the read is mapped in a proper pair (depends on the protocol, normally inferred during alignment).
|
byte[] |
getReadBases()
Do not modify the value returned by this method.
|
boolean |
getReadNegativeStrandFlag()
strand of the query (false for forward; true for reverse strand).
|
boolean |
getReadPairedFlag()
the read is paired in sequencing, no matter whether it is mapped in a pair.
|
java.lang.Integer |
getReferenceIndex()
Returns the reference index for this record.
|
java.lang.String |
getReferenceName() |
boolean |
getSecondOfPairFlag()
the read is the second read in a pair.
|
int |
hashCode()
The same approach as with 'equals' method.
|
boolean |
isSecondaryAlignment() |
boolean |
isUnsignedArrayAttribute(java.lang.String tag) |
java.util.List<SAMValidationError> |
isValid(boolean firstOnly)
Perform various validations of SAMRecord.
|
void |
setAlignmentStart(int value) |
void |
setAttribute(short tag,
java.lang.Object value) |
protected void |
setAttribute(short tag,
java.lang.Object value,
boolean isUnsignedArray) |
protected void |
setAttributes(SAMBinaryTagAndValue attributes)
Replace any existing attributes with the given linked item.
|
void |
setBaseQualities(byte[] value) |
void |
setCigar(Cigar value)
For setting the Cigar string when changed.
|
void |
setCigarString(java.lang.String value) |
void |
setFirstOfPairFlag(boolean flag)
the read is the first read in a pair.
|
void |
setFlags(int value) |
void |
setInferredInsertSize(int value) |
void |
setMappingQuality(int value) |
void |
setMateAlignmentStart(int value) |
void |
setMateNegativeStrandFlag(boolean flag)
strand of the mate (false for forward; true for reverse strand).
|
void |
setMateReferenceIndex(int value)
Updates the mate reference index.
|
void |
setMateReferenceName(java.lang.String value)
Sets the mate reference name for this record.
|
void |
setMateUnmappedFlag(boolean flag)
the mate is unmapped.
|
void |
setProperPairFlag(boolean flag)
the read is mapped in a proper pair (depends on the protocol, normally inferred during alignment).
|
void |
setReadBases(byte[] value) |
void |
setReadNegativeStrandFlag(boolean flag)
strand of the query (false for forward; true for reverse strand).
|
void |
setReadPairedFlag(boolean flag)
the read is paired in sequencing, no matter whether it is mapped in a pair.
|
void |
setReferenceIndex(int value)
Updates the reference index.
|
void |
setReferenceName(java.lang.String value)
Sets the reference name for this record.
|
void |
setSecondaryAlignment(boolean flag)
set whether this alignment is secondary (an alternative alignment of the read).
|
void |
setSecondOfPairFlag(boolean flag)
the read is the second read in a pair.
|
computeIndexingBinIfAbsent, deepCopy, eagerDecode, getAlignmentBlocks, getAlignmentEnd, getAttribute, getAttributes, getAttributesBinarySize, getBaseQualityString, getByteArrayAttribute, getByteAttribute, getCharacterAttribute, getCigarLength, getContig, getDuplicateReadFlag, getEnd, getFileSource, getFloatArrayAttribute, getFloatAttribute, getHeader, getIntegerAttribute, getNotPrimaryAlignmentFlag, getOriginalBaseQualities, getPairedReadName, getReadFailsVendorQualityCheckFlag, getReadGroup, getReadLength, getReadName, getReadNameLength, getReadPositionAtReferencePosition, getReadPositionAtReferencePosition, getReadPositionAtReferencePosition, getReadString, getReadUnmappedFlag, getReferencePositionAtReadPosition, getReferencePositionAtReadPosition, getSAMFlags, getSAMString, getShortAttribute, getSignedByteArrayAttribute, getSignedIntArrayAttribute, getSignedShortArrayAttribute, getStart, getStringAttribute, getSupplementaryAlignmentFlag, getTransientAttribute, getUnclippedEnd, getUnclippedStart, getUnsignedByteArrayAttribute, getUnsignedIntArrayAttribute, getUnsignedIntegerAttribute, getUnsignedIntegerAttribute, getUnsignedShortArrayAttribute, getValidationStringency, getVariableBinaryRepresentation, hasAttribute, initializeCigar, isAllowedAttributeValue, isSecondaryOrSupplementary, isValid, removeTransientAttribute, resolveIndexFromName, resolveNameFromIndex, reverseComplement, reverseComplement, reverseComplement, setAttribute, setBaseQualityString, setDuplicateReadFlag, setFileSource, setHeader, setHeaderStrict, setNotPrimaryAlignmentFlag, setOriginalBaseQualities, setReadFailsVendorQualityCheckFlag, setReadName, setReadString, setReadUmappedFlag, setReadUnmappedFlag, setSupplementaryAlignmentFlag, setTransientAttribute, setUnsignedArrayAttribute, setValidationStringency, toString, validateCigarfinalize, getClass, notify, notifyAll, wait, wait, waitcontains, contigsMatch, getLengthOnReference, overlaps, withinDistanceOfpublic SRALazyRecord(SAMFileHeader header, SRAAccession accession, ngs.ReadCollection run, ngs.AlignmentIterator alignmentIterator, java.lang.String readId, java.lang.String alignmentId)
public SRALazyRecord(SAMFileHeader header, SRAAccession accession, ngs.ReadCollection run, ngs.ReadIterator unalignmentIterator, java.lang.String readId, int unalignedReadFragmentIndex)
protected SRALazyRecord(SAMFileHeader header, SRAAccession accession, java.lang.String readId, java.lang.String alignmentId)
protected SRALazyRecord(SAMFileHeader header, SRAAccession accession, java.lang.String readId, int unalignedReadFragmentIndex)
public void detachFromIterator()
public int getAlignmentStart()
getAlignmentStart in class SAMRecordpublic void setAlignmentStart(int value)
setAlignmentStart in class SAMRecordvalue - 1-based inclusive leftmost position of the sequence remaining after clipping or 0
if there is no position, e.g. for unmapped read.public int getMappingQuality()
getMappingQuality in class SAMRecordpublic void setMappingQuality(int value)
setMappingQuality in class SAMRecordpublic java.lang.String getReferenceName()
getReferenceName in class SAMRecordpublic void setReferenceName(java.lang.String value)
SAMRecordsetReferenceName in class SAMRecordvalue - - must not be nullpublic java.lang.Integer getReferenceIndex()
SAMRecordgetReferenceIndex in class SAMRecordpublic void setReferenceIndex(int value)
SAMRecordsetReferenceIndex in class SAMRecordvalue - Must either equal NO_ALIGNMENT_REFERENCE_INDEX (-1) indicating no reference, or the
record must have a SAMFileHeader and the index must exist in the associated sequence
dictionary.public java.lang.String getCigarString()
getCigarString in class SAMRecordpublic void setCigarString(java.lang.String value)
setCigarString in class SAMRecordpublic Cigar getCigar()
SAMRecordpublic void setCigar(Cigar value)
SAMRecordSAMRecord.initializeCigar(htsjdk.samtools.Cigar)public byte[] getReadBases()
SAMRecordgetReadBases in class SAMRecordpublic void setReadBases(byte[] value)
setReadBases in class SAMRecordpublic byte[] getBaseQualities()
SAMRecordgetBaseQualities in class SAMRecordpublic void setBaseQualities(byte[] value)
setBaseQualities in class SAMRecordpublic int getMateAlignmentStart()
getMateAlignmentStart in class SAMRecordpublic void setMateAlignmentStart(int value)
setMateAlignmentStart in class SAMRecordpublic java.lang.String getMateReferenceName()
getMateReferenceName in class SAMRecordpublic void setMateReferenceName(java.lang.String value)
SAMRecordsetMateReferenceName in class SAMRecordvalue - - must not be nullpublic java.lang.Integer getMateReferenceIndex()
SAMRecordgetMateReferenceIndex in class SAMRecordpublic void setMateReferenceIndex(int value)
SAMRecordsetMateReferenceIndex in class SAMRecordvalue - Must either equal NO_ALIGNMENT_REFERENCE_INDEX (-1) indicating no reference, or the
record must have a SAMFileHeader and the index must exist in the associated sequence
dictionary.public int getInferredInsertSize()
getInferredInsertSize in class SAMRecordpublic void setInferredInsertSize(int value)
setInferredInsertSize in class SAMRecordpublic int getFlags()
SAMRecordpublic boolean getReadNegativeStrandFlag()
SAMRecordgetReadNegativeStrandFlag in class SAMRecordpublic void setReadNegativeStrandFlag(boolean flag)
SAMRecordsetReadNegativeStrandFlag in class SAMRecordpublic boolean getReadPairedFlag()
SAMRecordgetReadPairedFlag in class SAMRecordpublic void setReadPairedFlag(boolean flag)
SAMRecordsetReadPairedFlag in class SAMRecordpublic boolean getProperPairFlag()
SAMRecordgetProperPairFlag in class SAMRecordpublic void setProperPairFlag(boolean flag)
SAMRecordsetProperPairFlag in class SAMRecordpublic boolean isSecondaryAlignment()
isSecondaryAlignment in class SAMRecordpublic void setSecondaryAlignment(boolean flag)
SAMRecordsetSecondaryAlignment in class SAMRecordpublic boolean getMateNegativeStrandFlag()
SAMRecordgetMateNegativeStrandFlag in class SAMRecordpublic void setMateNegativeStrandFlag(boolean flag)
SAMRecordsetMateNegativeStrandFlag in class SAMRecordpublic boolean getMateUnmappedFlag()
SAMRecordgetMateUnmappedFlag in class SAMRecordpublic void setMateUnmappedFlag(boolean flag)
SAMRecordsetMateUnmappedFlag in class SAMRecordpublic boolean getFirstOfPairFlag()
SAMRecordgetFirstOfPairFlag in class SAMRecordpublic void setFirstOfPairFlag(boolean flag)
SAMRecordsetFirstOfPairFlag in class SAMRecordpublic boolean getSecondOfPairFlag()
SAMRecordgetSecondOfPairFlag in class SAMRecordpublic void setSecondOfPairFlag(boolean flag)
SAMRecordsetSecondOfPairFlag 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)public void setAttribute(short tag,
java.lang.Object value)
setAttribute in class SAMRecordtag - Binary representation of a 2-char String tag as created by SAMTagUtil.SAMRecord.setAttribute(java.lang.String, java.lang.Object)protected void setAttribute(short tag,
java.lang.Object value,
boolean isUnsignedArray)
setAttribute in class SAMRecordpublic void clearAttributes()
SAMRecordclearAttributes in class SAMRecordprotected void setAttributes(SAMBinaryTagAndValue attributes)
SAMRecordsetAttributes in class SAMRecordprotected SAMBinaryTagAndValue getBinaryAttributes()
getBinaryAttributes in class SAMRecordpublic boolean isUnsignedArrayAttribute(java.lang.String tag)
isUnsignedArrayAttribute in class SAMRecordpublic boolean equals(java.lang.Object o)
public int hashCode()
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
public java.lang.String format()
public java.util.List<SAMValidationError> isValid(boolean firstOnly)
SAMRecord