annotate VCFFiltering_wrapper.xml @ 0:3552a8d9f51c draft

Uploaded
author urgi-team
date Tue, 10 Nov 2015 08:30:56 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
1 <tool id="VCFFiltering" name="VCFFiltering" version="0.01">
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
2 <description>Filters SNP on a VCF depending on depth, allele number and allele frequency</description>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
3 <requirements>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
4 <requirement type="package" version="1.0">VCF_Gandalf_Tools</requirement>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
5 </requirements>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
6 <version_command>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
7 VCFFiltering.py --version
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
8 </version_command>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
9 <command interpreter="python">
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
10 #if $DP_auto.is_DP_auto
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
11 VCFFiltering_wrapper.py -f $inputVCF -o $outputVCF -F $AF -N $AN
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
12 #else
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
13 VCFFiltering_wrapper.py -f $inputVCF -o $outputVCF -F $AF -N $AN -m $DP_auto.DPmin -M $DP_auto.DPmax
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
14 #end if
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
15 ## Bed files
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
16 #if $BedFile_List.is_BedFile
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
17 #for $bed in $BedFile_List.BedFiles
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
18 -b $bed.inputBed
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
19 #end for
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
20 #end if
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
21 --graphHTML $output_html --dirGraphs "$output_html.files_path"
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
22
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
23 </command>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
24 <inputs>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
25 <param name="inputVCF" type="data" format="vcf" label="Input VCF File name (from FreeBayes)"/>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
26 <conditional name="DP_auto">
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
27 <param name="is_DP_auto" type="boolean" label="Calculate optimal depth range automatically" truevalue="yes" falsevalue="no" checked="on" />
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
28 <when value="yes"/>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
29 <when value="no">
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
30 <param name="DPmin" type="integer" label="minumum Depth" value="1" help="default = 1">
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
31 <validator type="in_range" min="0" message="DP can't be negative" />
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
32 </param>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
33 <param name="DPmax" type="integer" label="maximum Depth" value="200" help="default = 200">
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
34 <validator type="in_range" min="0" message="DP can't be negative" />
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
35 </param>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
36 </when>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
37 </conditional>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
38 <param name="AF" type="float" value="0.9" label="minimum allele frequency" help="default = 0.9">
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
39 <validator type="in_range" min="0.0" max="1.0"/>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
40 </param>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
41 <param name="AN" type="integer" value="2" label="maximum allele number" help="default = 2">
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
42 <validator type="in_range" min="1" message="Allele number can't be negative" />
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
43 </param>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
44 <conditional name="BedFile_List">
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
45 <param name="is_BedFile" type="boolean" label="bed files : list of coordinates to filter, multiple beds allowed" truevalue="yes" falsevalue="no" checked="off" />
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
46 <when value="no"/>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
47 <when value="yes">
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
48 <repeat name="BedFiles" title="bed files : list of coordinates to filter, multiple beds allowed" min="1">
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
49 <param name="inputBed" type="data" format="bed" label="Select Bed file "/>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
50 </repeat>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
51 </when>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
52 </conditional>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
53 </inputs>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
54 <outputs>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
55 <data format="vcf" name="outputVCF" label="${tool.name} on ${on_string} (vcf)"/>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
56 <data format="html" name="output_html" label="${tool.name} graphs on ${on_string} (html)">
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
57 </data>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
58 </outputs>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
59 <tests>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
60 <test>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
61 <param name="is_DP_auto" value="yes" />
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
62 <param name="AF" value="0.9"/>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
63 <param name="AN" value="2"/>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
64 <param name="inputVCF" ftype="vcf" value="VCFFiltering_input.vcf" />
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
65 <output name="outputVCF" file="VCFFiltering_DPauto_output.vcf"/>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
66 </test>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
67 <test>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
68 <param name="is_DP_auto" value="no" />
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
69 <param name="DPmin" value="4"/>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
70 <param name="DPmax" value="200"/>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
71 <param name="AF" value="0.9"/>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
72 <param name="AN" value="2"/>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
73 <param name="inputVCF" ftype="vcf" value="VCFFiltering_input.vcf" />
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
74 <output name="outputVCF" file="VCFFiltering_DP_4_200_output.vcf"/>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
75 </test>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
76 </tests>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
77 <help><![CDATA[
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
78 **Filters SNP on a VCF depending on depth, allele number and allele frequency**
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
79
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
80 -----
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
81
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
82 **what it does :**
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
83
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
84 VCFFiltering is a python script that allows to filter SNP results from freebayes on multiple criterias as once. The filters are :
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
85
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
86 - Allele number : number of possible allele at the genomic position
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
87 - Allele frequency : frenquency of the most represented allele ; note that if the most represented allele is the reference (a "." in the 4th column of the VCF, the allele frequency will still work but allele frequency should be under 1-x)
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
88 - Depth : Higher and lower bound of the depth ; the depth is the number of reads mapped on the genomic positions.
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
89
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
90 Depth can be automatically detected. If you do so, The 90 % of the positions with a depth closest to the most frequent depth will pass the filter.
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
91
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
92 This script has been developped to be used with freebayes output, on haploïd data.
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
93
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
94
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
95 .. class:: infomark
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
96
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
97 the VCF source is detected from the header. Please keep the header of your VCF file if you want to use this tool
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
98
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
99 -----
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
100
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
101 **input and output formats :**
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
102
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
103 input format is a VCF file obtaines with freebayes ; headers are necessary
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
104 you can also add some bed files to filter some specific regions.
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
105
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
106 output format is a filtered VCF file.
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
107
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
108 -----
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
109
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
110 **example :**
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
111
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
112
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
113 VCF input file: ::
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
114
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
115 ##fileformat=VCFv4.1
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
116 ##fileDate=20150126
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
117 ##source=freeBayes v0.9.13-2-ga830efd
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
118 ##reference=ref.fsa
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
119 ##phasing=none
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
120 ##commandline="freebayes --report-monomorphic --ploidy 2 -X -u -f ref.fsa strain_1.bam"
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
121 #CHROM POS ID REF ALT QUAL FILTER INFO FORMAT strain_1
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
122 chrom1 1 . T . . . DP=4;DPB=1;EPPR=5.18177;GTI=0;MQMR=36;NS=1;NUMALT=0;ODDS=0;PAIREDR=1;PQR=0;PRO=0;QR=38;RO=4;RPPR=5.18177 GT:DP:RO:QR:AO:QA:GL 0/0:4:4:38:.:.:0
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
123 chrom1 2 . A . . . DP=12;DPB=1;EPPR=5.18177;GTI=0;MQMR=36;NS=1;NUMALT=0;ODDS=0;PAIREDR=1;PQR=0;PRO=0;QR=38;RO=11;RPPR=5.18177 GT:DP:RO:QR:AO:QA:GL 0/0:12:11:38:.:.:0
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
124 chrom1 3 . T A . . DP=5;DPB=1;EPPR=5.18177;GTI=0;MQMR=36;NS=1;NUMALT=0;ODDS=0;PAIREDR=1;PQR=0;PRO=0;QR=38;AO=5;RPPR=5.18177 GT:DP:RO:QR:AO:QA:GL 0/0:5:0:38:5:.:0
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
125 chrom1 4 . G T . . DP=6;DPB=1;EPPR=5.18177;GTI=0;MQMR=36;NS=1;NUMALT=0;ODDS=0;PAIREDR=1;PQR=0;PRO=0;QR=38;AO=5;RPPR=5.18177 GT:DP:RO:QR:AO:QA:GL 0/0:6:1:38:5:.:0
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
126 chrom1 5 . C C . . DP=12;DPB=1;EPPR=5.18177;GTI=0;MQMR=36;NS=1;NUMALT=0;ODDS=0;PAIREDR=1;PQR=0;PRO=0;QR=38;AO=11;RPPR=5.18177 GT:DP:RO:QR:AO:QA:GL 0/0:12:1:38:11:.:0
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
127
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
128 purposed options: ::
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
129
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
130 - Calculate optimal depth range automatically = no
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
131 - minumum Depth = 5
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
132 - maximum Depth = 14
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
133 - minimum allele frequency = 0.9
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
134 - maximum allele number = 2
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
135
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
136 exemple result : ::
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
137
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
138 ##fileformat=VCFv4.1
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
139 ##fileDate=20150126
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
140 ##source=freeBayes v0.9.13-2-ga830efd
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
141 ##reference=ref.fsa
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
142 ##phasing=none
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
143 ##commandline="freebayes --report-monomorphic --ploidy 2 -X -u -f ref.fsa strain_1.bam"
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
144 #CHROM POS ID REF ALT QUAL FILTER INFO FORMAT strain_1
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
145 chrom1 1 . T . . G_DP DP=4;DPB=1;EPPR=5.18177;GTI=0;MQMR=36;NS=1;NUMALT=0;ODDS=0;PAIREDR=1;PQR=0;PRO=0;QR=38;RO=4;RPPR=5.18177;G_AN=0;G_AF=0.00;G_DP=4;G_Base=T GT:DP:RO:QR:AO:QA:GL 0/0:4:4:38:.:.:0
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
146 chrom1 2 . A . . . DP=12;DPB=1;EPPR=5.18177;GTI=0;MQMR=36;NS=1;NUMALT=0;ODDS=0;PAIREDR=1;PQR=0;PRO=0;QR=38;RO=11;RPPR=5.18177;G_AN=0;G_AF=0.08;G_DP=12;G_Base=A GT:DP:RO:QR:AO:QA:GL 0/0:12:11:38:.:.:0
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
147 chrom1 3 . T A . . DP=5;DPB=1;EPPR=5.18177;GTI=0;MQMR=36;NS=1;NUMALT=0;ODDS=0;PAIREDR=1;PQR=0;PRO=0;QR=38;AO=5;RPPR=5.18177;G_AN=0;G_AF=1.00;G_DP=5;G_Base=A GT:DP:RO:QR:AO:QA:GL 0/0:5:0:38:5:.:0
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
148 chrom1 4 . G T . G_AF DP=6;DPB=1;EPPR=5.18177;GTI=0;MQMR=36;NS=1;NUMALT=0;ODDS=0;PAIREDR=1;PQR=0;PRO=0;QR=38;AO=5;RPPR=5.18177;G_AN=0;G_AF=0.83;G_DP=6;G_Base=T GT:DP:RO:QR:AO:QA:GL 0/0:6:1:38:5:.:0
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
149 chrom1 5 . C C . . DP=12;DPB=1;EPPR=5.18177;GTI=0;MQMR=36;NS=1;NUMALT=0;ODDS=0;PAIREDR=1;PQR=0;PRO=0;QR=38;AO=11;RPPR=5.18177;G_AN=0;G_AF=0.92;G_DP=12;G_Base=C GT:DP:RO:QR:AO:QA:GL 0/0:12:1:38:11:.:0
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
150
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
151 -----
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
152
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
153 **reference :**
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
154
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
155 ]]>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
156 </help>
3552a8d9f51c Uploaded
urgi-team
parents:
diff changeset
157 </tool>