comparison pileup_to_vcf.xml @ 0:3890f8ba0e4d

Uploaded
author jjohnson
date Mon, 18 Feb 2013 11:32:50 -0500
parents
children d6de2d1f4af9
comparison
equal deleted inserted replaced
-1:000000000000 0:3890f8ba0e4d
1 <tool id="pileup_to_vcf" name="Pileup to VCF" version="2.0">
2 <description>Converts a pileup to VCF with filtering</description>
3 <command interpreter="python">pileup_to_vcf.py -i $input_file -o $output_file
4 #if $min_cvrg.__str__ != '':
5 --min_coverage $min_cvrg
6 #end if
7 #if $min_base_qual.__str__ != '':
8 --min_base_qual $min_base_qual
9 #end if
10 #if $min_var_pct.__str__ != '':
11 --min_allele_freq $min_var_pct
12 #end if
13 #if $depth_as.__str__ != 'None':
14 --report_depth $depth_as
15 #end if
16 $allow_multiples
17 $snps_only
18 #if $cols.select_order == 'yes' :
19 #if $chrom_col.__str__ != '':
20 --chrom_col $chrom_col
21 #end if
22 #if $pos_col.__str__ != '':
23 --pos_col $pos_col
24 #end if
25 #if $ref_col.__str__ != '':
26 --ref_col $ref_col
27 #end if
28 #if $cvrg_col.__str__ != '':
29 --coverage_col $cvrg_col
30 #end if
31 #if $base_call_col.__str__ != '':
32 --base_call_col $base_call_col
33 #end if
34 #if $base_qual_col.__str__ != '':
35 --base_qual_col $base_qual_col
36 #end if
37 #end if
38 </command>
39 <inputs>
40 <param name="input_file" type="data" format="pileup,tabular" label="Source File" optional="false"/>
41 <conditional name="cols">
42 <param name="select_order" type="select" label="Set column positions for non-standard pileup">
43 <option value="no" selected="true">Use the default pileup columns</option>
44 <option value="yes">Select the column position that represents each pileup column</option>
45 </param>
46 <when value="no"/>
47 <when value="yes">
48 <param name="chrom_col" type="data_column" data_ref="input_file" label="Chromosome Column"/>
49 <param name="pos_col" type="data_column" data_ref="input_file" label="Position Column"/>
50 <param name="ref_col" type="data_column" data_ref="input_file" label="Reference Base Column"/>
51 <param name="cvrg_col" type="data_column" data_ref="input_file" label="Depth Column"/>
52 <param name="base_call_col" type="data_column" data_ref="input_file" label="Base Call Column"/>
53 <param name="base_qual_col" type="data_column" data_ref="input_file" label="Base Quality Column"/>
54 </when>
55 </conditional>
56 <param name="min_base_qual" type="integer" label="Minimum Base Quality" optional="true" value="20" help="Don't consider a read if the base call quality is below this threshold"/>
57 <param name="min_cvrg" type="integer" label="Minimum Coverage Depth" optional="true" value="5" help="Any position below the threshold will be omitted from the resulting VCF"/>
58 <param name="min_var_pct" type="float" label="Minimum Frequency of a Specific Allele" option="true" value="0.5" help="If an allele does not meet the minimum frequency it will be omitted from the resulting VCF."/>
59 <param name="allow_multiples" type="boolean" truevalue="-m" falsevalue="" chacked="true" label="Allow Multiple Alleles for a Position?"
60 help="Multiple alleles may be output in the VCF if the allowable frequency is below 0.5, otherwise only one will be reported"/>
61 <param name="snps_only" type="boolean" truevalue="-s" falsevalue="" chacked="false" label="Only report SNPs, not indels" />
62 <param name="depth_as" type="select" label="Report DP and SAF with read coverage of" help="The reported read voverage depth: DP, and the calculation of specific allele frequency (SAF) of variants">
63 <option value="ref" selected="true">Reads at this position</option>
64 <option value="qual">Reads at this position taht pass the base call quality threshold</option>
65 <option value="all"></option>
66 </param>
67 </inputs>
68 <outputs>
69 <data format="vcf" metadata_source="input_file" name="output_file" />
70 </outputs>
71 <stdio>
72 <exit_code range="1:" level="fatal" description="Bad input dataset" />
73 </stdio>
74 <tests>
75 <test>
76 <param name="input_file" ftype="pileup" value="test.pileup" />
77 <param name="select_order" value="no"/>
78 <param name="min_base_qual" value="0"/>
79 <param name="min_cvrg" value="0"/>
80 <param name="min_var_pct" value=".1"/>
81 <param name="allow_multiples" value="True"/>
82 <param name="snps_only" value="False"/>
83 <param name="depth_as" value="ref"/>
84 <output name="output_file">
85 <assert_contents>
86 <has_text_matching expression="seq2\t156\t.\tA\tG,AAG\t.\tPASS\t.*" />
87 <has_text_matching expression="chr1\t158571283\t.\tA\tC,T\t.\tPASS\t.*" />
88 </assert_contents>
89 </output>
90 </test>
91 <test>
92 <param name="input_file" ftype="pileup" value="test.pileup" />
93 <param name="select_order" value="no"/>
94 <param name="min_base_qual" value="20"/>
95 <param name="min_cvrg" value="5"/>
96 <param name="min_var_pct" value=".1"/>
97 <param name="allow_multiples" value="True"/>
98 <param name="snps_only" value="False"/>
99 <param name="depth_as" value="ref"/>
100 <output name="output_file">
101 <assert_contents>
102 <has_text_matching expression="seq2\t156\t.\tA\tG,AAG\t.\tPASS\t.*" />
103 <has_text_matching expression="chr1\t158571283\t.\tA\tC\t.\tPASS\t.*" />
104 </assert_contents>
105 </output>
106 </test>
107
108 </tests>
109 <help>
110 Pileup to VCF converts the output of a pileup tool to a VCF representing any alleles that surpass a user specified frequency, optionally presenting multiple alleles for a given position if the allele frequency is set below 0.5. This tool assumes that any filtering for base call quality and mapping quality has been done in previous processing.
111 </help>
112 </tool>