Package htsjdk.samtools
Class SAMSortOrderChecker
java.lang.Object
htsjdk.samtools.SAMSortOrderChecker
Encapsulates simple check for SAMRecord order.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetSortKey
(SAMRecord rec) Return the sort key used for the given sort order.boolean
Check if given SAMRecord violates sort order relative to previous SAMRecord.
-
Constructor Details
-
SAMSortOrderChecker
-
-
Method Details
-
isSorted
Check if given SAMRecord violates sort order relative to previous SAMRecord.- Returns:
- True if sort order is unsorted, if this is the first record, or if previous <= rec.
-
getPreviousRecord
-
getSortOrder
-
getSortKey
Return the sort key used for the given sort order. Useful in error messages. This should only be used in error messages and program correctness should not rely on this.
-