comparison consolidate_vcfs.xml @ 0:b42c82186e85 draft

"planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 90a172f1fc12b9c4d73f4c924a8c0c5a559589d0"
author nml
date Tue, 27 Aug 2019 12:30:25 -0400
parents
children 4c249c0aebad
comparison
equal deleted inserted replaced
-1:000000000000 0:b42c82186e85
1 <tool id="consolidate_vcfs" name="Consolidate VCFs" version ="1.8.2">
2 <description>combine freebayes and mpileup files for use by vcf2snvalignment</description>
3 <requirements>
4 <requirement type="package" version="1.8.2">snvphyl-tools</requirement>
5 </requirements>
6 <command detect_errors="exit_code"><![CDATA[
7
8 #set $name = str($freebayes).split('/')[-1]
9 ln -f -s $freebayes &&
10
11 #if $freebayes.metadata.bcf_index:
12 ln -s '${$freebayes.metadata.bcf_index}' ${name}.csi &&
13 #else
14 bcftools index $name &&
15 #end if
16
17
18 #set $name = str($mpileup).split('/')[-1]
19 ln -f -s $mpileup &&
20
21 #if $mpileup.metadata.bcf_index:
22 ln -s '${$mpileup.metadata.bcf_index}' ${name}.csi &&
23 #else
24 bcftools index $name &&
25 #end if
26
27 consolidate_vcfs.pl
28
29
30 -c "$coverage"
31 --min-mean-mapping "$mean_mapping"
32 --snv-abundance-ratio "$snv_abundance_ratio"
33
34 #set $path = str($freebayes).split('/')[-1]
35 --vcfsplit "$path"
36
37 #set $path = str($mpileup).split('/')[-1]
38 --mpileup "$path"
39
40 #set $path = str($path).split('/')[-1]
41 #if $filtered_density:
42 --filtered-density-out "$filtered_density"
43 #end if
44
45 #if $use_density_filter.select_list == "no":
46 --skip-density-filter
47 #else
48 #if $use_density_filter.window_size:
49 --window-size "$use_density_filter.window_size"
50 #end if
51 #if $use_density_filter.threshold:
52 --density-threshold "$use_density_filter.threshold"
53 #end if
54 #end if
55
56 ##mark where the output files will be sent to, simply have to match them up later in the xml output section
57 -o $bcf_combined
58 ]]>
59 </command>
60 <inputs>
61 <param name="coverage" type="integer" value="15" label="Minimum coverage"/>
62 <param name="mean_mapping" type="integer" value="30" label="Minimum mean mapping quality"/>
63 <param name="snv_abundance_ratio" type="text" value="0.75" optional="false" label="SNV abundance ratio"/>
64 <param name="freebayes" type="data" label="FreeBayes filtered BCF" help="" optional="false" format="bcf_bgzip,bcf" />
65 <param name="mpileup" type="data" label="Mpileup BCF" help="" optional="false" format="bcf_bgzip,bcf" />
66 <conditional name="use_density_filter">
67 <param name="select_list" type="select" label= "SNV density filtering">
68 <option value="yes">Apply</option>
69 <option value="no">Don't apply</option>
70 </param>
71 <when value="yes">
72 <param name="window_size" type="integer" label="Size of search window" format="" optional="false" value="100"/>
73 <param name="threshold" type="integer" label="Density threshold cutoff" format="" optional="false" value="10"/>
74 </when>
75 <when value="no">
76 </when>
77 </conditional>
78 </inputs>
79 <outputs>
80 <data format="bcf_bgzip" name="bcf_combined"/>
81 <data format="txt" name="filtered_density" label="High density regions"/>
82 </outputs>
83 <tests>
84 <test>
85 <param name="coverage" value="5"/>
86 <param name="freebayes" value="freebayes/v1.bcf" />
87 <param name="mpileup" value="mpileup/v1.bcf" />
88 <param name="mean_mapping" value="30" />
89 <param name="snv_abundance_ratio" value="0.75" />
90 <param name="window_size" value="500" />
91 <param name="threshold" value="2" />
92 <output name="bcf_combined" file="v1.bcf.gz" compare="sim_size" delta="500"/>
93 <output name="filtered_density" file="expected_regions.txt"/>
94 </test>
95 <test>
96 <param name="coverage" value="5"/>
97 <param name="freebayes" value="freebayes/v2.bcf" />
98 <param name="mpileup" value="mpileup/v2.bcf" />
99 <param name="mean_mapping" value="30" />
100 <param name="snv_abundance_ratio" value="0.75" />
101 <param name="window_size" value="500" />
102 <param name="threshold" value="2" />
103 <output name="bcf_combined" file="v2.bcf.gz" compare="sim_size" delta="500"/>
104 <output name="filtered_density" file="expected_regions.txt"/>
105 </test>
106 </tests>
107
108 <help>
109 Merges variant and non-variant calls (in VCF format) produced from two independent base callers, FreeBayes, and SAMtools/BCFtools. Produces a merged set of high-quality variant and non-variant calls (in BCF format). Optionally, produces a list of SNV-dense regions above the passed thresholds.
110 </help>
111
112 <citations>
113 </citations>
114
115 </tool>