comparison filter_vcf.xml @ 0:cb29f95c7b88 draft

Uploaded
author ulfschaefer
date Mon, 09 May 2016 09:27:06 -0400
parents
children 74f595df6e51
comparison
equal deleted inserted replaced
-1:000000000000 0:cb29f95c7b88
1 <tool id="filter_vcf" name="Filter VCF" version="1.0">
2 <description>filters a VCF file</description>
3 <requirements>
4 <requirement type="package" version="2.7.10">python</requirement>
5 <requirement type="package" version="0.6.8dev">pyvcf</requirement>
6 <requirement type="package" version="3.11">pyyaml</requirement>
7 <requirement type="package" version="2.0.2">bintrees</requirement>
8 <requirement type="package" version="1.66">biopython</requirement>
9 <requirement type="package" version="1.4">matplotlib</requirement>
10 <requirement type="package" version="0.23.1">cython</requirement>
11 <requirement type="package" version="1.0">phephenix</requirement>
12 </requirements>
13 <stdio>
14 <!-- Assume anything other than zero is an error -->
15 <exit_code range="1:" />
16 <exit_code range=":-1" />
17 </stdio>
18 <command interpreter="bash">
19 filter_vcf.sh
20 $output
21 $input
22 #if str($onlygood) == "false":
23 onlygood
24 #else
25 NOTTHERE
26 #end if
27 #for $sf in $snp_filter:
28 #for $name, $param in $sf.snp_filter_type.iteritems():
29 #if $name not in [ "__current_case__", "snp_filter_type_selector" ]:
30 ${name}:"${param}"
31 #end if
32 #end for
33 #end for
34 </command>
35
36 <inputs>
37 <param name="input" type="data" format="vcf" label="VCF File to filter" />
38
39 <repeat name="snp_filter" title="SNP Filter" help="">
40 <conditional name="snp_filter_type">
41 <param name="snp_filter_type_selector" type="select" label="SNP Filter Type">
42 <option value="gq_score_option">GQ score</option>
43 <option value="dp4_ratio_option">DP4 ratio</option>
44 <option value="ad_ratio_option">AD ratio</option>
45 <option value="mq_score_option">MQ score</option>
46 <option value="min_depth_option">Minimum depth</option>
47 <option value="uncall_gt_option">Uncall GT</option>
48 <option value="mq0_ratio_option">MQ0 ratio</option>
49 <option value="qual_score_option">Quality score</option>
50 <option value="mq0f_ratio_option">MQ0F ratio</option>
51 </param>
52 <when value="gq_score_option">
53 <param name="gq_score" type="integer" value="0" label="Minimum GC score" help="Type integer"/>
54 </when>
55 <when value="dp4_ratio_option">
56 <param name="dp4_ratio" type="float" value="0.9" label="Minimum DP4 ratio" help="Type float"/>
57 </when>
58 <when value="ad_ratio_option">
59 <param name="ad_ratio" type="float" value="0.9" label="Minimum AD ratio" help="Type float"/>
60 </when>
61 <when value="mq_score_option">
62 <param name="mq_score" type="integer" value="30" label="Minimum MQ score" help="Type integer"/>
63 </when>
64 <when value="min_depth_option">
65 <param name="min_depth" type="integer" value="5" label="Minimum depth" help="Type integer"/>
66 </when>
67 <when value="uncall_gt_option">
68 <param name="uncall_gt" type="text" value="" hidden="True"/>
69 </when>
70 <when value="mq0_ratio_option">
71 <param name="mq0_ratio" type="float" value="0.05" label="Minimim MQ0 ratio" help="Type float"/>
72 </when>
73 <when value="qual_score_option">
74 <param name="qual_score" type="integer" value="30" label="Minimim quality score" help="Type integer"/>
75 </when>
76 <when value="mq0f_ratio_option">
77 <param name="mq0f_ratio" type="float" value="0.05" label="Minimum MQ0F ratio" help="Type float"/>
78 </when>
79 </conditional>
80 </repeat>
81 <param name="onlygood" type="select" label="Write only good variants to output" help="Write only variants that PASS all filters. ">
82 <option value="true" selected="true">Write all</option>
83 <option value="false">Write only good</option>
84 </param>
85 </inputs>
86
87 <outputs>
88 <data format="vcf" name="output" label="${tool.name} on ${on_string}: filtered VCF" />
89 </outputs>
90 <tests>
91 <test>
92 <param name="input" value="test_input.vcf" ftype="vcf" />
93 <param name="min_depth" value="100" />
94 <output name="output" file="test_output.vcf" ftype="vcf" />
95 </test>
96 </tests>
97 <help>
98
99 usage: filter_vcf.py [-h] \-\-vcf VCF \-\-filters FILTERS \-\-output OUTPUT
100
101 optional arguments:
102
103 -h, \-\-help show this help message and exit
104
105 \-\-vcf VCF, -v VCF VCF file to (re)filter.
106
107 \-\-filters FILTERS, -f FILTERS Filter(s) to apply as key:threshold pairs, separated by comma.
108
109 \-\-output OUTPUT, -o OUTPUT Location for filtered VCF to be written.
110
111 </help>
112 </tool>