Class LiftOver


  • public class LiftOver
    extends Object
    Java port of UCSC liftOver. Only the most basic liftOver functionality is implemented. Internally coordinates are 0-based, half-open. The API is standard Picard 1-based, inclusive.
    • Field Detail

      • DEFAULT_LIFTOVER_MINMATCH

        public static final double DEFAULT_LIFTOVER_MINMATCH
        See Also:
        Constant Field Values
    • Constructor Detail

      • LiftOver

        public LiftOver​(File chainFile)
        Load UCSC chain file in order to lift over Intervals.
    • Method Detail

      • setShouldLogFailedIntervalsBelowThreshold

        public void setShouldLogFailedIntervalsBelowThreshold​(boolean logFailedIntervals)
        By default any lifted interval that falls below liftOverMinMatch will be logged. Set this to false to prevent logging.
        Parameters:
        logFailedIntervals -
      • resetFailedIntervalsBelowThresholdCounter

        public void resetFailedIntervalsBelowThresholdCounter()
        Resets the internal counter that tracks intervals that failed liftover due to insufficient intersection length
      • getFailedIntervalsBelowThreshold

        public long getFailedIntervalsBelowThreshold()
        Returns:
        The total number of intervals that have failed liftover due to insufficient intersection length
      • validateToSequences

        public void validateToSequences​(SAMSequenceDictionary sequenceDictionary)
        Throw an exception if all the "to" sequence names in the chains are not found in the given sequence dictionary.
      • liftOver

        public Interval liftOver​(Interval interval)
        Lift over the given interval to the new genome build using the liftOverMinMatch set for this LiftOver object.
        Parameters:
        interval - Interval to be lifted over.
        Returns:
        Interval in the output build coordinates, or null if it cannot be lifted over.
      • liftOver

        public Interval liftOver​(Interval interval,
                                 double liftOverMinMatch)
        Lift over the given interval to the new genome build.
        Parameters:
        interval - Interval to be lifted over.
        liftOverMinMatch - Minimum fraction of bases that must remap.
        Returns:
        Interval in the output build coordinates, or null if it cannot be lifted over.
      • getContigMap

        public Map<String,​Set<String>> getContigMap()
        Returns:
        the set of destination contigs for each source contig in the chains file.
      • getLiftOverMinMatch

        public double getLiftOverMinMatch()
        Get minimum fraction of bases that must remap.
      • setLiftOverMinMatch

        public void setLiftOverMinMatch​(double liftOverMinMatch)
        Set minimum fraction of bases that must remap.