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
ConstructorsConstructorDescriptionDuplicateSetIterator(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 TypeMethodDescriptionvoidclose()Should be implemented to close/release any underlying resources.booleanhasNext()next()voidremove()voidsetScoringStrategy(DuplicateScoringStrategy.ScoringStrategy scoringStrategy) Deprecated.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface htsjdk.samtools.util.CloseableIterator
stream, toListMethods 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:
nextin interfaceIterator<DuplicateSet>
-
close
public void close()Description copied from interface:CloseableIteratorShould be implemented to close/release any underlying resources.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceCloseableIterator<DuplicateSet>
-
hasNext
public boolean hasNext()- Specified by:
hasNextin interfaceIterator<DuplicateSet>
-
remove
public void remove()- Specified by:
removein interfaceIterator<DuplicateSet>
-