Mercurial > repos > bgruening > hicexplorer_hicconvertformat
comparison hicConvertFormat.xml @ 2:2f62a87d4017 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hicexplorer commit 4b602d427e0fc0da5353a4510798349de98e4ae4"
author | iuc |
---|---|
date | Wed, 11 Mar 2020 16:59:15 -0400 |
parents | e136f22c2a0f |
children | 3e598b8e72e7 |
comparison
equal
deleted
inserted
replaced
1:3b15581e7ca7 | 2:2f62a87d4017 |
---|---|
26 #end if | 26 #end if |
27 #if $xml_path.inputFormat_selector == 'optionH5': | 27 #if $xml_path.inputFormat_selector == 'optionH5': |
28 --matrices "matrix.h5" | 28 --matrices "matrix.h5" |
29 --inputFormat h5 | 29 --inputFormat h5 |
30 | 30 |
31 #end if | 31 #end if |
32 #if $xml_path.inputFormat_selector == 'optionHomer': | 32 #if $xml_path.inputFormat_selector == 'optionHomer': |
33 --matrices "matrix.homer" | 33 --matrices "matrix.homer" |
34 --inputFormat homer | 34 --inputFormat homer |
35 | 35 |
36 #end if | 36 #end if |
37 #if $xml_path.inputFormat_selector == 'optionHicpro': | 37 #if $xml_path.inputFormat_selector == 'optionHicpro': |
38 --matrices "matrix.hicpro" | 38 --matrices "matrix.hicpro" |
39 --bedFileHicpro "matrix.bed" | 39 --bedFileHicpro "matrix.bed" |
40 --inputFormat hicpro | 40 --inputFormat hicpro |
41 #end if | 41 #end if |
42 #if $xml_path.inputFormat_selector == 'optionHic': | 42 #if $xml_path.inputFormat_selector == 'optionHic': |
43 --matrices "matrix.hic" | 43 --matrices "matrix.hic" |
44 #if $xml_path.resolutions: | 44 #if $xml_path.resolutions: |
45 #set $resolutions = ' '.join([ '"%s"' % $resolution for $resolution in str($xml_path.resolutions).split(" ") ]) | 45 #set $resolutions = ' '.join([ '"%s"' % $resolution for $resolution in str($xml_path.resolutions).split(" ") ]) |
46 | 46 |
47 --resolutions $resolutions | 47 --resolutions $resolutions |
48 #end if | 48 #end if |
49 --inputFormat hic | 49 --inputFormat hic |
50 #end if | 50 #end if |
51 </token> | 51 </token> |
52 <import>macros.xml</import> | 52 <import>macros.xml</import> |
53 </macros> | 53 </macros> |
54 | 54 |
55 <expand macro="requirements" /> | 55 <expand macro="requirements" /> |
56 <command detect_errors="exit_code"><![CDATA[ | 56 <command detect_errors="exit_code"><![CDATA[ |
57 | 57 |
58 | 58 |
59 ## single to single case | 59 ## single to single case |
60 | 60 |
61 | 61 |
62 #if $outputSingleMultiple_conditional.outputSingleMultiple_selector == 'singleMatrix': | 62 #if $outputSingleMultiple_conditional.outputSingleMultiple_selector == 'singleMatrix': |
63 #set xml_path = $outputSingleMultiple_conditional.inputFormat_conditional | 63 #set xml_path = $outputSingleMultiple_conditional.inputFormat_conditional |
64 | 64 |
65 #if $xml_path.inputFormat_selector == 'optionCool': | 65 #if $xml_path.inputFormat_selector == 'optionCool': |
66 ln -s "$xml_path.matrix_h5_cooler" "matrix.cool" && | 66 ln -s "$xml_path.matrix_h5_cooler" "matrix.cool" && |
67 | 67 |
68 #end if | 68 #end if |
69 #if $xml_path.inputFormat_selector == 'optionH5': | 69 #if $xml_path.inputFormat_selector == 'optionH5': |
70 ln -s "$xml_path.matrix_h5_cooler" "matrix.h5" && | 70 ln -s "$xml_path.matrix_h5_cooler" "matrix.h5" && |
71 | 71 |
72 #end if | 72 #end if |
73 #if $xml_path.inputFormat_selector == 'optionHomer': | 73 #if $xml_path.inputFormat_selector == 'optionHomer': |
74 ln -s "$xml_path.matrixHomer" "matrix.homer" && | 74 ln -s "$xml_path.matrixHomer" "matrix.homer" && |
75 | 75 |
76 #end if | 76 #end if |
77 | 77 |
78 #if $xml_path.inputFormat_selector == 'optionHicpro': | 78 #if $xml_path.inputFormat_selector == 'optionHicpro': |
79 ln -s "$xml_path.matrixHicpro" "matrix.hicpro" && | 79 ln -s "$xml_path.matrixHicpro" "matrix.hicpro" && |
80 ln -s "$xml_path.bedHicpro" "matrix.bed" && | 80 ln -s "$xml_path.bedHicpro" "matrix.bed" && |
81 #end if | 81 #end if |
82 | 82 |
83 #if $xml_path.inputFormat_selector == 'optionHic': | 83 #if $xml_path.inputFormat_selector == 'optionHic': |
84 ln -s "$xml_path.matrixHic" "matrix.hic" && | 84 ln -s "$xml_path.matrixHic" "matrix.hic" && |
85 #end if | 85 #end if |
86 | 86 |
87 | 87 |
88 | 88 |
89 @BINARY@ | 89 @BINARY@ |
90 @SINGLE_INPUT@ | 90 @SINGLE_INPUT@ |
91 | 91 |
92 | 92 |
93 --outputFormat $outputSingleMultiple_conditional.outputFormat_conditional.outputFormat_selector | 93 --outputFormat $outputSingleMultiple_conditional.outputFormat_conditional.outputFormat_selector |
94 --outFileName 'matrix.$outputSingleMultiple_conditional.outputFormat_conditional.outputFormat_selector' | 94 --outFileName 'matrix.$outputSingleMultiple_conditional.outputFormat_conditional.outputFormat_selector' |
95 | 95 |
96 #if $outputSingleMultiple_conditional.outputFormat_conditional.outputFormat_selector == 'ginteractions': | 96 #if $outputSingleMultiple_conditional.outputFormat_conditional.outputFormat_selector == 'ginteractions': |
97 && mv 'matrix.${outputSingleMultiple_conditional.outputFormat_conditional.outputFormat_selector}.tsv' matrix_out | 97 && mv 'matrix.${outputSingleMultiple_conditional.outputFormat_conditional.outputFormat_selector}.tsv' matrix_out |
99 #else: | 99 #else: |
100 && mv "matrix.$outputSingleMultiple_conditional.outputFormat_conditional.outputFormat_selector" matrix_out | 100 && mv "matrix.$outputSingleMultiple_conditional.outputFormat_conditional.outputFormat_selector" matrix_out |
101 #end if | 101 #end if |
102 #end if | 102 #end if |
103 | 103 |
104 | 104 |
105 ### Set up links to matrices to have correct ending | 105 ### Set up links to matrices to have correct ending |
106 #if $outputSingleMultiple_conditional.outputSingleMultiple_selector == 'multipleMatrix': | 106 #if $outputSingleMultiple_conditional.outputSingleMultiple_selector == 'multipleMatrix': |
107 #if $outputSingleMultiple_conditional.resolutionOrManyToOne_conditional.resolutionOrManyToOne_selector == 'resolution_option': | 107 #if $outputSingleMultiple_conditional.resolutionOrManyToOne_conditional.resolutionOrManyToOne_selector == 'resolution_option': |
108 #set xml_path = $outputSingleMultiple_conditional.resolutionOrManyToOne_conditional.inputFormat_conditional | 108 #set xml_path = $outputSingleMultiple_conditional.resolutionOrManyToOne_conditional.inputFormat_conditional |
109 #if $xml_path.inputFormat_selector == 'optionCool': | 109 #if $xml_path.inputFormat_selector == 'optionCool': |
153 #if $xml_manyToOne.inputFormat_conditional.inputFormat_selector == 'optionHicpro': | 153 #if $xml_manyToOne.inputFormat_conditional.inputFormat_selector == 'optionHicpro': |
154 #for $counter, $m in enumerate($xml_manyToOne.matrixHicpro): | 154 #for $counter, $m in enumerate($xml_manyToOne.matrixHicpro): |
155 ln -s '$m' "${counter}_matrix.hicpro" && | 155 ln -s '$m' "${counter}_matrix.hicpro" && |
156 #end for | 156 #end for |
157 #set $m = ' '.join([ '"%s_matrix.hicpro"' % $counter for $counter, $matrix in enumerate($xml_manyToOne.matrixHicpro) ]) | 157 #set $m = ' '.join([ '"%s_matrix.hicpro"' % $counter for $counter, $matrix in enumerate($xml_manyToOne.matrixHicpro) ]) |
158 | 158 |
159 #for $counter, $bed in enumerate($xml_manyToOne.bedHicpro): | 159 #for $counter, $bed in enumerate($xml_manyToOne.bedHicpro): |
160 ln -s '$bed' "${counter}_matrix.bed" && | 160 ln -s '$bed' "${counter}_matrix.bed" && |
161 #end for | 161 #end for |
162 #set $bed = ' '.join([ '"%s_matrix.bed"' % $counter for $counter, $matrix in enumerate($xml_manyToOne.bedHicpro) ]) | 162 #set $bed = ' '.join([ '"%s_matrix.bed"' % $counter for $counter, $matrix in enumerate($xml_manyToOne.bedHicpro) ]) |
163 --bedFileHicpro '$bed' | 163 --bedFileHicpro '$bed' |
164 #end if | 164 #end if |
165 #end if | 165 #end if |
166 | 166 |
167 | 167 |
168 @BINARY@ | 168 @BINARY@ |
169 --outputFormat mcool | 169 --outputFormat mcool |
170 | 170 |
171 #if $outputSingleMultiple_conditional.resolutionOrManyToOne_conditional.resolutionOrManyToOne_selector == 'resolution_option': | 171 #if $outputSingleMultiple_conditional.resolutionOrManyToOne_conditional.resolutionOrManyToOne_selector == 'resolution_option': |
172 #set $resolutions = ' '.join([ '"%s"' % $resolution for $resolution in str($outputSingleMultiple_conditional.resolutionOrManyToOne_conditional.resolutions).split(" ") ]) | 172 #set $resolutions = ' '.join([ '"%s"' % $resolution for $resolution in str($outputSingleMultiple_conditional.resolutionOrManyToOne_conditional.resolutions).split(" ") ]) |
173 | 173 |
178 #end if | 178 #end if |
179 #if $xml_path.inputFormat_selector == 'optionH5': | 179 #if $xml_path.inputFormat_selector == 'optionH5': |
180 --matrices "matrix.h5" | 180 --matrices "matrix.h5" |
181 --inputFormat h5 | 181 --inputFormat h5 |
182 | 182 |
183 #end if | 183 #end if |
184 #if $xml_path.inputFormat_selector == 'optionHomer': | 184 #if $xml_path.inputFormat_selector == 'optionHomer': |
185 --matrices "matrix.homer" | 185 --matrices "matrix.homer" |
186 --inputFormat homer | 186 --inputFormat homer |
187 | 187 |
188 #end if | 188 #end if |
189 #if $xml_path.inputFormat_selector == 'optionHicpro': | 189 #if $xml_path.inputFormat_selector == 'optionHicpro': |
190 --matrices "matrix.hicpro" | 190 --matrices "matrix.hicpro" |
191 --bedFileHicpro "matrix.bed" | 191 --bedFileHicpro "matrix.bed" |
192 --inputFormat hicpro | 192 --inputFormat hicpro |
193 #end if | 193 #end if |
194 #if $xml_path.inputFormat_selector == 'optionHic': | 194 #if $xml_path.inputFormat_selector == 'optionHic': |
195 --matrices "matrix.hic" | 195 --matrices "matrix.hic" |
196 --inputFormat hic | 196 --inputFormat hic |
197 #end if | 197 #end if |
198 #end if | 198 #end if |
199 | 199 |
200 #if $outputSingleMultiple_conditional.resolutionOrManyToOne_conditional.resolutionOrManyToOne_selector == 'manyToOne_option': | 200 #if $outputSingleMultiple_conditional.resolutionOrManyToOne_conditional.resolutionOrManyToOne_selector == 'manyToOne_option': |
201 #if $xml_manyToOne.inputFormat_conditional.inputFormat_selector == 'optionCool': | 201 #if $xml_manyToOne.inputFormat_conditional.inputFormat_selector == 'optionCool': |
202 --inputFormat cool | 202 --inputFormat cool |
230 | 230 |
231 <conditional name="outputSingleMultiple_conditional"> | 231 <conditional name="outputSingleMultiple_conditional"> |
232 <param name="outputSingleMultiple_selector" type="select" label="Choose output matrix type"> | 232 <param name="outputSingleMultiple_selector" type="select" label="Choose output matrix type"> |
233 <option value="singleMatrix" selected="True">single matrix</option> | 233 <option value="singleMatrix" selected="True">single matrix</option> |
234 <option value="multipleMatrix">multiple matrix</option> | 234 <option value="multipleMatrix">multiple matrix</option> |
235 </param> | 235 </param> |
236 <when value='singleMatrix'> | 236 <when value='singleMatrix'> |
237 <expand macro='convertFormat_single_macro' /> | 237 <expand macro='convertFormat_single_macro' /> |
238 <expand macro='convertFormat_single_output_macro' /> | 238 <expand macro='convertFormat_single_output_macro' /> |
239 </when> | 239 </when> |
240 <when value='multipleMatrix'> | 240 <when value='multipleMatrix'> |
276 <param name='outputSingleMultiple_selector' value='singleMatrix'/> | 276 <param name='outputSingleMultiple_selector' value='singleMatrix'/> |
277 <conditional name='inputFormat_conditional'> | 277 <conditional name='inputFormat_conditional'> |
278 <param name='inputFormat_selector' value='optionCool'/> | 278 <param name='inputFormat_selector' value='optionCool'/> |
279 <param name='matrix_h5_cooler' value='small_test_matrix.cool'/> | 279 <param name='matrix_h5_cooler' value='small_test_matrix.cool'/> |
280 </conditional> | 280 </conditional> |
281 | 281 |
282 <conditional name='outputFormat_conditional'> | 282 <conditional name='outputFormat_conditional'> |
283 <param name='outputFormat_selector' value='h5'/> | 283 <param name='outputFormat_selector' value='h5'/> |
284 </conditional> | 284 </conditional> |
285 </conditional> | 285 </conditional> |
286 <output name="output_converted_matrix" ftype="h5"> | 286 <output name="output_converted_matrix" ftype="h5"> |
294 <param name='outputSingleMultiple_selector' value='singleMatrix'/> | 294 <param name='outputSingleMultiple_selector' value='singleMatrix'/> |
295 <conditional name='inputFormat_conditional'> | 295 <conditional name='inputFormat_conditional'> |
296 <param name='inputFormat_selector' value='optionH5'/> | 296 <param name='inputFormat_selector' value='optionH5'/> |
297 <param name='matrix_h5_cooler' value='small_test_matrix.h5'/> | 297 <param name='matrix_h5_cooler' value='small_test_matrix.h5'/> |
298 </conditional> | 298 </conditional> |
299 | 299 |
300 <conditional name='outputFormat_conditional'> | 300 <conditional name='outputFormat_conditional'> |
301 <param name='outputFormat_selector' value='cool'/> | 301 <param name='outputFormat_selector' value='cool'/> |
302 </conditional> | 302 </conditional> |
303 </conditional> | 303 </conditional> |
304 <output name="output_converted_matrix" ftype="cool"> | 304 <output name="output_converted_matrix" ftype="cool"> |
312 <param name='outputSingleMultiple_selector' value='singleMatrix'/> | 312 <param name='outputSingleMultiple_selector' value='singleMatrix'/> |
313 <conditional name='inputFormat_conditional'> | 313 <conditional name='inputFormat_conditional'> |
314 <param name='inputFormat_selector' value='optionCool'/> | 314 <param name='inputFormat_selector' value='optionCool'/> |
315 <param name='matrix_h5_cooler' value='hicConvertFormat/small_test_matrix_chr4.cool'/> | 315 <param name='matrix_h5_cooler' value='hicConvertFormat/small_test_matrix_chr4.cool'/> |
316 </conditional> | 316 </conditional> |
317 | 317 |
318 <conditional name='outputFormat_conditional'> | 318 <conditional name='outputFormat_conditional'> |
319 <param name='outputFormat_selector' value='homer'/> | 319 <param name='outputFormat_selector' value='homer'/> |
320 </conditional> | 320 </conditional> |
321 </conditional> | 321 </conditional> |
322 <output name="output_converted_matrix" file="hicConvertFormat/small_test_matrix_chr4.homer" ftype="zip" compare="sim_size" delta="40000"/> | 322 <output name="output_converted_matrix" file="hicConvertFormat/small_test_matrix_chr4.homer" ftype="zip" compare="sim_size" delta="40000"/> |
326 <param name='outputSingleMultiple_selector' value='singleMatrix'/> | 326 <param name='outputSingleMultiple_selector' value='singleMatrix'/> |
327 <conditional name='inputFormat_conditional'> | 327 <conditional name='inputFormat_conditional'> |
328 <param name='inputFormat_selector' value='optionCool'/> | 328 <param name='inputFormat_selector' value='optionCool'/> |
329 <param name='matrix_h5_cooler' value='hicConvertFormat/small_test_matrix_chr4.cool'/> | 329 <param name='matrix_h5_cooler' value='hicConvertFormat/small_test_matrix_chr4.cool'/> |
330 </conditional> | 330 </conditional> |
331 | 331 |
332 <conditional name='outputFormat_conditional'> | 332 <conditional name='outputFormat_conditional'> |
333 <param name='outputFormat_selector' value='ginteractions'/> | 333 <param name='outputFormat_selector' value='ginteractions'/> |
334 </conditional> | 334 </conditional> |
335 </conditional> | 335 </conditional> |
336 <output name="output_converted_matrix" file="hicConvertFormat/small_test_matrix_chr4.ginteractions.tsv" ftype="tsv" compare="sim_size" delta="40000"/> | 336 <output name="output_converted_matrix" file="hicConvertFormat/small_test_matrix_chr4.ginteractions.tsv" ftype="tsv" compare="sim_size" delta="40000"/> |
337 | 337 |
338 </test> | 338 </test> |
339 <test> | 339 <test> |
340 <conditional name='outputSingleMultiple_conditional'> | 340 <conditional name='outputSingleMultiple_conditional'> |
341 <param name='outputSingleMultiple_selector' value='multipleMatrix'/> | 341 <param name='outputSingleMultiple_selector' value='multipleMatrix'/> |
342 <conditional name='resolutionOrManyToOne_conditional'> | 342 <conditional name='resolutionOrManyToOne_conditional'> |
359 Converting between different Hi-C interaction formats | 359 Converting between different Hi-C interaction formats |
360 ===================================================== | 360 ===================================================== |
361 | 361 |
362 Conversion of Hi-C matrices of different file formats. We support the conversion of hic to cool format via hic2cool, | 362 Conversion of Hi-C matrices of different file formats. We support the conversion of hic to cool format via hic2cool, |
363 and homer, HicPro, h5 and cool format to h5, cool, homer or ginteractions format. Moreover, hicConvertFormat accepts multiple input files | 363 and homer, HicPro, h5 and cool format to h5, cool, homer or ginteractions format. Moreover, hicConvertFormat accepts multiple input files |
364 from one format with different resolutions and creates a mcool file. Each original file is stored under the path e.g. ::/resolutions/10000. | 364 from one format with different resolutions and creates a mcool file. Each original file is stored under a path, e.g. matrix.mcool::/resolutions/10000. |
365 A batch computation is possible, the number of input files and output files needs to match, all input files need to be of the same format type and | 365 A batch computation is possible, the number of input files and output files needs to match, all input files need to be of the same format type and |
366 all output files too. | 366 all output files too. |
367 For input and output of cooler files special options are available, for all other formats they will be ignored. | 367 For input and output of cooler files, special options are available, for all other formats they will be ignored. |
368 HiCPro file format needs an additional bed file as input. | 368 HiCPro file format needs an additional bed file as input. |
369 | 369 |
370 | For more information about HiCExplorer please consider our documentation on readthedocs.io_ | 370 | For more information about HiCExplorer please consider our documentation on readthedocs.io_ |
371 | 371 |
372 .. _readthedocs.io: http://hicexplorer.readthedocs.io/en/latest/index.html | 372 .. _readthedocs.io: http://hicexplorer.readthedocs.io/en/latest/index.html |