Package htsjdk.samtools.util
Class AbstractRecordAndOffset
- java.lang.Object
-
- htsjdk.samtools.util.AbstractRecordAndOffset
-
- Direct Known Subclasses:
EdgingRecordAndOffset,SamLocusIterator.RecordAndOffset
public class AbstractRecordAndOffset extends Object
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 forSamLocusIterator.RecordAndOffsetimplementation or one alignment block ofSAMRecordforTypedRecordAndOffsetimplementation.
-
-
Constructor Summary
Constructors Constructor Description AbstractRecordAndOffset(SAMRecord record, int offset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getBaseQualities()bytegetBaseQuality()intgetLength()intgetOffset()bytegetReadBase()StringgetReadName()SAMRecordgetRecord()protected voidvalidateOffset(int offset, byte[] array)
-
-
-
Field Detail
-
record
protected final SAMRecord record
A SAMRecord aligned to reference position
-
offset
protected final int offset
Zero-based offset in the read corresponding to the current position in AbstractLocusInfo
-
-
Constructor Detail
-
AbstractRecordAndOffset
public AbstractRecordAndOffset(SAMRecord record, int offset)
- Parameters:
record- inner SAMRecordoffset- from the start of the read
-
-
Method Detail
-
getOffset
public int getOffset()
- Returns:
- offset of aligned read base from the start of the read.
-
getRecord
public SAMRecord getRecord()
- Returns:
- inner
SAMRecordobject.
-
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
public String 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)
-
-