Package htsjdk.samtools.liftover
Class LiftOver
java.lang.Object
htsjdk.samtools.liftover.LiftOver
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
Modifier and TypeClassDescriptionstatic class
Represents a portion of a liftover operation, for use in diagnosing liftover failures. -
Field Summary
-
Constructor Summary
ConstructorDescriptionLoad 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 TypeMethodDescriptiondiagnosticLiftover
(Interval interval) long
double
Get minimum fraction of bases that must remap.Lift over the given interval to the new genome build using the liftOverMinMatch set for this LiftOver object.Lift over the given interval to the new genome build.void
Resets the internal counter that tracks intervals that failed liftover due to insufficient intersection lengthvoid
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.
-
Field Details
-
DEFAULT_LIFTOVER_MINMATCH
public static final double DEFAULT_LIFTOVER_MINMATCH- See Also:
-
-
Constructor Details
-
LiftOver
Load UCSC chain file in order to lift over Intervals. -
LiftOver
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
Throw an exception if all the "to" sequence names in the chains are not found in the given sequence dictionary. -
liftOver
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
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
-
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.
-