14
|
1 <tool id="bcftools_query" name="BCFtools query" version="1.0.0">
|
|
2 <description>Output VCF/BCF fields in user-defined format</description>
|
|
3 <command>
|
|
4 #if str( $input_file_index ) != "None":
|
|
5 ln -s -f $input input_file.${input.ext} &&
|
|
6 ln -s -f $input_file_index input_file.${input.ext}.tbi &&
|
|
7 #end if
|
|
8
|
|
9 bcftools query
|
|
10 --output "${output_file}"
|
|
11 --format "${format}"
|
|
12 #if str( $regions_file ) != "None":
|
|
13 --regions-file "${regions_file}"
|
|
14 #end if
|
|
15 #if str( $regions ) != "":
|
|
16 --regions "${regions}"
|
|
17 #end if
|
|
18 #if str( $targets_file ) != "None":
|
|
19 --targets-file "${targets_file}"
|
|
20 #end if
|
|
21 #if str( $targets ) != "":
|
|
22 --targets "${targets}"
|
|
23 #end if
|
|
24 #if str( $samples_file ) != "None":
|
|
25 --samples-file "${samples_file}"
|
|
26 #end if
|
|
27 #if str( $samples ) != "":
|
|
28 --samples "${samples}"
|
|
29 #end if
|
|
30 #if str( $expr_cond.set_expr ) == "True":
|
|
31 #if str( $expr_cond.include_or_exclude ) == "include":
|
|
32 --include "${expr_cond.expr}"
|
|
33 #else
|
|
34 --exclude "${expr_cond.expr}"
|
|
35 #end if
|
|
36 #end if
|
|
37 #if str( $collapse ) != "None":
|
|
38 --collapse "${collapse}"
|
|
39 #end if
|
|
40 ${print_header}
|
|
41 ${list_samples}
|
|
42 ${allow_undef_tags}
|
|
43
|
|
44 #if str( $input_file_index ) != "None":
|
|
45 input_file.${input.ext}
|
|
46 #else
|
|
47 $input
|
|
48 #end if
|
|
49 </command>
|
|
50 <inputs>
|
|
51 <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."/>
|
|
52 <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."/>
|
|
53 <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.">
|
|
54 <sanitizer invalid_char="">
|
|
55 <valid initial="string.letters,string.digits"><add value="~`!@#$%^&*()-_=+[{]}\|;:'",<.>?/ " /> </valid>
|
|
56 </sanitizer>
|
|
57 </param>
|
|
58 <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."/>
|
|
59 <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-[,...]">
|
|
60 <sanitizer invalid_char="">
|
|
61 <valid initial="string.digits"><add value="CHRchr-:,"/> </valid>
|
|
62 </sanitizer>
|
|
63 </param>
|
|
64 <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."/>
|
|
65 <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-[,...]">
|
|
66 <sanitizer invalid_char="">
|
|
67 <valid initial="string.digits"><add value="CHRchr-:,^"/> </valid>
|
|
68 </sanitizer>
|
|
69 </param>
|
|
70 <param name="samples_file" type="data" optional="true" label="Samples file" help="-S. File of sample names to include. One sample per line."/>
|
|
71 <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 ^)" />
|
|
72 <conditional name="expr_cond">
|
|
73 <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."/>
|
|
74 <when value="true">
|
|
75 <param name="include_or_exclude" type="select" label="Include or exclude by expression">
|
|
76 <option value="include">Include</option>
|
|
77 <option value="exclude">Exclude</option>
|
|
78 </param>
|
|
79 <param name="expr" type="text" size="80" label="Expression">
|
|
80 <sanitizer invalid_char="">
|
|
81 <valid initial="string.letters,string.digits"><add value="~`!@#$%^&*()-_=+[{]}\|;:'",<.>?/ " /> </valid>
|
|
82 </sanitizer>
|
|
83 </param>
|
|
84 </when>
|
|
85 </conditional>
|
|
86 <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.">
|
|
87 <option value="some">Some (only records where some subset of ALT alleles match are compatible)</option>
|
|
88 <option value="all">All (all records are compatible, regardless of whether ALT alleles match)</option>
|
|
89 <option value="snps">SNPs (all SNP records are compatible, regardless of whether ALT alleles match) </option>
|
|
90 <option value="indels">Indels (all indel records are compatible, regardless of whether REF and ALT alleles match) </option>
|
|
91 <option value="both">Both (SNPs are compatible and indels are compatible)</option>
|
|
92 </param>
|
|
93 <param name="print_header" type="boolean" checked="False" truevalue="--print-header" falsevalue="" label="Print header" help="-H" />
|
|
94 <param name="list_samples" type="boolean" checked="False" truevalue="--list-samples" falsevalue="" label="Print sample names to stdout, then exit" help="-l" />
|
|
95 <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." />
|
|
96 </inputs>
|
|
97 <outputs>
|
|
98 <data name="output_file" format="txt" label="${tool.name} on ${on_string}" />
|
|
99 </outputs>
|
|
100 <help>
|
|
101 **About this tool**
|
|
102
|
|
103 **BCFtools query**: Extract fields from VCF or BCF files and output them in user-defined format.
|
|
104
|
|
105 Please see https://samtools.github.io/bcftools/bcftools.html for more info on options.
|
|
106 </help>
|
|
107 </tool>
|