Package htsjdk.samtools.util
Class AbstractRecordAndOffset
java.lang.Object
htsjdk.samtools.util.AbstractRecordAndOffset
- Direct Known Subclasses:
EdgingRecordAndOffset,SamLocusIterator.RecordAndOffset
Holds a SAMRecord plus the zero-based offset into that SAMRecord's bases and quality scores that corresponds
to the base and quality at the genomic position described the containing AbstractLocusInfo. One object represents
one base for
SamLocusIterator.RecordAndOffset implementation or one alignment block of
SAMRecord for TypedRecordAndOffset implementation.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumClassifies whether the given event is a match, insertion, or deletion. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AbstractRecordAndOffset.AlignmentTypeTheAbstractRecordAndOffset.AlignmentTypeof this object, which classifies whether the given event is a match, insertion, or deletion when queried from aSamLocusIterator.protected final intZero-based offset in the read corresponding to the current position in AbstractLocusInfoprotected final SAMRecordA SAMRecord aligned to reference position -
Constructor Summary
ConstructorsConstructorDescriptionAbstractRecordAndOffset(SAMRecord record, int offset) AbstractRecordAndOffset(SAMRecord record, int offset, AbstractRecordAndOffset.AlignmentType alignmentType) -
Method Summary
Modifier and TypeMethodDescriptionTheAbstractRecordAndOffset.AlignmentTypeof this object, which classifies whether the given event is a match, insertion, or deletion when queried from aSamLocusIterator.byte[]byteintintbyteprotected voidvalidateOffset(int offset, byte[] array)
-
Field Details
-
record
A SAMRecord aligned to reference position -
offset
protected final int offsetZero-based offset in the read corresponding to the current position in AbstractLocusInfo -
alignmentType
TheAbstractRecordAndOffset.AlignmentTypeof this object, which classifies whether the given event is a match, insertion, or deletion when queried from aSamLocusIterator.
-
-
Constructor Details
-
AbstractRecordAndOffset
- Parameters:
record- inner SAMRecordoffset- from the start of the read
-
AbstractRecordAndOffset
public AbstractRecordAndOffset(SAMRecord record, int offset, AbstractRecordAndOffset.AlignmentType alignmentType) - Parameters:
record- inner SAMRecordoffset- from the start of the readalignmentType- TheAbstractRecordAndOffset.AlignmentTypeof this object, which is used when queried in aSamLocusIterator.
-
-
Method Details
-
getOffset
public int getOffset()- Returns:
- offset of aligned read base from the start of the read.
-
getRecord
- Returns:
- inner
SAMRecordobject.
-
getAlignmentType
TheAbstractRecordAndOffset.AlignmentTypeof this object, which classifies whether the given event is a match, insertion, or deletion when queried from aSamLocusIterator. -
getReadBase
public byte getReadBase()- Returns:
- the read base according to
offset.
-
getLength
public int getLength()- Returns:
- the length of alignment block represented by the object.
-
getReadName
- Returns:
- read name of inner SAMRecord.
-
getBaseQualities
public byte[] getBaseQualities()- Returns:
- array of base qualities of inner SAMRecord.
-
getBaseQuality
public byte getBaseQuality()- Returns:
- the base quality according to
offset.
-
validateOffset
protected void validateOffset(int offset, byte[] array)
-