Mercurial > repos > yhoogstrate > crossmap
comparison crossmap.xml @ 0:bfcdabc062ca draft
planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/crossmap_galaxy_wrapper commit d4e9fe61901a612c78d9f26f172537b27fd2ddbb
author | yhoogstrate |
---|---|
date | Wed, 26 Aug 2015 11:04:47 -0400 |
parents | |
children | e6efe37b456a |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:bfcdabc062ca |
---|---|
1 <tool id="crossmap" name="CrossMap" version="0.2.a"> | |
2 <description>Convert genome coordinates or annotation files between genome assemblies</description> | |
3 | |
4 <requirements> | |
5 <requirement type="package" version="312">ucsc_tools</requirement> | |
6 <requirement type="package" version="0.2">crossmap</requirement> | |
7 </requirements> | |
8 | |
9 <stdio> | |
10 <regex match="Usage: CrossMap.py" source="stdout" level="fatal"/> | |
11 <regex match=".*" source="both" level="log"/> | |
12 </stdio> | |
13 | |
14 <version_command>CrossMap.py 2>&1 | head -n 1 | grep -E --only-matching 'CrossMap.*'</version_command> | |
15 | |
16 <command> | |
17 CrossMap.py | |
18 ${multiple.input_format.replace("sam","bam")} | |
19 | |
20 #if $multiple.input_format == "vcf" and $multiple.seq_source.index_source == "cached" | |
21 <!-- This is the 2nd dbkey, and the corresponding value has to be looked up --> | |
22 "${filter(lambda x: str( x[1] ) == str($multiple.seq_source.input_chain ), $__app__.tool_data_tables['liftOver'].get_fields())[0][2] }" | |
23 #else | |
24 "$multiple.seq_source.input_chain" | |
25 #end if | |
26 | |
27 #if $multiple.input_format in ["bam", "sam"] | |
28 -m $multiple.insert_size | |
29 -s $multiple.insert_size_stdev | |
30 -t $multiple.insert_size_fold | |
31 #end if | |
32 | |
33 "$multiple.seq_source.input" | |
34 | |
35 #if $multiple.input_format == "vcf" | |
36 "$multiple.seq_source.input_fasta" | |
37 #end if | |
38 | |
39 #if str($multiple.include_fails) == "True" | |
40 > | |
41 #end if | |
42 | |
43 "$output" | |
44 | |
45 #if $multiple.input_format in ["bam", "sam"] | |
46 ; mv "${output}.${multiple.input_format}" "$output" | |
47 ; mv "${output}.unmap.${multiple.input_format}" "$output_unmapped" | |
48 #else if $multiple.input_format in ["vcf"] | |
49 ; mv "${output}" "$output" | |
50 ; mv "${output}.unmap" "$output_unmapped" | |
51 #else if $multiple.input_format in ["wig", "bigwig"] | |
52 ; mv "${output}.bw" "$output" | |
53 ; mv "${output}.sorted.bgr" "$output2" | |
54 #end if | |
55 </command> | |
56 | |
57 <inputs> | |
58 <conditional name="multiple"> | |
59 <param name="input_format" type="select" label="Convert a file of the following format"> | |
60 <option value="bam">BAM</option> | |
61 <option value="sam">SAM</option> | |
62 <option value="bed">BED or BED-like</option> | |
63 <option value="bigwig">BigWig</option> | |
64 <option value="gff">GFF or GTF</option> | |
65 <option value="vcf">VCF</option> | |
66 <option value="wig">Wiggle or bedGraph</option> | |
67 </param> | |
68 <when value="bam"> | |
69 <conditional name="seq_source"> | |
70 <param name="index_source" type="select" label="Source for LiftOver Data (chain file)"> | |
71 <option value="cached">Local data (in galaxy)</option> | |
72 <option value="history">From History</option> | |
73 </param> | |
74 <when value="cached"> | |
75 <param type="data" format="bam" name="input" label="BAM/SAM file"> | |
76 <validator type="unspecified_build" /> | |
77 <validator type="dataset_metadata_in_file" filename="liftOver.loc" metadata_name="dbkey" metadata_column="0" message="LiftOver mapping (chain file) is not available for the specified build." /> | |
78 </param> | |
79 <param name="input_chain" type="select" label="Lift Over To"> | |
80 <options from_file="liftOver.loc"> | |
81 <column name="name" index="1"/> | |
82 <column name="value" index="2"/> | |
83 <column name="dbkey" index="0"/> | |
84 <filter type="data_meta" ref="input" key="dbkey" column="0" /> | |
85 </options> | |
86 </param> | |
87 </when> | |
88 <when value="history"> | |
89 <param type="data" format="bam,sam" name="input" label="BAM/SAM file" /> | |
90 <param type="data" format="csv" name="input_chain" label="LiftOver chain file" /> | |
91 </when> | |
92 </conditional> | |
93 | |
94 <param name="insert_size" type="float" value="200.0" label="Insert size (-m)" help="Average insert size of pair-end sequencing (bp) [default=200.0]" /> | |
95 <param name="insert_size_stdev" type="float" value="30.0" label="Insert size std. dev (-s)" help="Stanadard deviation of insert size. [default=30.0]" /> | |
96 <param name="insert_size_fold" type="float" value="3.0" label="Insert size std. dev foldchange (-t)" help="A mapped pair is considered as 'proper pair' if both ends mapped to different strand and the distance between them is less then '-t' * stdev from the mean. [default=3.0]" /> | |
97 | |
98 <param name="include_fails" type="hidden" tvalue="False" /> | |
99 </when> | |
100 <when value="sam"><!-- BAM and SAM are exactly the same conditions, but they need to be separate to get the proper output format --> | |
101 <conditional name="seq_source"> | |
102 <param name="index_source" type="select" label="Source for LiftOver Data (chain file)"> | |
103 <option value="cached">Local data (in galaxy)</option> | |
104 <option value="history">From History</option> | |
105 </param> | |
106 <when value="cached"> | |
107 <param type="data" format="sam" name="input" label="BAM/SAM file"> | |
108 <validator type="unspecified_build" /> | |
109 <validator type="dataset_metadata_in_file" filename="liftOver.loc" metadata_name="dbkey" metadata_column="0" message="LiftOver mapping (chain file) is not available for the specified build." /> | |
110 </param> | |
111 <param name="input_chain" type="select" label="Lift Over To"> | |
112 <options from_file="liftOver.loc"> | |
113 <column name="name" index="1"/> | |
114 <column name="value" index="2"/> | |
115 <column name="dbkey" index="0"/> | |
116 <filter type="data_meta" ref="input" key="dbkey" column="0" /> | |
117 </options> | |
118 </param> | |
119 </when> | |
120 <when value="history"> | |
121 <param type="data" format="bam,sam" name="input" label="BAM/SAM file" /> | |
122 <param type="data" format="csv" name="input_chain" label="LiftOver chain file" /> | |
123 </when> | |
124 </conditional> | |
125 | |
126 <param name="insert_size" type="float" value="200.0" label="Insert size (-m)" help="Average insert size of pair-end sequencing (bp) [default=200.0]" /> | |
127 <param name="insert_size_stdev" type="float" value="30.0" label="Insert size std. dev (-s)" help="Stanadard deviation of insert size. [default=30.0]" /> | |
128 <param name="insert_size_fold" type="float" value="3.0" label="Insert size std. dev foldchange (-t)" help="A mapped pair is considered as 'proper pair' if both ends mapped to different strand and the distance between them is less then '-t' * stdev from the mean. [default=3.0]" /> | |
129 | |
130 <param name="include_fails" type="hidden" tvalue="False" /> | |
131 </when> | |
132 <when value="bed"> | |
133 <conditional name="seq_source"> | |
134 <param name="index_source" type="select" label="Source for LiftOver Data (chain file)"> | |
135 <option value="cached">Local data (in galaxy)</option> | |
136 <option value="history">From History</option> | |
137 </param> | |
138 <when value="cached"> | |
139 <param format="bed" name="input" type="data" label="BED file" help="BED format file must have at least 3 columns (chrom, start, end) and no more than 12 columns."> | |
140 <validator type="unspecified_build" /> | |
141 <validator type="dataset_metadata_in_file" filename="liftOver.loc" metadata_name="dbkey" metadata_column="0" message="LiftOver mapping (chain file) is not available for the specified build." /> | |
142 </param> | |
143 <param name="input_chain" type="select" label="Lift Over To"> | |
144 <options from_file="liftOver.loc"> | |
145 <column name="name" index="1"/> | |
146 <column name="value" index="2"/> | |
147 <column name="dbkey" index="0"/> | |
148 <filter type="data_meta" ref="input" key="dbkey" column="0" /> | |
149 </options> | |
150 </param> | |
151 </when> | |
152 <when value="history"> | |
153 <param type="data" format="bed" name="input" label="BED file" help="BED format file must have at least 3 columns (chrom, start, end) and no more than 12 columns." /> | |
154 <param type="data" format="csv" name="input_chain" label="LiftOver chain file" /> | |
155 </when> | |
156 </conditional> | |
157 | |
158 <param name="include_fails" type="boolean" truevalue="True" checked="false" falsevalue="False" label="Include failed liftovers" help="If a coordinate can not be lift over, do you want to include it in the output (it is still being marked 'fail')" /> | |
159 </when> | |
160 <when value="bigwig"> | |
161 <conditional name="seq_source"> | |
162 <param name="index_source" type="select" label="Source for LiftOver Data (chain file)"> | |
163 <option value="cached">Local data (in galaxy)</option> | |
164 <option value="history">From History</option> | |
165 </param> | |
166 <when value="cached"> | |
167 <param format="bigwig" name="input" type="data" label="BigWig file"> | |
168 <validator type="unspecified_build" /> | |
169 <validator type="dataset_metadata_in_file" filename="liftOver.loc" metadata_name="dbkey" metadata_column="0" message="LiftOver mapping (chain file) is not available for the specified build." /> | |
170 </param> | |
171 <param name="input_chain" type="select" label="Lift Over To"> | |
172 <options from_file="liftOver.loc"> | |
173 <column name="name" index="1"/> | |
174 <column name="value" index="2"/> | |
175 <column name="dbkey" index="0"/> | |
176 <filter type="data_meta" ref="input" key="dbkey" column="0" /> | |
177 </options> | |
178 </param> | |
179 </when> | |
180 <when value="history"> | |
181 <param type="data" format="bigwig" name="input" label="BigWig file" /> | |
182 <param type="data" format="csv" name="input_chain" label="LiftOver chain file" /> | |
183 </when> | |
184 </conditional> | |
185 | |
186 <param name="include_fails" type="hidden" tvalue="False" /> | |
187 </when> | |
188 <when value="gff"> | |
189 <conditional name="seq_source"> | |
190 <param name="index_source" type="select" label="Source for LiftOver Data (chain file)"> | |
191 <option value="cached">Local data (in galaxy)</option> | |
192 <option value="history">From History</option> | |
193 </param> | |
194 <when value="cached"> | |
195 <param format="gtf,gff,gff3" name="input" type="data" label="GTF/GFF file"> | |
196 <validator type="unspecified_build" /> | |
197 <validator type="dataset_metadata_in_file" filename="liftOver.loc" metadata_name="dbkey" metadata_column="0" message="LiftOver mapping (chain file) is not available for the specified build." /> | |
198 </param> | |
199 <param name="input_chain" type="select" label="Lift Over To"> | |
200 <options from_file="liftOver.loc"> | |
201 <column name="name" index="1"/> | |
202 <column name="value" index="2"/> | |
203 <column name="dbkey" index="0"/> | |
204 <filter type="data_meta" ref="input" key="dbkey" column="0" /> | |
205 </options> | |
206 </param> | |
207 </when> | |
208 <when value="history"> | |
209 <param type="data" format="gtf,gff,gff3" name="input" label="GTF/GFF file" /> | |
210 <param type="data" format="csv" name="input_chain" label="LiftOver chain file" /> | |
211 </when> | |
212 </conditional> | |
213 | |
214 <param name="include_fails" type="boolean" truevalue="True" checked="false" falsevalue="False" label="Include failed liftovers" help="If a coordinate can not be lift over, do you want to include it in the output (it is still being marked 'fail')" /> | |
215 </when> | |
216 <when value="vcf"> | |
217 <conditional name="seq_source"> | |
218 <param name="index_source" type="select" label="Source for LiftOver Data"> | |
219 <option value="cached">Local data (in galaxy)</option> | |
220 <option value="history_chain">Chain file from History</option> | |
221 <option value="history_all">Chain & FASTA files from History</option> | |
222 </param> | |
223 | |
224 <when value="cached"> | |
225 <param type="data" format="vcf" name="input" label="VCF file"> | |
226 <validator type="unspecified_build" /> | |
227 <validator type="dataset_metadata_in_file" filename="liftOver.loc" metadata_name="dbkey" metadata_column="0" message="LiftOver mapping (chain file) is not available for the specified build." /> | |
228 </param> | |
229 | |
230 <!-- automatically fetch a FASTA file from the same DBKEY as the chain file --> | |
231 <param name="input_chain" type="select" label="Lift Over To (Chain file)"> | |
232 <options from_file="liftOver.loc"> | |
233 <column name="name" index="1" /> | |
234 <column name="value" index="1" /><!-- It is not possible to send the *.chain file as value, and obtain the 2nd dbkey as parameter via a filter --> | |
235 <column name="dbkey" index="0" /> | |
236 <filter type="data_meta" ref="input" key="dbkey" column="0" /> | |
237 </options> | |
238 </param> | |
239 | |
240 <param name="input_fasta" type="select" label="Lift Over To (FASTA file)" help="The FASTA file must be on the same build (dbkey) as the LiftOver chain file"> | |
241 <options from_file="all_fasta.loc"> | |
242 <column name="name" index="2"/> | |
243 <column name="value" index="3"/> | |
244 <column name="dbkey" index="1"/> | |
245 <filter type="param_value" ref="input_chain" column="1" /> | |
246 </options> | |
247 </param> | |
248 </when> | |
249 | |
250 <when value="history_chain"> | |
251 <param type="data" format="vcf" name="input" label="VCF file"> | |
252 <validator type="unspecified_build" /> | |
253 <validator type="dataset_metadata_in_file" filename="all_fasta.loc" metadata_name="dbkey" metadata_column="1" message="LiftOver mapping (FASTA file) is not available for the specified build." /> | |
254 </param> | |
255 <param type="data" format="csv" name="input_chain" multiple="false" label="LiftOver chain file" /> | |
256 <param name="input_fasta" type="select" label="Lift Over To (FASTA file)" help="The FASTA file must be on the same build (dbkey) as the LiftOver chain file"> | |
257 <options from_file="all_fasta.loc"> | |
258 <column name="name" index="2"/> | |
259 <column name="value" index="3"/> | |
260 <column name="dbkey" index="1"/> | |
261 </options> | |
262 </param> | |
263 </when> | |
264 | |
265 <when value="history_all"> | |
266 <param type="data" format="vcf" name="input" label="VCF file" /> | |
267 <param type="data" format="csv" name="input_chain" multiple="false" label="LiftOver chain file" /> | |
268 <param type="data" format="fasta" name="input_fasta" multiple="false" label="Full genome FASTA file" /> | |
269 </when> | |
270 </conditional> | |
271 | |
272 <param name="include_fails" type="hidden" tvalue="False" /> | |
273 </when> | |
274 <when value="wig"> | |
275 <conditional name="seq_source"> | |
276 <param name="index_source" type="select" label="Source for LiftOver Data (chain file)"> | |
277 <option value="cached">Local data (in galaxy)</option> | |
278 <option value="history">From History</option> | |
279 </param> | |
280 <when value="cached"> | |
281 <param format="wig" name="input" type="data" label="Wiggle file"> | |
282 <validator type="unspecified_build" /> | |
283 <validator type="dataset_metadata_in_file" filename="liftOver.loc" metadata_name="dbkey" metadata_column="0" message="LiftOver mapping (chain file) is not available for the specified build." /> | |
284 </param> | |
285 <param name="input_chain" type="select" label="Lift Over To"> | |
286 <options from_file="liftOver.loc"> | |
287 <column name="name" index="1"/> | |
288 <column name="value" index="2"/> | |
289 <column name="dbkey" index="0"/> | |
290 <filter type="data_meta" ref="input" key="dbkey" column="0" /> | |
291 </options> | |
292 </param> | |
293 </when> | |
294 <when value="history"> | |
295 <param format="wig" name="input" type="data" label="Wiggle file" /> | |
296 <param type="data" format="csv" name="input_chain" label="LiftOver chain file" /> | |
297 </when> | |
298 </conditional> | |
299 | |
300 <param name="include_fails" type="hidden" tvalue="False" /> | |
301 </when> | |
302 </conditional> | |
303 </inputs> | |
304 | |
305 <outputs> | |
306 <data format="text" name="output" label="${tool.name} on "> | |
307 <change_format> | |
308 <when input="multiple.input_format" value="bam" format="bam" /> | |
309 <when input="multiple.input_format" value="sam" format="sam" /> | |
310 <when input="multiple.input_format" value="bed" format="bed" /> | |
311 <when input="multiple.input_format" value="bigwig" format="bigwig" /> | |
312 <when input="multiple.input_format" value="gff" format="gff" /> | |
313 <when input="multiple.input_format" value="vcf" format="vcf" /> | |
314 <when input="imultiple.nput_format" value="wig" format="bigwig" /> | |
315 </change_format> | |
316 </data> | |
317 | |
318 <data format="text" name="output_unmapped" label="${tool.name} unmapped on "> | |
319 <filter>input_format in ["bam" , "vcf"]</filter> | |
320 <change_format> | |
321 <when input="multiple.input_format" value="bam" format="bam" /> | |
322 <when input="multiple.input_format" value="vcf" format="vcf" /> | |
323 </change_format> | |
324 </data> | |
325 <data format="text" name="output2" label="${tool.name} on "> | |
326 <filter>input_format in ["wig"]</filter> | |
327 <change_format> | |
328 <when input="multiple.input_format" value="wig" format="bedgraph" /> | |
329 </change_format> | |
330 </data> | |
331 </outputs> | |
332 | |
333 <tests> | |
334 <!-- BAM/SAM --> | |
335 <test> | |
336 <param name="input_format" value="sam"/> | |
337 <param name="index_source" value="history"/> | |
338 <param name="input" value="test_bam_01_input_a.sam" ftype="sam"/> | |
339 <param name="input_chain" value="aToB.over.chain" ftype="csv"/> | |
340 <param name="include_fails" value="False"/> | |
341 | |
342 <output name="output" file="test_bam_01_output_a.sam" compare="diff" lines_diff="4"/> | |
343 <output name="output_unmapped" file="test_bam_01_output_a.unmap.sam"/> | |
344 </test> | |
345 | |
346 <!-- BED --> | |
347 <test> | |
348 <param name="input_format" value="bed"/> | |
349 <param name="index_source" value="history"/> | |
350 <param name="input" value="test_bed_01_input_a.bed" ftype="bed"/> | |
351 <param name="input_chain" value="aToB.over.chain" ftype="csv"/> | |
352 <param name="include_fails" value="False"/> | |
353 | |
354 <output name="output" file="test_bed_01_output_a__only-matches.bed"/> | |
355 </test> | |
356 <test> | |
357 <param name="input_format" value="bed"/> | |
358 <param name="index_source" value="history"/> | |
359 <param name="input" value="test_bed_01_input_a.bed" ftype="bed"/> | |
360 <param name="input_chain" value="aToB.over.chain" ftype="txt"/> | |
361 <param name="include_fails" value="True"/> | |
362 | |
363 <output name="output" file="test_bed_01_output_a__all.bed"/> | |
364 </test> | |
365 <test> | |
366 <param name="input_format" value="bed"/> | |
367 <param name="index_source" value="history"/> | |
368 <param name="input" value="test_bed_02_input_a.bed" ftype="bed"/> | |
369 <param name="input_chain" value="aToB.over.chain" ftype="txt"/> | |
370 <param name="include_fails" value="False"/> | |
371 | |
372 <output name="output" file="test_bed_02_output_a__only-matches.bed"/> | |
373 </test> | |
374 <test> | |
375 <param name="input_format" value="bed"/> | |
376 <param name="index_source" value="history"/> | |
377 <param name="input" value="test_bed_02_input_a.bed" ftype="bed"/> | |
378 <param name="input_chain" value="aToB.over.chain" ftype="txt"/> | |
379 <param name="include_fails" value="True"/> | |
380 | |
381 <output name="output" file="test_bed_02_output_a__all.bed"/> | |
382 </test> | |
383 | |
384 <!-- BigWig --><!-- Malfuncioning in CrossMap 0.2, but patched via galaxy toolshed installer --> | |
385 <test> | |
386 <param name="input_format" value="bigwig"/> | |
387 <param name="index_source" value="history"/> | |
388 <param name="input" value="test_bigwig_01_input_a.bw" ftype="bigwig"/> | |
389 <param name="input_chain" value="aToB.over.chain" ftype="csv"/> | |
390 <param name="include_fails" value="False"/> | |
391 | |
392 <output name="output" file="test_bigwig_01_output_a.bw"/> | |
393 <output name="output2" file="test_bigwig_01_output_a.sorted.bgr"/> | |
394 </test> | |
395 <!-- GFF --> | |
396 <test> | |
397 <param name="input_format" value="gff"/> | |
398 <param name="index_source" value="history"/> | |
399 <param name="input" value="test_gff_01_input_a.gtf" ftype="gtf"/> | |
400 <param name="input_chain" value="aToB.over.chain" ftype="csv"/> | |
401 <param name="include_fails" value="False"/> | |
402 | |
403 <output name="output" file="test_gff_01_output_a__only-matches.gtf"/> | |
404 </test> | |
405 <test> | |
406 <param name="input_format" value="gff"/> | |
407 <param name="index_source" value="history"/> | |
408 <param name="input" value="test_gff_01_input_a.gtf" ftype="gtf"/> | |
409 <param name="input_chain" value="aToB.over.chain" ftype="csv"/> | |
410 <param name="include_fails" value="True"/> | |
411 | |
412 <output name="output" file="test_gff_01_output_a__all.gtf"/> | |
413 </test> | |
414 | |
415 <!-- VCF --> | |
416 <test> | |
417 <param name="input_format" value="vcf"/> | |
418 <param name="index_source" value="history_all"/> | |
419 <param name="input" value="test_vcf_01_input.vcf" ftype="vcf"/> | |
420 <param name="input_chain" value="test_vcf_01.over.chain" ftype="csv"/> | |
421 <param name="input_fasta" value="test_vcf_01.fasta" ftype="fasta"/> | |
422 <param name="include_fails" value="False"/> | |
423 | |
424 <output name="output" file="test_vcf_01_output.vcf" compare="diff" lines_diff="4"/> | |
425 <output name="output_unmapped" file="test_vcf_01_output.vcf.unmap"/> | |
426 </test> | |
427 </tests> | |
428 | |
429 <!-- WIG - Doesn't understand fixedStep --> | |
430 <test> | |
431 <param name="input_format" value="wig"/> | |
432 <param name="index_source" value="history"/> | |
433 <param name="input" value="test_wig_01_input_a.wig" ftype="wig"/> | |
434 <param name="input_chain" value="aToB.over.chain" ftype="csv"/> | |
435 <param name="include_fails" value="False"/> | |
436 | |
437 <output name="output" file="test_wig_01_output_a.bw"/> | |
438 <output name="output2" file="test_wig_01_output_a.sorted.bgr"/> | |
439 </test> | |
440 <help> | |
441 CrossMap is versatile tool to convert genome coordinates or annotation files between genome | |
442 assemblies. It supports mostly commonly used file types, including BAM, BED,BigWig, GFF, | |
443 GTF, SAM, Wiggle, and VCF formats. For large plain text file types, such as BED, GFF, GTF | |
444 and VCF, reading from remote servers and file compression are supported. | |
445 | |
446 CrossMap bed | |
447 ------------ | |
448 BED format file must have at least 3 columns (chrom, start, end) and no more than 12 columns. | |
449 BED format: http://genome.ucsc.edu/FAQ/FAQformat.html#format1 | |
450 </help> | |
451 | |
452 <citations> | |
453 <citation type="doi">10.1093/bioinformatics/btt730</citation> | |
454 </citations> | |
455 </tool> |