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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SAMRecordQueryNameComparator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(SAMRecord samRecord1, SAMRecord samRecord2)
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
-
-
-
-
Method Detail
-
compare
public int compare(SAMRecord samRecord1, SAMRecord samRecord2)
- Specified by:
compare
in interfaceComparator<SAMRecord>
-
fileOrderCompare
public int fileOrderCompare(SAMRecord samRecord1, SAMRecord samRecord2)
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
-
-