Class QueryInterval

    • Field Detail

      • referenceIndex

        public final int referenceIndex
        Index of reference sequence, based on the sequence dictionary of the BAM file being queried.
      • start

        public final int start
        1-based, inclusive
      • end

        public final int end
        1-based, inclusive. If <= 0, implies that the interval goes to the end of the reference sequence
    • Constructor Detail

      • QueryInterval

        public QueryInterval​(int referenceIndex,
                             int start,
                             int end)
    • Method Detail

      • endsAtStartOf

        public boolean endsAtStartOf​(QueryInterval other)
        Returns:
        true if both are on same reference, and other starts exactly before this ends.
      • overlaps

        public boolean overlaps​(QueryInterval other)
        Returns:
        true if both are on same reference, and the overlap.
      • optimizeIntervals

        public static QueryInterval[] optimizeIntervals​(QueryInterval[] inputIntervals)
        Parameters:
        inputIntervals - WARNING: This list is modified (sorted) by this method.
        Returns:
        Ordered list of intervals in which abutting and overlapping intervals are merged.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object