Package htsjdk.samtools
Class SAMRecordQueryNameComparator
java.lang.Object
htsjdk.samtools.SAMRecordQueryNameComparator
- All Implemented Interfaces:
SAMRecordComparator
,Serializable
,Comparator<SAMRecord>
- Direct Known Subclasses:
SAMRecordQueryHashComparator
public class SAMRecordQueryNameComparator
extends Object
implements SAMRecordComparator, Serializable
Comparator for "queryname" ordering of SAMRecords.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
static int
compareReadNames
(String readName1, String readName2) Encapsulate algorithm for comparing read names in queryname-sorted file, since there have been conversations about changing the behavior.int
fileOrderCompare
(SAMRecord samRecord1, SAMRecord samRecord2) Less stringent compare method than the regular compare.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
SAMRecordQueryNameComparator
public SAMRecordQueryNameComparator()
-
-
Method Details
-
compare
- Specified by:
compare
in interfaceComparator<SAMRecord>
-
fileOrderCompare
Less stringent compare method than the regular compare. If the two records are equal enough that their ordering in a sorted SAM file would be arbitrary, this method returns 0.- Specified by:
fileOrderCompare
in interfaceSAMRecordComparator
- Returns:
- negative if samRecord1 < samRecord2, 0 if equal, else positive
-
compareReadNames
Encapsulate algorithm for comparing read names in queryname-sorted file, since there have been conversations about changing the behavior.
-