annotate vcftools_annotate.xml @ 2:57a6550df582 draft default tip

Uploaded
author devteam
date Fri, 14 Feb 2014 15:01:42 -0500
parents db407a47527b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
1 <tool id="vcftools_annotate" name="Annotate" version="0.1">
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
2 <description>a VCF dataset with custom filters</description>
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
3
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
4 <requirements>
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
5 <requirement type="binary">echo</requirement>
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
6 <requirement type="package" version="0.1.11">vcftools</requirement>
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
7 </requirements>
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
8
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
9 <command>
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
10 ## Generate filter file.
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
11 echo "{ tag => '${tag}', name => '${filter}', desc => '${description}', test => sub { my @t = split('%', @\\$MATCH[0]); return @t[0] $condition ? \\$PASS : \\$FAIL }, }," > f.txt ;
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
12
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
13 ## Annotate.
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
14 vcf-annotate -f f.txt ${input} > ${output}
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
15 </command>
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
16 <inputs>
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
17 <param name="input" label="Input" type="data" format="vcf"/>
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
18 <param name="tag" label="Tag name" type="text"/>
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
19 <param name="description" label="Tag description" type="text">
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
20 <sanitizer sanitize="False"/>
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
21 </param>
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
22 <param name="filter" label="Filter name" type="text"/>
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
23 <param name="condition" label="Filter condition" type="text">
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
24 <sanitizer sanitize="False"/>
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
25 </param>
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
26 </inputs>
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
27
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
28 <outputs>
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
29 <data name="output" format="vcf"/>
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
30 </outputs>
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
31
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
32 <stdio>
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
33 <regex match=".*" source="both" level="log" description="tool progress"/>
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
34 </stdio>
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
35
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
36 <tests>
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
37 <test>
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
38 <param name="input" value="test_in1.vcf" />
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
39 <param name="tag" value="FORMAT/FREQ" />
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
40 <param name="description" value="MinAF [7]"/>
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
41 <param name="filter" value="MinAF" />
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
42 <param name="condition" value=">= 7" />
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
43 <!-- 2 lines diff because command line with full file path is included in output VCF, and
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
44 it not possible to match full file path. -->
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
45 <output name="output" file="test_out1.vcf" lines_diff="2" />
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
46 </test>
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
47 </tests>
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
48
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
49 <help>
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
50 Annotates VCF dataset with custom annotations. For example, if this format tag is used for allele frequency:
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
51
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
52 ##FORMAT=&lt;ID=FREQ,Number=1,Type=String,Description=&quot;Variant allele frequency&quot;&gt;
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
53
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
54 you can add a filter for allele frequency using &quot;FORMAT/FREQ&quot; as the tag name and the condition &quot;>= [desired allele freq]&quot;
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
55
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
56 Please see the VCFtools `documentation`__ for help and further information.
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
57
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
58 .. __: http://vcftools.sourceforge.net/perl_module.html#vcf-annotate
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
59 </help>
bc178c43e4fe Uploaded
devteam
parents:
diff changeset
60 </tool>