Package htsjdk.samtools.util
Class SamLocusIterator.LocusInfo
- java.lang.Object
-
- htsjdk.samtools.util.AbstractLocusInfo<SamLocusIterator.RecordAndOffset>
-
- htsjdk.samtools.util.SamLocusIterator.LocusInfo
-
- Enclosing class:
- SamLocusIterator
public static final class SamLocusIterator.LocusInfo extends AbstractLocusInfo<SamLocusIterator.RecordAndOffset>
The unit of iteration. Holds information about the locus (the SAMSequenceRecord and 1-based position on the reference), plus List of ReadAndOffset objects, one for each read that overlaps the locus; two more List_s_ of ReadAndOffset objects include reads that overlap the locus with insertions and deletions respectively
-
-
Constructor Summary
Constructors Constructor Description LocusInfo(SAMSequenceRecord referenceSequence, int position)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDeleted(SAMRecord read, int previousPosition)
Accumulate info for one read with a deletionvoid
addInserted(SAMRecord read, int firstPosition)
Accumulate info for one read with an insertion.List<SamLocusIterator.RecordAndOffset>
getDeletedInRecord()
List<SamLocusIterator.RecordAndOffset>
getInsertedInRecord()
boolean
isEmpty()
int
size()
-
Methods inherited from class htsjdk.samtools.util.AbstractLocusInfo
add, getContig, getEnd, getPosition, getRecordAndOffsets, getRecordAndPositions, getSequenceIndex, getSequenceLength, getSequenceName, getStart, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface htsjdk.samtools.util.Locatable
contains, contigsMatch, getLengthOnReference, overlaps, withinDistanceOf
-
-
-
-
Constructor Detail
-
LocusInfo
public LocusInfo(SAMSequenceRecord referenceSequence, int position)
- Parameters:
referenceSequence
- reference sequence at which the reads are alignedposition
- position in the sequence at which the reads are aligned
-
-
Method Detail
-
addDeleted
public void addDeleted(SAMRecord read, int previousPosition)
Accumulate info for one read with a deletion
-
addInserted
public void addInserted(SAMRecord read, int firstPosition)
Accumulate info for one read with an insertion. For this locus, the reads in the insertion are included also in recordAndOffsets
-
getDeletedInRecord
public List<SamLocusIterator.RecordAndOffset> getDeletedInRecord()
-
getInsertedInRecord
public List<SamLocusIterator.RecordAndOffset> getInsertedInRecord()
-
size
public int size()
- Overrides:
size
in classAbstractLocusInfo<SamLocusIterator.RecordAndOffset>
- Returns:
- the number of records overlapping the position, with deletions included if they are being tracked.
-
isEmpty
public boolean isEmpty()
- Overrides:
isEmpty
in classAbstractLocusInfo<SamLocusIterator.RecordAndOffset>
- Returns:
true
if all the RecordAndOffset lists are empty;false
if at least one have records
-
-