Mercurial > repos > jjohnson > pileup_to_vcf
annotate pileup_to_vcf.xml @ 9:c0a6e8f595ec default tip
Add option to set VCF ID field value, this can be used to ID germline variants for SnpSift
author | Jim Johnson <jj@umn.edu> |
---|---|
date | Thu, 11 Apr 2013 10:28:10 -0500 |
parents | 8688e29ba96f |
children |
rev | line source |
---|---|
9
c0a6e8f595ec
Add option to set VCF ID field value, this can be used to ID germline variants for SnpSift
Jim Johnson <jj@umn.edu>
parents:
5
diff
changeset
|
1 <tool id="pileup_to_vcf" name="Pileup to VCF" version="2.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 | |
9
c0a6e8f595ec
Add option to set VCF ID field value, this can be used to ID germline variants for SnpSift
Jim Johnson <jj@umn.edu>
parents:
5
diff
changeset
|
18 #if $vcf_id.__str__ != '': |
c0a6e8f595ec
Add option to set VCF ID field value, this can be used to ID germline variants for SnpSift
Jim Johnson <jj@umn.edu>
parents:
5
diff
changeset
|
19 --id $vcf_id |
c0a6e8f595ec
Add option to set VCF ID field value, this can be used to ID germline variants for SnpSift
Jim Johnson <jj@umn.edu>
parents:
5
diff
changeset
|
20 #end if |
0 | 21 #if $cols.select_order == 'yes' : |
22 #if $chrom_col.__str__ != '': | |
23 --chrom_col $chrom_col | |
24 #end if | |
25 #if $pos_col.__str__ != '': | |
26 --pos_col $pos_col | |
27 #end if | |
28 #if $ref_col.__str__ != '': | |
29 --ref_col $ref_col | |
30 #end if | |
31 #if $cvrg_col.__str__ != '': | |
32 --coverage_col $cvrg_col | |
33 #end if | |
34 #if $base_call_col.__str__ != '': | |
35 --base_call_col $base_call_col | |
36 #end if | |
37 #if $base_qual_col.__str__ != '': | |
38 --base_qual_col $base_qual_col | |
39 #end if | |
40 #end if | |
41 </command> | |
42 <inputs> | |
43 <param name="input_file" type="data" format="pileup,tabular" label="Source File" optional="false"/> | |
44 <conditional name="cols"> | |
45 <param name="select_order" type="select" label="Set column positions for non-standard pileup"> | |
46 <option value="no" selected="true">Use the default pileup columns</option> | |
47 <option value="yes">Select the column position that represents each pileup column</option> | |
48 </param> | |
49 <when value="no"/> | |
50 <when value="yes"> | |
51 <param name="chrom_col" type="data_column" data_ref="input_file" label="Chromosome Column"/> | |
52 <param name="pos_col" type="data_column" data_ref="input_file" label="Position Column"/> | |
53 <param name="ref_col" type="data_column" data_ref="input_file" label="Reference Base Column"/> | |
54 <param name="cvrg_col" type="data_column" data_ref="input_file" label="Depth Column"/> | |
55 <param name="base_call_col" type="data_column" data_ref="input_file" label="Base Call Column"/> | |
56 <param name="base_qual_col" type="data_column" data_ref="input_file" label="Base Quality Column"/> | |
57 </when> | |
58 </conditional> | |
59 <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"/> | |
60 <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"/> | |
61 <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."/> | |
62 <param name="allow_multiples" type="boolean" truevalue="-m" falsevalue="" chacked="true" label="Allow Multiple Alleles for a Position?" | |
63 help="Multiple alleles may be output in the VCF if the allowable frequency is below 0.5, otherwise only one will be reported"/> | |
64 <param name="snps_only" type="boolean" truevalue="-s" falsevalue="" chacked="false" label="Only report SNPs, not indels" /> | |
65 <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 | 66 <option value="source">Read coverage reported in pileup</option> |
67 <option value="ref" selected="true">Reads at this position that have a base call</option> | |
0 | 68 <option value="qual">Reads at this position taht pass the base call quality threshold</option> |
2 | 69 <option value="all">All reads and indels</option> |
0 | 70 </param> |
9
c0a6e8f595ec
Add option to set VCF ID field value, this can be used to ID germline variants for SnpSift
Jim Johnson <jj@umn.edu>
parents:
5
diff
changeset
|
71 <param name="vcf_id" type="text" optional="true" value="" label="The VCF ID" help="The VCF output will use this as the ID field value"> |
c0a6e8f595ec
Add option to set VCF ID field value, this can be used to ID germline variants for SnpSift
Jim Johnson <jj@umn.edu>
parents:
5
diff
changeset
|
72 <validator type="regex" message="whitespace characters not allowed">^\S*$</validator> |
c0a6e8f595ec
Add option to set VCF ID field value, this can be used to ID germline variants for SnpSift
Jim Johnson <jj@umn.edu>
parents:
5
diff
changeset
|
73 </param> |
0 | 74 </inputs> |
75 <outputs> | |
76 <data format="vcf" metadata_source="input_file" name="output_file" /> | |
77 </outputs> | |
78 <stdio> | |
79 <exit_code range="1:" level="fatal" description="Bad input dataset" /> | |
80 </stdio> | |
81 <tests> | |
82 <test> | |
83 <param name="input_file" ftype="pileup" value="test.pileup" /> | |
84 <param name="select_order" value="no"/> | |
85 <param name="min_base_qual" value="0"/> | |
86 <param name="min_cvrg" value="0"/> | |
87 <param name="min_var_pct" value=".1"/> | |
88 <param name="allow_multiples" value="True"/> | |
89 <param name="snps_only" value="False"/> | |
90 <param name="depth_as" value="ref"/> | |
91 <output name="output_file"> | |
92 <assert_contents> | |
93 <has_text_matching expression="seq2\t156\t.\tA\tG,AAG\t.\tPASS\t.*" /> | |
94 <has_text_matching expression="chr1\t158571283\t.\tA\tC,T\t.\tPASS\t.*" /> | |
95 </assert_contents> | |
96 </output> | |
97 </test> | |
98 <test> | |
99 <param name="input_file" ftype="pileup" value="test.pileup" /> | |
100 <param name="select_order" value="no"/> | |
5 | 101 <param name="min_base_qual" value="5"/> |
0 | 102 <param name="min_cvrg" value="5"/> |
103 <param name="min_var_pct" value=".1"/> | |
104 <param name="allow_multiples" value="True"/> | |
105 <param name="snps_only" value="False"/> | |
106 <param name="depth_as" value="ref"/> | |
107 <output name="output_file"> | |
108 <assert_contents> | |
109 <has_text_matching expression="seq2\t156\t.\tA\tG,AAG\t.\tPASS\t.*" /> | |
5 | 110 <has_text_matching expression="chr1\t158571283\t.\tA\tT\t.\tPASS\t.*" /> |
111 <not_has_text text="125070485" /> | |
0 | 112 </assert_contents> |
113 </output> | |
114 </test> | |
115 | |
116 </tests> | |
117 <help> | |
118 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. | |
119 </help> | |
120 </tool> |