comparison consolidate_vcfs.xml @ 1:4c249c0aebad draft default tip

"planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 57067916cb7b9c5b65c1da59d4bbb846c3e3af2f"
author nml
date Tue, 23 Jun 2020 10:25:20 -0400
parents b42c82186e85
children
comparison
equal deleted inserted replaced
0:b42c82186e85 1:4c249c0aebad
1 <tool id="consolidate_vcfs" name="Consolidate VCFs" version ="1.8.2"> 1 <tool id="consolidate_vcfs" name="Consolidate VCFs" version ="@VERSION@+galaxy1">
2 <description>combine freebayes and mpileup files for use by vcf2snvalignment</description> 2 <description>combine freebayes and mpileup files for use by vcf2snvalignment</description>
3 <requirements> 3 <macros>
4 <requirement type="package" version="1.8.2">snvphyl-tools</requirement> 4 <import>macros.xml</import>
5 </requirements> 5 </macros>
6 <expand macro="requirements"/>
6 <command detect_errors="exit_code"><![CDATA[ 7 <command detect_errors="exit_code"><![CDATA[
7 8
8 #set $name = str($freebayes).split('/')[-1] 9 #set $name = str($freebayes).split('/')[-1]
9 ln -f -s $freebayes && 10 ln -f -s $freebayes &&
10 11
22 ln -s '${$mpileup.metadata.bcf_index}' ${name}.csi && 23 ln -s '${$mpileup.metadata.bcf_index}' ${name}.csi &&
23 #else 24 #else
24 bcftools index $name && 25 bcftools index $name &&
25 #end if 26 #end if
26 27
28 ## If there is no density filtering performed we still need to output an empty file
29 #if not $use_density_filter:
30 echo '#No density filtering' > '$filtered_density' &&
31 #end if
32
27 consolidate_vcfs.pl 33 consolidate_vcfs.pl
28 34
29 35
30 -c "$coverage" 36 -c "$coverage"
31 --min-mean-mapping "$mean_mapping" 37 --min-mean-mapping "$mean_mapping"
35 --vcfsplit "$path" 41 --vcfsplit "$path"
36 42
37 #set $path = str($mpileup).split('/')[-1] 43 #set $path = str($mpileup).split('/')[-1]
38 --mpileup "$path" 44 --mpileup "$path"
39 45
40 #set $path = str($path).split('/')[-1] 46 #if not $use_density_filter:
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 --skip-density-filter
47 #else 48 #else
48 #if $use_density_filter.window_size: 49 #if $filtered_density:
49 --window-size "$use_density_filter.window_size" 50 --filtered-density-out '$filtered_density'
50 #end if 51 #end if
51 #if $use_density_filter.threshold: 52
52 --density-threshold "$use_density_filter.threshold" 53 #if $window_size:
54 --window-size "$window_size"
55 #end if
56 #if $threshold:
57 --density-threshold "$threshold"
53 #end if 58 #end if
54 #end if 59 #end if
55 60
56 ##mark where the output files will be sent to, simply have to match them up later in the xml output section 61 ##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 62 -o $bcf_combined
63
58 ]]> 64 ]]>
59 </command> 65 </command>
60 <inputs> 66 <inputs>
61 <param name="coverage" type="integer" value="15" label="Minimum coverage"/> 67 <param name="coverage" type="integer" value="15" label="Minimum coverage" help="(--coverage-cutoff)" />
62 <param name="mean_mapping" type="integer" value="30" label="Minimum mean mapping quality"/> 68 <param name="mean_mapping" type="integer" value="30" label="Minimum mean mapping quality" help="(--min-mean-mapping)" />
63 <param name="snv_abundance_ratio" type="text" value="0.75" optional="false" label="SNV abundance ratio"/> 69 <param name="snv_abundance_ratio" type="text" value="0.75" optional="false" label="SNV abundance ratio" help="(--snv-abundance-ratio)" />
64 <param name="freebayes" type="data" label="FreeBayes filtered BCF" help="" optional="false" format="bcf_bgzip,bcf" /> 70 <param name="freebayes" type="data" label="FreeBayes filtered BCF" optional="false" format="bcf_bgzip,bcf" help="(--vcfsplit)" />
65 <param name="mpileup" type="data" label="Mpileup BCF" help="" optional="false" format="bcf_bgzip,bcf" /> 71 <param name="mpileup" type="data" label="Mpileup BCF" optional="false" format="bcf_bgzip,bcf" help="(--mpileup)" />
66 <conditional name="use_density_filter"> 72 <param name="use_density_filter" type="boolean" checked="true" label="Apply SNV density filtering" help="(--skip-density-filter)" />
67 <param name="select_list" type="select" label= "SNV density filtering"> 73 <param name="window_size" type="integer" min="1" label="SNV Density Filtering: Size of search window" format="" optional="false" value="500"
68 <option value="yes">Apply</option> 74 help="(--window-size) Size of the search window used to find high-density SNV regions. Only valid if density filtering is enabled." />
69 <option value="no">Don't apply</option> 75 <param name="threshold" type="integer" min="1" label="SNV Density Filtering: Density threshold cutoff" format="" optional="false" value="2"
70 </param> 76 help="(--density-threshold) The SNV threshold within a window to determine of this is a high-density SNV region. Only valid if density filtering is enabled." />
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> 77 </inputs>
79 <outputs> 78 <outputs>
80 <data format="bcf_bgzip" name="bcf_combined"/> 79 <data format="bcf_bgzip" name="bcf_combined"/>
81 <data format="txt" name="filtered_density" label="High density regions"/> 80 <data format="txt" name="filtered_density" label="High density regions"/>
82 </outputs> 81 </outputs>
85 <param name="coverage" value="5"/> 84 <param name="coverage" value="5"/>
86 <param name="freebayes" value="freebayes/v1.bcf" /> 85 <param name="freebayes" value="freebayes/v1.bcf" />
87 <param name="mpileup" value="mpileup/v1.bcf" /> 86 <param name="mpileup" value="mpileup/v1.bcf" />
88 <param name="mean_mapping" value="30" /> 87 <param name="mean_mapping" value="30" />
89 <param name="snv_abundance_ratio" value="0.75" /> 88 <param name="snv_abundance_ratio" value="0.75" />
89 <param name="use_density_filter" value="true" />
90 <param name="window_size" value="500" /> 90 <param name="window_size" value="500" />
91 <param name="threshold" value="2" /> 91 <param name="threshold" value="2" />
92 <output name="bcf_combined" file="v1.bcf.gz" compare="sim_size" delta="500"/> 92 <output name="bcf_combined" file="v1.bcf.gz" compare="sim_size" delta="500"/>
93 <output name="filtered_density" file="expected_regions.txt"/> 93 <output name="filtered_density" file="expected_regions_empty.txt"/>
94 </test> 94 </test>
95 <test> 95 <test>
96 <param name="coverage" value="5"/> 96 <param name="coverage" value="5"/>
97 <param name="freebayes" value="freebayes/v2.bcf" /> 97 <param name="freebayes" value="freebayes/v2.bcf" />
98 <param name="mpileup" value="mpileup/v2.bcf" /> 98 <param name="mpileup" value="mpileup/v2.bcf" />
99 <param name="mean_mapping" value="30" /> 99 <param name="mean_mapping" value="30" />
100 <param name="snv_abundance_ratio" value="0.75" /> 100 <param name="snv_abundance_ratio" value="0.75" />
101 <param name="use_density_filter" value="true" />
101 <param name="window_size" value="500" /> 102 <param name="window_size" value="500" />
102 <param name="threshold" value="2" /> 103 <param name="threshold" value="2" />
103 <output name="bcf_combined" file="v2.bcf.gz" compare="sim_size" delta="500"/> 104 <output name="bcf_combined" file="v2.bcf.gz" compare="sim_size" delta="500"/>
104 <output name="filtered_density" file="expected_regions.txt"/> 105 <output name="filtered_density" file="expected_regions_empty.txt"/>
106 </test>
107 <test>
108 <param name="coverage" value="5"/>
109 <param name="freebayes" value="freebayes/v3.bcf" />
110 <param name="mpileup" value="mpileup/v3.bcf" />
111 <param name="mean_mapping" value="30" />
112 <param name="snv_abundance_ratio" value="0.75" />
113 <param name="use_density_filter" value="true" />
114 <param name="window_size" value="10" />
115 <param name="threshold" value="3" />
116 <output name="bcf_combined" file="v3.bcf.gz" compare="sim_size" delta="250"/>
117 <output name="filtered_density" file="expected_regions_v3.txt"/>
118 </test>
119 <test>
120 <param name="coverage" value="5"/>
121 <param name="freebayes" value="freebayes/v3.bcf" />
122 <param name="mpileup" value="mpileup/v3.bcf" />
123 <param name="mean_mapping" value="30" />
124 <param name="snv_abundance_ratio" value="0.75" />
125 <param name="use_density_filter" value="true" />
126 <param name="window_size" value="10" />
127 <param name="threshold" value="4" />
128 <output name="bcf_combined" file="v3.bcf.gz" compare="sim_size" delta="250"/>
129 <output name="filtered_density" file="expected_regions_empty.txt"/>
130 </test>
131 <test>
132 <param name="coverage" value="5"/>
133 <param name="freebayes" value="freebayes/v3.bcf" />
134 <param name="mpileup" value="mpileup/v3.bcf" />
135 <param name="mean_mapping" value="30" />
136 <param name="snv_abundance_ratio" value="0.75" />
137 <param name="window_size" value="1" />
138 <param name="threshold" value="2" />
139 <output name="bcf_combined" file="v3.bcf.gz" compare="sim_size" delta="250"/>
140 <output name="filtered_density" file="expected_regions_empty.txt"/>
141 </test>
142 <test>
143 <param name="coverage" value="5"/>
144 <param name="freebayes" value="freebayes/v3.bcf" />
145 <param name="mpileup" value="mpileup/v3.bcf" />
146 <param name="mean_mapping" value="30" />
147 <param name="snv_abundance_ratio" value="0.75" />
148 <param name="use_density_filter" value="false" />
149 <param name="window_size" value="10" />
150 <param name="threshold" value="3" />
151 <output name="bcf_combined" file="v3.bcf.gz" compare="sim_size" delta="250"/>
152 <output name="filtered_density" file="expected_regions_disabled.txt"/>
105 </test> 153 </test>
106 </tests> 154 </tests>
107 155
108 <help> 156 <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. 157 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> 158 </help>
111 159 <expand macro="citations"/>
112 <citations>
113 </citations>
114
115 </tool> 160 </tool>