annotate filter_vcf.xml @ 11:cd59be4a7fe3 draft default tip

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