Package picard.sam.markduplicates.util
Class MarkQueue
- java.lang.Object
-
- picard.sam.markduplicates.util.MarkQueue
-
public class MarkQueue extends Object
This is the mark queue. This stores a current nonDuplicateReadEndsSet of read ends that need to be duplicate marked. It only stores internally the "best" read end for a given possible duplicate location, preferring to perform duplicate marking as read ends come in, rather than wait for all "comparable" read ends to arrive. This reduces the memory footprint of this data structure.
-
-
Constructor Summary
Constructors Constructor Description MarkQueue(htsjdk.samtools.DuplicateScoringStrategy.ScoringStrategy duplicateScoringStrategy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(ReadEndsForMateCigar other, htsjdk.samtools.util.SamRecordTrackingBuffer outputBuffer, DuplicationMetrics metrics)
Add a record to the mark queue.Set<ReadEnds>
getLocations(ReadEndsForMateCigar current)
Returns the nonDuplicateReadEndsSet of read ends that should be considered for tracking optical duplicates.int
getNumDuplicates()
Returns the number of duplicates detectedint
getToMarkQueueMinimumDistance()
Returns the minimum genomic distance such that we can be assured that all duplicates have been considered.boolean
isEmpty()
ReadEndsForMateCigar
peek()
Returns the first element in this queueReadEndsForMateCigar
poll(htsjdk.samtools.util.SamRecordTrackingBuffer outputBuffer, htsjdk.samtools.SAMFileHeader header, OpticalDuplicateFinder opticalDuplicateFinder, LibraryIdGenerator libraryIdGenerator)
The poll method will return the read end that is *not* the duplicate of all comparable read ends that have been seen.void
setToMarkQueueMinimumDistance(int toMarkQueueMinimumDistance)
Sets the minimum genomic distance such that we can be assured that all duplicates have been considered.boolean
shouldBeInLocations(ReadEndsForMateCigar current)
Returns true if we should track this for optical duplicate detection, false otherwiseint
size()
The number of records currently in this queue.
-
-
-
Method Detail
-
getNumDuplicates
public int getNumDuplicates()
Returns the number of duplicates detected
-
size
public int size()
The number of records currently in this queue. *
-
isEmpty
public boolean isEmpty()
-
setToMarkQueueMinimumDistance
public void setToMarkQueueMinimumDistance(int toMarkQueueMinimumDistance)
Sets the minimum genomic distance such that we can be assured that all duplicates have been considered.
-
getToMarkQueueMinimumDistance
public int getToMarkQueueMinimumDistance()
Returns the minimum genomic distance such that we can be assured that all duplicates have been considered.
-
shouldBeInLocations
public boolean shouldBeInLocations(ReadEndsForMateCigar current)
Returns true if we should track this for optical duplicate detection, false otherwise
-
getLocations
public Set<ReadEnds> getLocations(ReadEndsForMateCigar current)
Returns the nonDuplicateReadEndsSet of read ends that should be considered for tracking optical duplicates.
-
peek
public ReadEndsForMateCigar peek()
Returns the first element in this queue
-
poll
public ReadEndsForMateCigar poll(htsjdk.samtools.util.SamRecordTrackingBuffer outputBuffer, htsjdk.samtools.SAMFileHeader header, OpticalDuplicateFinder opticalDuplicateFinder, LibraryIdGenerator libraryIdGenerator)
The poll method will return the read end that is *not* the duplicate of all comparable read ends that have been seen. All comparable read ends and the returned read end will have their seen duplicate flag nonDuplicateReadEndsSet. We use the minimum genomic distance to determine when all the comparable reads have been examined.
-
add
public void add(ReadEndsForMateCigar other, htsjdk.samtools.util.SamRecordTrackingBuffer outputBuffer, DuplicationMetrics metrics)
Add a record to the mark queue.
-
-