Package htsjdk.samtools
Class DuplicateSetIterator
java.lang.Object
htsjdk.samtools.DuplicateSetIterator
- All Implemented Interfaces:
CloseableIterator<DuplicateSet>
,Closeable
,AutoCloseable
,Iterator<DuplicateSet>
An iterator of sets of duplicates. Duplicates are defined currently by the ordering in
SAMRecordDuplicateComparator.
If the input records are not pre-sorted according to the duplicate ordering, the records
will be sorted on-the-fly. This may require extra memory or disk to buffer records, and
also computational time to perform the sorting.
-
Constructor Summary
ConstructorDescriptionDuplicateSetIterator
(CloseableIterator<SAMRecord> iterator, SAMFileHeader header) DuplicateSetIterator
(CloseableIterator<SAMRecord> iterator, SAMFileHeader header, boolean preSorted) DuplicateSetIterator
(CloseableIterator<SAMRecord> iterator, SAMFileHeader header, boolean preSorted, SAMRecordDuplicateComparator comparator) DuplicateSetIterator
(CloseableIterator<SAMRecord> iterator, SAMFileHeader header, boolean preSorted, SAMRecordDuplicateComparator comparator, Log log) Allows the user of this iterator to skip the sorting of the input if the input is already sorted. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Should be implemented to close/release any underlying resources.boolean
hasNext()
next()
void
remove()
void
setScoringStrategy
(DuplicateScoringStrategy.ScoringStrategy scoringStrategy) Deprecated.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface htsjdk.samtools.util.CloseableIterator
stream, toList
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
DuplicateSetIterator
-
DuplicateSetIterator
public DuplicateSetIterator(CloseableIterator<SAMRecord> iterator, SAMFileHeader header, boolean preSorted) -
DuplicateSetIterator
public DuplicateSetIterator(CloseableIterator<SAMRecord> iterator, SAMFileHeader header, boolean preSorted, SAMRecordDuplicateComparator comparator) -
DuplicateSetIterator
public DuplicateSetIterator(CloseableIterator<SAMRecord> iterator, SAMFileHeader header, boolean preSorted, SAMRecordDuplicateComparator comparator, Log log) Allows the user of this iterator to skip the sorting of the input if the input is already sorted. If the records are said to be sorted but not actually sorted in the correct order, an exception during iteration will be thrown. Progress information will be printed for sorting of the input if `log` is provided.
-
-
Method Details
-
setScoringStrategy
@Deprecated public void setScoringStrategy(DuplicateScoringStrategy.ScoringStrategy scoringStrategy) Deprecated. -
next
- Specified by:
next
in interfaceIterator<DuplicateSet>
-
close
public void close()Description copied from interface:CloseableIterator
Should be implemented to close/release any underlying resources.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceCloseableIterator<DuplicateSet>
-
hasNext
public boolean hasNext()- Specified by:
hasNext
in interfaceIterator<DuplicateSet>
-
remove
public void remove()- Specified by:
remove
in interfaceIterator<DuplicateSet>
-