comparison filter.xml @ 0:a75e05f20a66 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/delly commit 86ada42b811af0262618636f2d8d1788274f9884"
author iuc
date Mon, 28 Sep 2020 07:44:40 +0000
parents
children 9919057a466c
comparison
equal deleted inserted replaced
-1:000000000000 0:a75e05f20a66
1 <?xml version="1.0"?>
2 <tool id="delly_filter" name="Delly filter" version="@TOOL_VERSION@+galaxy0" profile="18.01">
3 <description>somatic or germline structural variants</description>
4 <macros>
5 <import>macros.xml</import>
6 </macros>
7 <expand macro="requirements"/>
8 <expand macro="version_command"/>
9 <command detect_errors="exit_code"><![CDATA[
10 ## initialize
11 #if $samples.is_of_type('vcf')
12 bcftools view -Ob '$samples' > 'sample.bcf.gz' &&
13 bcftools index 'sample.bcf.gz' &&
14 #else
15 ln -s '${samples}' 'sample.bcf.gz' &&
16 ln -s '${samples.metadata.bcf_index}' 'sample.bcf.gz.csi' &&
17 #end if
18
19 ## run
20 delly filter
21 ## generic options
22 --filter $sv.mode_cond.mode_sel
23 --outfile 'result.bcf'
24 --altaf $generic.altaf
25 --minsize $generic.minsize
26 --maxsize $generic.maxsize
27 --ratiogeno $generic.ratiogeno
28 $generic.pass
29 ## somatic options
30 #if $sv.mode_cond.mode_sel == 'somatic'
31 --samples '$sv.mode_cond.samples'
32 --coverage $sv.mode_cond.coverage
33 --controlcontamination $sv.mode_cond.controlcontamination
34 #end if
35 ## germline options
36 #if $sv.mode_cond.mode_sel == 'germline'
37 --gq $sv.mode_cond.gq
38 --rddel $sv.mode_cond.rddel
39 --rddup $sv.mode_cond.rddup
40 #end if
41 ## samples
42 'sample.bcf.gz' ## input
43
44 ## postprocessing
45 #if 'log' in $oo.out
46 |& tee 'log.txt'
47 #end if
48 #if 'vcf' in $oo.out
49 && test -f 'result.bcf' && bcftools view 'result.bcf' > 'result.vcf' || echo 'No results.'
50 #end if
51 ]]></command>
52 <inputs>
53 <expand macro="samples" format="bcf,vcf" multiple="false" label="Select file"/>
54 <section name="generic" title="Generic options" expanded="true">
55 <param argument="--altaf" type="float" value="0.2" min="0.0" max="1.0" label="Set minimum fractional ALT support"/>
56 <param argument="--minsize" type="integer" value="0" label="Set minimum SV size"/>
57 <param argument="--maxsize" type="integer" value="500000000" label="Set maximum SV size"/>
58 <param argument="--ratiogeno" type="float" value="0.75" min="0.0" max="1.0" label="Set minimum fraction of genotyped samples"/>
59 <param argument="--pass" type="boolean" truevalue="--pass" falsevalue="" label="Filter sites for PASS?"/>
60 </section>
61 <section name="sv" title="SV calling options" expanded="true">
62 <conditional name="mode_cond">
63 <param argument="mode_sel" type="select" label="Select filter mode">
64 <option value="somatic" selected="true">Somatic</option>
65 <option value="germline">Germline</option>
66 </param>
67 <when value="somatic">
68 <param argument="--samples" type="data" format="tabular" label="Select sample file" help="Two-column sample file listing sample name and tumor or control."/>
69 <param argument="--coverage" type="integer" value="10" label="Set minimum coverage in tumor."/>
70 <param argument="--controlcontamination" type="float" value="0.0" min="0.0" max="1.0" label="Set maximum fractional ALT support in control"/>
71 </when>
72 <when value="germline">
73 <param argument="--gq" type="integer" value="15" label="Set minimum median GQ for carriers and non-carriers"/>
74 <param argument="--rddel" type="float" value="0.8" label="Set maximum read-depth ratio of carrier vs. non-carrier for a deletion"/>
75 <param argument="--rddup" type="float" value="1.2" label="Set minimum read-depth ratio of carrier vs. non-carrier for a duplication"/>
76 </when>
77 </conditional>
78 </section>
79 <section name="oo" title="Output options">
80 <param name="out" type="select" multiple="true" optional="false" label="Select output file(s)">
81 <option value="bcf" selected="true">BCF</option>
82 <option value="vcf">VCF</option>
83 <option value="log">Log</option>
84 </param>
85 </section>
86 </inputs>
87 <outputs>
88 <expand macro="vcf"/>
89 <expand macro="bcf"/>
90 <expand macro="log"/>
91 </outputs>
92 <tests>
93 <!-- #1 default, somatic, bcf -->
94 <test expect_num_outputs="2">
95 <param name="samples" value="call_1.bcf.gz"/>
96 <section name="sv">
97 <conditional name="mode_cond">
98 <param name="mode_sel" value="somatic"/>
99 <param name="samples" value="samples.tsv"/>
100 </conditional>
101 </section>
102 <section name="oo">
103 <param name="out" value="vcf,bcf"/>
104 </section>
105 <output name="out_bcf">
106 <assert_contents>
107 <has_size value="2281" delta="10"/>
108 </assert_contents>
109 </output>
110 <output name="out_vcf">
111 <assert_contents>
112 <has_n_lines n="140"/>
113 <has_line line="##fileformat=VCFv4.2"/>
114 <has_line line="#CHROM&#009;POS&#009;ID&#009;REF&#009;ALT&#009;QUAL&#009;FILTER&#009;INFO&#009;FORMAT&#009;NORMAL&#009;TUMOR"/>
115 </assert_contents>
116 </output>
117 </test>
118 <!-- #2 somatic, bcf -->
119 <test expect_num_outputs="3">
120 <param name="samples" value="call_1.bcf.gz"/>
121 <section name="generic">
122 <param name="altaf" value="0.3"/>
123 <param name="minsize" value="1"/>
124 <param name="maxsize" value="500000001"/>
125 <param name="ratiogeno" value="0.76"/>
126 <param name="pass" value="true"/>
127 </section>
128 <section name="sv">
129 <conditional name="mode_cond">
130 <param name="mode_sel" value="somatic"/>
131 <param name="samples" value="samples.tsv"/>
132 <param name="coverage" value="11"/>
133 <param name="controlcontamination" value="0.1"/>
134 </conditional>
135 </section>
136 <section name="oo">
137 <param name="out" value="vcf,bcf,log"/>
138 </section>
139 <output name="out_bcf">
140 <assert_contents>
141 <has_size value="2281" delta="10"/>
142 </assert_contents>
143 </output>
144 <output name="out_vcf">
145 <assert_contents>
146 <has_n_lines n="140"/>
147 <has_line line="##fileformat=VCFv4.2"/>
148 <has_line line="#CHROM&#009;POS&#009;ID&#009;REF&#009;ALT&#009;QUAL&#009;FILTER&#009;INFO&#009;FORMAT&#009;NORMAL&#009;TUMOR"/>
149 </assert_contents>
150 </output>
151 <output name="out_log">
152 <assert_contents>
153 <has_text_matching expression=".+Done\."/>
154 </assert_contents>
155 </output>
156 </test>
157 <!-- #3 default, germline, bcf -->
158 <test expect_num_outputs="2">
159 <param name="samples" value="call_1.bcf.gz"/>
160 <section name="sv">
161 <conditional name="mode_cond">
162 <param name="mode_sel" value="germline"/>
163 </conditional>
164 </section>
165 <section name="oo">
166 <param name="out" value="vcf,bcf"/>
167 </section>
168 <output name="out_bcf">
169 <assert_contents>
170 <has_size value="2264" delta="10"/>
171 </assert_contents>
172 </output>
173 <output name="out_vcf">
174 <assert_contents>
175 <has_n_lines n="139"/>
176 <has_line line="##fileformat=VCFv4.2"/>
177 <has_line line="#CHROM&#009;POS&#009;ID&#009;REF&#009;ALT&#009;QUAL&#009;FILTER&#009;INFO&#009;FORMAT&#009;NORMAL&#009;TUMOR"/>
178 </assert_contents>
179 </output>
180 </test>
181 <!-- #4 germline, bcf -->
182 <test expect_num_outputs="3">
183 <param name="samples" value="call_1.bcf.gz"/>
184 <section name="generic">
185 <param name="altaf" value="0.1"/>
186 <param name="minsize" value="1"/>
187 <param name="maxsize" value="500000001"/>
188 <param name="ratiogeno" value="0.76"/>
189 <param name="pass" value="true"/>
190 </section>
191 <section name="sv">
192 <conditional name="mode_cond">
193 <param name="mode_sel" value="germline"/>
194 <param name="gq" value="14"/>
195 <param name="rddel" value="0.7"/>
196 <param name="rddup" value="1.3"/>
197 </conditional>
198 </section>
199 <section name="oo">
200 <param name="out" value="vcf,bcf,log"/>
201 </section>
202 <output name="out_bcf">
203 <assert_contents>
204 <has_size value="2264" delta="10"/>
205 </assert_contents>
206 </output>
207 <output name="out_vcf">
208 <assert_contents>
209 <has_n_lines n="139"/>
210 <has_line line="##fileformat=VCFv4.2"/>
211 <has_line line="#CHROM&#009;POS&#009;ID&#009;REF&#009;ALT&#009;QUAL&#009;FILTER&#009;INFO&#009;FORMAT&#009;NORMAL&#009;TUMOR"/>
212 </assert_contents>
213 </output>
214 <output name="out_log">
215 <assert_contents>
216 <has_text_matching expression=".+Done\."/>
217 </assert_contents>
218 </output>
219 </test>
220 <!-- #5 default, somatic, vcf -->
221 <test expect_num_outputs="2">
222 <param name="samples" value="call_1.vcf.gz"/>
223 <section name="sv">
224 <conditional name="mode_cond">
225 <param name="mode_sel" value="somatic"/>
226 <param name="samples" value="samples.tsv"/>
227 </conditional>
228 </section>
229 <section name="oo">
230 <param name="out" value="vcf,bcf"/>
231 </section>
232 <output name="out_bcf">
233 <assert_contents>
234 <has_size value="2440" delta="10"/>
235 </assert_contents>
236 </output>
237 <output name="out_vcf">
238 <assert_contents>
239 <has_n_lines n="142"/>
240 <has_line line="##fileformat=VCFv4.2"/>
241 <has_line line="#CHROM&#009;POS&#009;ID&#009;REF&#009;ALT&#009;QUAL&#009;FILTER&#009;INFO&#009;FORMAT&#009;NORMAL&#009;TUMOR"/>
242 </assert_contents>
243 </output>
244 </test>
245 </tests>
246 <help><![CDATA[
247 .. class:: infomark
248
249 **What it does**
250
251 @WID@
252
253 Delly *filter* contains workflows for germline and somatic SV calling.
254
255 **Input**
256
257 *Somatic* filtering requires a called SV input with at least one tumor sample and a matched control sample. In addition, a tab-delimited sample description needs to be provided, in which the first column holds the sample ids (as found in the VCF/BCF input) and the second column specifies either tumor or control.
258
259 *Germline* SV calling is done by sample for high-coverage genomes or in small batches for low-coverage genomes.
260
261 **Output**
262
263 The output is available in BCF and VCF format.
264
265 .. class:: infomark
266
267 **References**
268
269 @REFERENCES@
270 ]]></help>
271 <expand macro="citations"/>
272 </tool>