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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.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 Details
-
LocusInfo
- Parameters:
referenceSequence
- reference sequence at which the reads are alignedposition
- position in the sequence at which the reads are aligned
-
-
Method Details
-
addDeleted
Accumulate info for one read with a deletion -
addInserted
Accumulate info for one read with an insertion. For this locus, the reads in the insertion are included also in recordAndOffsets -
getDeletedInRecord
-
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
-