annotate pileup_to_vcf.xml @ 4:fafa105e5f58

Fix base quality
author Jim Johnson <jj@umn.edu>
date Tue, 19 Mar 2013 13:04:40 -0500
parents d6de2d1f4af9
children 8688e29ba96f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
fafa105e5f58 Fix base quality
Jim Johnson <jj@umn.edu>
parents: 2
diff changeset
1 <tool id="pileup_to_vcf" name="Pileup to VCF" version="2.1">
0
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
2 <description>Converts a pileup to VCF with filtering</description>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
3 <command interpreter="python">pileup_to_vcf.py -i $input_file -o $output_file
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
4 #if $min_cvrg.__str__ != '':
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
5 --min_coverage $min_cvrg
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
6 #end if
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
7 #if $min_base_qual.__str__ != '':
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
8 --min_base_qual $min_base_qual
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
9 #end if
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
10 #if $min_var_pct.__str__ != '':
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
11 --min_allele_freq $min_var_pct
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
12 #end if
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
13 #if $depth_as.__str__ != 'None':
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
14 --report_depth $depth_as
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
15 #end if
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
16 $allow_multiples
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
17 $snps_only
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
18 #if $cols.select_order == 'yes' :
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
19 #if $chrom_col.__str__ != '':
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
20 --chrom_col $chrom_col
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
21 #end if
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
22 #if $pos_col.__str__ != '':
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
23 --pos_col $pos_col
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
24 #end if
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
25 #if $ref_col.__str__ != '':
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
26 --ref_col $ref_col
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
27 #end if
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
28 #if $cvrg_col.__str__ != '':
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
29 --coverage_col $cvrg_col
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
30 #end if
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
31 #if $base_call_col.__str__ != '':
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
32 --base_call_col $base_call_col
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
33 #end if
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
34 #if $base_qual_col.__str__ != '':
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
35 --base_qual_col $base_qual_col
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
36 #end if
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
37 #end if
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
38 </command>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
39 <inputs>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
40 <param name="input_file" type="data" format="pileup,tabular" label="Source File" optional="false"/>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
41 <conditional name="cols">
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
42 <param name="select_order" type="select" label="Set column positions for non-standard pileup">
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
43 <option value="no" selected="true">Use the default pileup columns</option>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
44 <option value="yes">Select the column position that represents each pileup column</option>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
45 </param>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
46 <when value="no"/>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
47 <when value="yes">
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
48 <param name="chrom_col" type="data_column" data_ref="input_file" label="Chromosome Column"/>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
49 <param name="pos_col" type="data_column" data_ref="input_file" label="Position Column"/>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
50 <param name="ref_col" type="data_column" data_ref="input_file" label="Reference Base Column"/>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
51 <param name="cvrg_col" type="data_column" data_ref="input_file" label="Depth Column"/>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
52 <param name="base_call_col" type="data_column" data_ref="input_file" label="Base Call Column"/>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
53 <param name="base_qual_col" type="data_column" data_ref="input_file" label="Base Quality Column"/>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
54 </when>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
55 </conditional>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
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"/>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
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"/>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
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."/>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
59 <param name="allow_multiples" type="boolean" truevalue="-m" falsevalue="" chacked="true" label="Allow Multiple Alleles for a Position?"
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
60 help="Multiple alleles may be output in the VCF if the allowable frequency is below 0.5, otherwise only one will be reported"/>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
61 <param name="snps_only" type="boolean" truevalue="-s" falsevalue="" chacked="false" label="Only report SNPs, not indels" />
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
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">
2
d6de2d1f4af9 Fix read depth reporting
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
63 <option value="source">Read coverage reported in pileup</option>
d6de2d1f4af9 Fix read depth reporting
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
64 <option value="ref" selected="true">Reads at this position that have a base call</option>
0
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
65 <option value="qual">Reads at this position taht pass the base call quality threshold</option>
2
d6de2d1f4af9 Fix read depth reporting
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
66 <option value="all">All reads and indels</option>
0
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
67 </param>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
68 </inputs>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
69 <outputs>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
70 <data format="vcf" metadata_source="input_file" name="output_file" />
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
71 </outputs>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
72 <stdio>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
73 <exit_code range="1:" level="fatal" description="Bad input dataset" />
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
74 </stdio>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
75 <tests>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
76 <test>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
77 <param name="input_file" ftype="pileup" value="test.pileup" />
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
78 <param name="select_order" value="no"/>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
79 <param name="min_base_qual" value="0"/>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
80 <param name="min_cvrg" value="0"/>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
81 <param name="min_var_pct" value=".1"/>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
82 <param name="allow_multiples" value="True"/>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
83 <param name="snps_only" value="False"/>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
84 <param name="depth_as" value="ref"/>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
85 <output name="output_file">
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
86 <assert_contents>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
87 <has_text_matching expression="seq2\t156\t.\tA\tG,AAG\t.\tPASS\t.*" />
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
88 <has_text_matching expression="chr1\t158571283\t.\tA\tC,T\t.\tPASS\t.*" />
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
89 </assert_contents>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
90 </output>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
91 </test>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
92 <test>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
93 <param name="input_file" ftype="pileup" value="test.pileup" />
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
94 <param name="select_order" value="no"/>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
95 <param name="min_base_qual" value="20"/>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
96 <param name="min_cvrg" value="5"/>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
97 <param name="min_var_pct" value=".1"/>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
98 <param name="allow_multiples" value="True"/>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
99 <param name="snps_only" value="False"/>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
100 <param name="depth_as" value="ref"/>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
101 <output name="output_file">
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
102 <assert_contents>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
103 <has_text_matching expression="seq2\t156\t.\tA\tG,AAG\t.\tPASS\t.*" />
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
104 <has_text_matching expression="chr1\t158571283\t.\tA\tC\t.\tPASS\t.*" />
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
105 </assert_contents>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
106 </output>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
107 </test>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
108
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
109 </tests>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
110 <help>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
111 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.
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
112 </help>
3890f8ba0e4d Uploaded
jjohnson
parents:
diff changeset
113 </tool>