Class SAMSortOrderChecker


  • public class SAMSortOrderChecker
    extends Object
    Encapsulates simple check for SAMRecord order.
    • Method Detail

      • isSorted

        public boolean isSorted​(SAMRecord rec)
        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

        public SAMRecord getPreviousRecord()
      • getSortKey

        public String getSortKey​(SAMRecord rec)
        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.