@DocumentedFeature public class IntervalListTools extends CommandLineProgram
IntervalList manipulations.
INPUTs. Other options, e.g. interval subtraction, are
controlled by the arguments.
IntervalList and VCF files are accepted as input. IntervalList should be denoted with the extension
".interval_list", while a VCF must have one of ".vcf", ".vcf.gz",
".bcf". When VCF file is used as input, each variant is translated into an using its reference allele or the END
INFO annotation (if present) to determine the extent of the interval.
IntervalListTools can also "scatter" the resulting interval-list into many interval-files. This can be useful
for creating multiple interval lists for scattering an analysis over.
\@HD VN:1.0 \@SQ SN:chr1 LN:501 \@SQ SN:chr2 LN:401 chr1 1 100 + starts at the first base of the contig and covers 100 bases chr2 100 100 + interval with exactly one base
java -jar picard.jar IntervalListTools \\
ACTION=CONCAT \\
I=input.interval_list \\
I=input_2.interval_list \\
O=new.interval_list
java -jar picard.jar IntervalListTools \\
ACTION=CONCAT \\
SORT=true \\
UNIQUE=true \\
I=input.interval_list \\
I=input_2.interval_list \\
O=new.interval_list
java -jar picard.jar IntervalListTools \\
ACTION=SUBTRACT \\
I=input.interval_list \\
SI=input_2.interval_list \\
O=new.interval_list
java -jar picard.jar IntervalListTools \\
ACTION=INTERSECT \\
I=input1.interval_list \\
I=input2.interval_list \\
SI=input3.interval_list \\
O=new.interval_list
| Modifier and Type | Class | Description |
|---|---|---|
static class |
IntervalListTools.Action |
| Modifier and Type | Field | Description |
|---|---|---|
IntervalListTools.Action |
ACTION |
|
int |
BREAK_BANDS_AT_MULTIPLES_OF |
|
List<String> |
COMMENT |
|
boolean |
INCLUDE_FILTERED |
|
List<File> |
INPUT |
|
boolean |
INVERT |
|
File |
OUTPUT |
|
int |
PADDING |
|
int |
SCATTER_COUNT |
|
List<File> |
SECOND_INPUT |
|
boolean |
SORT |
|
IntervalListScatterer.Mode |
SUBDIVISION_MODE |
|
boolean |
UNIQUE |
COMPRESSION_LEVEL, CREATE_INDEX, CREATE_MD5_FILE, GA4GH_CLIENT_SECRETS, MAX_RECORDS_IN_RAM, QUIET, REFERENCE_SEQUENCE, referenceSequence, specialArgumentsCollection, TMP_DIR, USE_JDK_DEFLATER, USE_JDK_INFLATER, VALIDATION_STRINGENCY, VERBOSITY| Constructor | Description |
|---|---|
IntervalListTools() |
| Modifier and Type | Method | Description |
|---|---|---|
protected String[] |
customCommandLineValidation() |
Put any custom command-line validation in an override of this method.
|
protected int |
doWork() |
Do the work after command line has been parsed.
|
static File |
getScatteredFileName(File scatterDirectory,
long scatterTotal,
String formattedIndex) |
getCommandLine, getCommandLineParser, getDefaultHeaders, getFaqLink, getMetricsFile, getStandardUsagePreamble, getStandardUsagePreamble, getVersion, hasWebDocumentation, instanceMain, instanceMainWithExit, makeReferenceArgumentCollection, parseArgs, requiresReference, setDefaultHeaders, useLegacyParser@Argument(shortName="I",
doc="One or more interval lists. If multiple interval lists are provided the output is theresult of merging the inputs. Supported formats are interval_list and VCF.",
minElements=1)
public List<File> INPUT
@Argument(doc="The output interval list file to write (if SCATTER_COUNT == 1) or the directory into which to write the scattered interval sub-directories (if SCATTER_COUNT > 1).",
shortName="O",
optional=true)
public File OUTPUT
@Argument(doc="The amount to pad each end of the intervals by before other operations are undertaken. Negative numbers are allowed and indicate intervals should be shrunk. Resulting intervals < 0 bases long will be removed. Padding is applied to the interval lists (both INPUT and SECOND_INPUT, if proivided) <b> before </b> the ACTION is performed.",
optional=true)
public int PADDING
@Argument(doc="If true, merge overlapping and adjacent intervals to create a list of unique intervals. Implies SORT=true.") public boolean UNIQUE
@Argument(doc="If true, sort the resulting interval list by coordinate.") public boolean SORT
@Argument(doc="Action to take on inputs.") public IntervalListTools.Action ACTION
@Argument(shortName="SI",
doc="Second set of intervals for SUBTRACT and DIFFERENCE operations.",
optional=true)
public List<File> SECOND_INPUT
@Argument(doc="One or more lines of comment to add to the header of the output file (as @CO lines in the SAM header).",
optional=true)
public List<String> COMMENT
@Argument(doc="The number of files into which to scatter the resulting list by locus; in some situations, fewer intervals may be emitted. Note - if > 1, the resultant scattered intervals will be sorted and uniqued. The sort will be inverted if the INVERT flag is set.") public int SCATTER_COUNT
@Argument(doc="Whether to include filtered variants in the vcf when generating an interval list from vcf.",
optional=true)
public boolean INCLUDE_FILTERED
@Argument(shortName="BRK",
doc="If set to a positive value will create a new interval list with the original intervals broken up at integer multiples of this value. Set to 0 to NOT break up intervals.",
optional=true)
public int BREAK_BANDS_AT_MULTIPLES_OF
@Argument(shortName="M",
doc="Selects between various ways in which scattering of the interval-list can happen.")
public IntervalListScatterer.Mode SUBDIVISION_MODE
@Argument(doc="Produce the inverse list of intervals, that is, the regions in the genome that are <br>not</br> covered by any of the input intervals. Will merge abutting intervals first. Output will be sorted.",
optional=true)
public boolean INVERT
protected int doWork()
CommandLineProgramdoWork in class CommandLineProgramprotected String[] customCommandLineValidation()
CommandLineProgramcustomCommandLineValidation in class CommandLineProgram