3
|
1 <tool id="vcffilter2" name="VCFfilter:" version="0.0.2">
|
0
|
2 <requirements>
|
3
|
3 <requirement type="package" version="8a5602bf07">vcflib</requirement>
|
0
|
4 </requirements>
|
|
5 <description>filter VCF data in a variety of attributes</description>
|
|
6 <command>
|
|
7 <!-- This tools depends on tabix functionality, which is currently distributed with Galaxy itself via a pysam egg -->
|
|
8 ln -s "${input1}" input1.vcf.gz &&
|
|
9 ln -s "${Tabixized_input}" input1.vcf.gz.tbi &&
|
|
10 vcffilter ${filterList} input1.vcf.gz > "${out_file1}"
|
|
11 </command>
|
|
12
|
|
13 <inputs>
|
|
14 <param name="filterList" size="40" type="text" value="-f "DP > 10"" label="Specify filterting expression" help="See explanation of filtering options below">
|
|
15 <sanitizer>
|
|
16 <valid initial="string.printable">
|
|
17 <remove value="'"/>
|
|
18 </valid>
|
|
19 <mapping initial="none">
|
|
20 <add source="'" target="__sq__"/>
|
|
21 </mapping>
|
|
22 </sanitizer>
|
|
23 </param>
|
3
|
24 <param format="vcf_bgzip" name="input1" type="data" label="VCF dataset to filter">
|
0
|
25 <conversion name="Tabixized_input" type="tabix" />
|
|
26 </param>
|
|
27 </inputs>
|
|
28 <outputs>
|
|
29 <data format="vcf" name="out_file1" />
|
|
30 </outputs>
|
|
31 <tests>
|
|
32 <test>
|
|
33 <param name="filterList" value="-f "DP > 10""/>
|
|
34 <param name="input1" value="vcflib.vcf"/>
|
|
35 <output name="out_file1" file="vcffilter-test1.vcf"/>
|
|
36 </test>
|
|
37 </tests>
|
|
38 <help>
|
|
39
|
3
|
40 You can specify the following options within the **Specify filtering expression** box in any combination::
|
0
|
41
|
|
42 -f, --info-filter specifies a filter to apply to the info fields of records, removes alleles which do not pass the filter
|
|
43 -g, --genotype-filter specifies a filter to apply to the genotype fields of records
|
|
44 -s, --filter-sites filter entire records, not just alleles
|
|
45 -t, --tag-pass tag vcf records as positively filtered with this tag, print all records
|
|
46 -F, --tag-fail tag vcf records as negatively filtered with this tag, print all records
|
|
47 -A, --append-filter append the existing filter tag, don't just replace it
|
|
48 -a, --allele-tag apply -t on a per-allele basis. adds or sets the corresponding INFO field tag
|
|
49 -v, --invert inverts the filter, e.g. grep -v
|
|
50 -o, --or use logical OR instead of AND to combine filters
|
3
|
51 -r, --region specify a region on which to target the filtering (must be used in conjunction with -f or -g)
|
0
|
52
|
3
|
53 Filters are specified in the form {ID} {operator} {value}::
|
0
|
54
|
|
55 -f "DP > 10" # for info fields
|
|
56 -g "GT = 1|1" # for genotype fields
|
|
57 -f "CpG" # for 'flag' fields
|
|
58
|
3
|
59 Any number of filters may be specified. They are combined via logical AND unless the --or option is specified. For convenience, you can specify "QUAL" to refer to the quality of the site, even though it does not appear in the INFO fields.
|
0
|
60
|
|
61 Operators can be any of: =, !, <, >, pipe, &
|
|
62
|
|
63
|
3
|
64 To restrict output to a specific location use the -r option (must be used in conjunction with -g or -f)::
|
0
|
65
|
|
66 -r chr20:14000-15000 # only output calls between positions 14,000 and 15,000 on chromosome 20
|
|
67 -r chrX # only output call on chromosome X
|
|
68
|
|
69 -----
|
|
70
|
|
71 Vcffilter is a part of VCFlib toolkit developed by Erik Garrison (https://github.com/ekg/vcflib).
|
|
72
|
|
73 </help>
|
|
74 </tool>
|