annotate filter_vcf.xml @ 4:5dfc843979c2 draft

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