@DocumentedFeature public class IntervalListTools extends CommandLineProgram
IntervalList
manipulations.
INPUT
s. 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.
For Example:
\@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 and Description |
---|---|
static class |
IntervalListTools.Action |
Modifier and Type | Field and Description |
---|---|
IntervalListTools.Action |
ACTION |
int |
BREAK_BANDS_AT_MULTIPLES_OF |
java.util.List<java.lang.String> |
COMMENT |
java.io.File |
COUNT_OUTPUT |
boolean |
INCLUDE_FILTERED |
java.util.List<java.io.File> |
INPUT |
boolean |
INVERT |
java.io.File |
OUTPUT |
picard.util.IntervalListTools.Output |
OUTPUT_VALUE |
int |
PADDING |
java.lang.Integer |
SCATTER_CONTENT |
int |
SCATTER_COUNT |
java.util.List<java.io.File> |
SECOND_INPUT |
boolean |
SORT |
IntervalListScatterMode |
SUBDIVISION_MODE |
boolean |
UNIQUE |
COMPRESSION_LEVEL, CREATE_INDEX, CREATE_MD5_FILE, GA4GH_CLIENT_SECRETS, MAX_ALLOWABLE_ONE_LINE_SUMMARY_LENGTH, MAX_RECORDS_IN_RAM, QUIET, REFERENCE_SEQUENCE, referenceSequence, specialArgumentsCollection, TMP_DIR, USE_JDK_DEFLATER, USE_JDK_INFLATER, VALIDATION_STRINGENCY, VERBOSITY
Constructor and Description |
---|
IntervalListTools() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.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.
|
getCommandLine, getCommandLineParser, getCommandLineParserForArgs, 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 java.util.List<java.io.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 java.io.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 provided) <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 java.util.List<java.io.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 java.util.List<java.lang.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. ") public int SCATTER_COUNT
@Argument(doc="When scattering with this argument, each of the resultant files will (ideally) have this amount of \'content\', which means either base-counts or interval-counts depending on SUBDIVISION_MODE. When provided, overrides SCATTER_COUNT", optional=true) public java.lang.Integer SCATTER_CONTENT
@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="The mode used to scatter the interval list.") public IntervalListScatterMode 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
@Argument(doc="What value to output to COUNT_OUTPUT file or stdout (for scripting). If COUNT_OUTPUT is provided, this parameter must not be NONE.") public picard.util.IntervalListTools.Output OUTPUT_VALUE
@Argument(doc="File to which to print count of bases or intervals in final output interval list. When not set, value indicated by OUTPUT_VALUE will be printed to stdout. If this parameter is set, OUTPUT_VALUE must not be NONE.", optional=true) public java.io.File COUNT_OUTPUT
protected int doWork()
CommandLineProgram
doWork
in class CommandLineProgram
protected java.lang.String[] customCommandLineValidation()
CommandLineProgram
customCommandLineValidation
in class CommandLineProgram