14
|
1 <tool id="bcftools_query" name="BCFtools query" version="1.0.0">
|
|
2 <description>Output VCF/BCF fields in user-defined format</description>
|
26
|
3 <requirements>
|
|
4 <requirement type="package" version="1.3">bcftools</requirement>
|
|
5 </requirements>
|
14
|
6 <command>
|
|
7 #if str( $input_file_index ) != "None":
|
|
8 ln -s -f $input input_file.${input.ext} &&
|
|
9 ln -s -f $input_file_index input_file.${input.ext}.tbi &&
|
|
10 #end if
|
|
11
|
|
12 bcftools query
|
|
13 --output "${output_file}"
|
|
14 --format "${format}"
|
|
15 #if str( $regions_file ) != "None":
|
|
16 --regions-file "${regions_file}"
|
|
17 #end if
|
|
18 #if str( $regions ) != "":
|
|
19 --regions "${regions}"
|
|
20 #end if
|
|
21 #if str( $targets_file ) != "None":
|
|
22 --targets-file "${targets_file}"
|
|
23 #end if
|
|
24 #if str( $targets ) != "":
|
|
25 --targets "${targets}"
|
|
26 #end if
|
|
27 #if str( $samples_file ) != "None":
|
|
28 --samples-file "${samples_file}"
|
|
29 #end if
|
|
30 #if str( $samples ) != "":
|
|
31 --samples "${samples}"
|
|
32 #end if
|
|
33 #if str( $expr_cond.set_expr ) == "True":
|
|
34 #if str( $expr_cond.include_or_exclude ) == "include":
|
|
35 --include "${expr_cond.expr}"
|
|
36 #else
|
|
37 --exclude "${expr_cond.expr}"
|
|
38 #end if
|
|
39 #end if
|
|
40 #if str( $collapse ) != "None":
|
|
41 --collapse "${collapse}"
|
|
42 #end if
|
|
43 ${print_header}
|
|
44 ${list_samples}
|
|
45 ${allow_undef_tags}
|
|
46
|
|
47 #if str( $input_file_index ) != "None":
|
|
48 input_file.${input.ext}
|
|
49 #else
|
|
50 $input
|
|
51 #end if
|
|
52 </command>
|
|
53 <inputs>
|
|
54 <param name="input" type="data" format="vcf,bcf,bgzip" label="VCF or BCF input file" help="Input file can optionally be compressed and indexed using Bgzip and Tabix Galaxy tools. In this case, select bgzipped file here and index below."/>
|
|
55 <param name="input_file_index" type="data" optional="true" label="Input file index" help="Tabix-generated index for input file. Run Tabix Galaxy tool on bgzipped input file to create index."/>
|
|
56 <param name="format" type="text" size="80" label="Output format string (required)" help="-f. Example: "%CHROM\t%POS\t%REF\t%ALT[\t%SAMPLE=%GT]\n". See BCFtools documentation for more info.">
|
|
57 <sanitizer invalid_char="">
|
|
58 <valid initial="string.letters,string.digits"><add value="~`!@#$%^&*()-_=+[{]}\|;:'",<.>?/ " /> </valid>
|
|
59 </sanitizer>
|
|
60 </param>
|
|
61 <param name="regions_file" type="data" optional="true" label="Regions file" help="-R. Regions specified in a VCF, BED, or tab-delimited file with columns CHROM, POS, and, optionally, POS_TO."/>
|
|
62 <param name="regions" type="text" size="80" optional="True" label="Regions list" help="-r. Comma-separated list of regions. Format: chr|chr:pos|chr:from-to|chr:from-[,...]">
|
|
63 <sanitizer invalid_char="">
|
|
64 <valid initial="string.digits"><add value="CHRchr-:,"/> </valid>
|
|
65 </sanitizer>
|
|
66 </param>
|
|
67 <param name="targets_file" type="data" optional="true" label="Targets file" help="-T. Targets specified in a VCF, BED, or tab-delimited file with columns CHROM, POS, and, optionally, POS_TO."/>
|
|
68 <param name="targets" type="text" size="80" optional="True" label="Targets list" help="-t. Comma-separated list of targets. Format: [^]chr|chr:pos|chr:from-to|chr:from-[,...]">
|
|
69 <sanitizer invalid_char="">
|
|
70 <valid initial="string.digits"><add value="CHRchr-:,^"/> </valid>
|
|
71 </sanitizer>
|
|
72 </param>
|
|
73 <param name="samples_file" type="data" optional="true" label="Samples file" help="-S. File of sample names to include. One sample per line."/>
|
|
74 <param name="samples" type="text" size="80" optional="True" label="Samples list" help="-s. Comma-separated list of samples to include or exclude. (Excludes if prefixed with ^)" />
|
|
75 <conditional name="expr_cond">
|
|
76 <param name="set_expr" type="boolean" checked="False" label="Filter by expression" help="-i, e. Include/ exclude sites for which expression is true. Must use valid expression."/>
|
|
77 <when value="true">
|
|
78 <param name="include_or_exclude" type="select" label="Include or exclude by expression">
|
|
79 <option value="include">Include</option>
|
|
80 <option value="exclude">Exclude</option>
|
|
81 </param>
|
|
82 <param name="expr" type="text" size="80" label="Expression">
|
|
83 <sanitizer invalid_char="">
|
|
84 <valid initial="string.letters,string.digits"><add value="~`!@#$%^&*()-_=+[{]}\|;:'",<.>?/ " /> </valid>
|
|
85 </sanitizer>
|
|
86 </param>
|
|
87 </when>
|
|
88 </conditional>
|
|
89 <param name="collapse" optional="True" type="select" label="Collapse records" help="-c. Controls how to treat records with duplicate positions, and defines compatible records across multiple input files.">
|
|
90 <option value="some">Some (only records where some subset of ALT alleles match are compatible)</option>
|
|
91 <option value="all">All (all records are compatible, regardless of whether ALT alleles match)</option>
|
|
92 <option value="snps">SNPs (all SNP records are compatible, regardless of whether ALT alleles match) </option>
|
|
93 <option value="indels">Indels (all indel records are compatible, regardless of whether REF and ALT alleles match) </option>
|
|
94 <option value="both">Both (SNPs are compatible and indels are compatible)</option>
|
|
95 </param>
|
|
96 <param name="print_header" type="boolean" checked="False" truevalue="--print-header" falsevalue="" label="Print header" help="-H" />
|
|
97 <param name="list_samples" type="boolean" checked="False" truevalue="--list-samples" falsevalue="" label="Print sample names to stdout, then exit" help="-l" />
|
|
98 <param name="allow_undef_tags" type="boolean" checked="False" truevalue="--allow-undef-tags" falsevalue="" label="Allow undefined tags" help="-u. If there are undefined tags in the format string, print "." instead of throwing an error." />
|
|
99 </inputs>
|
|
100 <outputs>
|
|
101 <data name="output_file" format="txt" label="${tool.name} on ${on_string}" />
|
|
102 </outputs>
|
|
103 <help>
|
|
104 **About this tool**
|
|
105
|
|
106 **BCFtools query**: Extract fields from VCF or BCF files and output them in user-defined format.
|
|
107
|
|
108 Please see https://samtools.github.io/bcftools/bcftools.html for more info on options.
|
|
109 </help>
|
|
110 </tool>
|