Package picard.sam.markduplicates.util
Class MarkQueue
java.lang.Object
picard.sam.markduplicates.util.MarkQueue
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
ConstructorsConstructorDescriptionMarkQueue
(htsjdk.samtools.DuplicateScoringStrategy.ScoringStrategy duplicateScoringStrategy) -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(ReadEndsForMateCigar other, htsjdk.samtools.util.SamRecordTrackingBuffer outputBuffer, DuplicationMetrics metrics) Add a record to the mark queue.getLocations
(ReadEndsForMateCigar current) Returns the nonDuplicateReadEndsSet of read ends that should be considered for tracking optical duplicates.int
Returns the number of duplicates detectedint
Returns the minimum genomic distance such that we can be assured that all duplicates have been considered.boolean
isEmpty()
peek()
Returns the first element in this queuepoll
(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.
-
Constructor Details
-
MarkQueue
public MarkQueue(htsjdk.samtools.DuplicateScoringStrategy.ScoringStrategy duplicateScoringStrategy)
-
-
Method Details
-
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
Returns true if we should track this for optical duplicate detection, false otherwise -
getLocations
Returns the nonDuplicateReadEndsSet of read ends that should be considered for tracking optical duplicates. -
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.
-