Package htsjdk.samtools.liftover

# Class LiftOver

java.lang.Object
htsjdk.samtools.liftover.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.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static class`
`LiftOver.PartialLiftover`
Represents a portion of a liftover operation, for use in diagnosing liftover failures.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final double`
`DEFAULT_LIFTOVER_MINMATCH`

## Constructor Summary

Constructors
Constructor
Description
`LiftOver(File chainFile)`
Load UCSC chain file in order to lift over Intervals.
`LiftOver(InputStream chainFileInputStream, String sourceName)`
Load UCSC chain file in order to lift over Intervals.

## Method Summary

Modifier and Type
Method
Description
`List<LiftOver.PartialLiftover>`
`diagnosticLiftover(Interval interval)`
`Map<String,Set<String>>`
`getContigMap()`
`long`
`getFailedIntervalsBelowThreshold()`
`double`
`getLiftOverMinMatch()`
Get minimum fraction of bases that must remap.
`Interval`
`liftOver(Interval interval)`
Lift over the given interval to the new genome build using the liftOverMinMatch set for this LiftOver object.
`Interval`
`liftOver(Interval interval, double liftOverMinMatch)`
Lift over the given interval to the new genome build.
`void`
`resetFailedIntervalsBelowThresholdCounter()`
Resets the internal counter that tracks intervals that failed liftover due to insufficient intersection length
`void`
`setLiftOverMinMatch(double liftOverMinMatch)`
Set minimum fraction of bases that must remap.
`void`
`setShouldLogFailedIntervalsBelowThreshold(boolean logFailedIntervals)`
By default any lifted interval that falls below liftOverMinMatch will be logged.
`void`
`validateToSequences(SAMSequenceDictionary sequenceDictionary)`
Throw an exception if all the "to" sequence names in the chains are not found in the given sequence dictionary.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### DEFAULT_LIFTOVER_MINMATCH

public static final double DEFAULT_LIFTOVER_MINMATCH

See Also:
  - Constant Field Values

## Constructor Details

### LiftOver

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

### LiftOver

public LiftOver(InputStream chainFileInputStream, String sourceName)
Load UCSC chain file in order to lift over Intervals.

## Method Details

### 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.

### diagnosticLiftover

public List<LiftOver.PartialLiftover> diagnosticLiftover(Interval interval)

### 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.