Mercurial > repos > iuc > meryl
comparison meryl.xml @ 5:d63739222f68 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meryl commit b30f2a9974c569de148c3791d42ff7dc8d9b018c"
author | iuc |
---|---|
date | Sun, 23 May 2021 18:09:41 +0000 |
parents | d5d68989caec |
children | 31fa26c0692b |
comparison
equal
deleted
inserted
replaced
4:d5d68989caec | 5:d63739222f68 |
---|---|
5 </macros> | 5 </macros> |
6 <expand macro='edam_ontology' /> | 6 <expand macro='edam_ontology' /> |
7 <expand macro='requirements' /> | 7 <expand macro='requirements' /> |
8 <version_command>meryl --version</version_command> | 8 <version_command>meryl --version</version_command> |
9 <command detect_errors='exit_code'><![CDATA[ | 9 <command detect_errors='exit_code'><![CDATA[ |
10 export GALAXY_MEMORY_GB=\$((\${GALAXY_MEMORY_MB:-8192}/1024)) && | |
10 #if $operation_type.command_type == 'count-kmers' | 11 #if $operation_type.command_type == 'count-kmers' |
11 #if $operation_type.options_kmer_size.kmer_size == 'estimate' | 12 #if $operation_type.options_kmer_size.kmer_size == 'estimate' |
12 #from math import log | 13 #from math import log |
13 #set size=int(log(int($operation_type.options_kmer_size.genome_size)*(1-float($operation_type.options_kmer_size.collision_rate))/float($operation_type.options_kmer_size.collision_rate))/log(4)) | 14 #set size=int(log(int($operation_type.options_kmer_size.genome_size)*(1-float($operation_type.options_kmer_size.collision_rate))/float($operation_type.options_kmer_size.collision_rate))/log(4)) |
14 #elif $operation_type.options_kmer_size.kmer_size == 'provide' | 15 #elif $operation_type.options_kmer_size.kmer_size == 'provide' |
15 #set size=$operation_type.options_kmer_size.input_kmer_size | 16 #set size=$operation_type.options_kmer_size.input_kmer_size |
16 #end if | 17 #end if |
17 meryl | 18 meryl |
18 $operation_type.count_operations | 19 $operation_type.count_operations |
19 k=$size | 20 k=$size |
20 memory=\${GALAXY_MEMORY_GB:-1} | 21 memory=\$GALAXY_MEMORY_GB |
21 threads=\${GALAXY_SLOTS:-1} | 22 threads=\${GALAXY_SLOTS:-1} |
22 $operation_type.input_reads | 23 $operation_type.input_reads |
23 output read-db.meryl && | 24 output read-db.meryl && |
24 echo 'K-mer size: ${size}' && | 25 echo 'K-mer size: ${size}' && |
25 tar -zcf read-db.meryldb read-db.meryl | 26 tar -zcf read-db.meryldb read-db.meryl |
77 #elif $operation_type.options_kmer_size.kmer_size == 'provide' | 78 #elif $operation_type.options_kmer_size.kmer_size == 'provide' |
78 #set size=$operation_type.options_kmer_size.input_kmer_size | 79 #set size=$operation_type.options_kmer_size.input_kmer_size |
79 #end if | 80 #end if |
80 #for $i, $read in enumerate($paternal_reads): | 81 #for $i, $read in enumerate($paternal_reads): |
81 mkdir 'paternal{$i}.meryl' && | 82 mkdir 'paternal{$i}.meryl' && |
82 meryl count k=$size memory=\${GALAXY_MEMORY_GB:-1} threads=\${GALAXY_SLOTS:-1} '${read}' output 'paternal{$i}.meryl' && | 83 meryl count k=$size memory=\$GALAXY_MEMORY_GB threads=\${GALAXY_SLOTS:-1} '${read}' output 'paternal{$i}.meryl' && |
83 #end for | 84 #end for |
84 meryl union-sum paternal*.meryl output pat.meryl && | 85 meryl union-sum paternal*.meryl output pat.meryl && |
85 #for $i, $read in enumerate($maternal_reads): | 86 #for $i, $read in enumerate($maternal_reads): |
86 mkdir 'maternal{$i}.meryl' && | 87 mkdir 'maternal{$i}.meryl' && |
87 meryl count k=$size memory=\${GALAXY_MEMORY_GB:-1} threads=\${GALAXY_SLOTS:-1} '${read}' output 'maternal{$i}.meryl' && | 88 meryl count k=$size memory=\$GALAXY_MEMORY_GB threads=\${GALAXY_SLOTS:-1} '${read}' output 'maternal{$i}.meryl' && |
88 #end for | 89 #end for |
89 meryl union-sum maternal*.meryl output mat.meryl && | 90 meryl union-sum maternal*.meryl output mat.meryl && |
90 #for $i, $read in enumerate($child_reads): | 91 #for $i, $read in enumerate($child_reads): |
91 mkdir 'child{$i}.meryl' && | 92 mkdir 'child{$i}.meryl' && |
92 meryl count k=$size memory=\${GALAXY_MEMORY_GB:-1} threads=\${GALAXY_SLOTS:-1} '${read}' output 'child{$i}.meryl' && | 93 meryl count k=$size memory=\$GALAXY_MEMORY_GB threads=\${GALAXY_SLOTS:-1} '${read}' output 'child{$i}.meryl' && |
93 #end for | 94 #end for |
94 meryl union-sum child*.meryl output child.meryl && | 95 meryl union-sum child*.meryl output child.meryl && |
95 ## mat specific kmers | 96 ## mat specific kmers |
96 meryl difference mat.meryl pat.meryl output mat.only.meryl && | 97 meryl difference mat.meryl pat.meryl output mat.only.meryl && |
97 meryl histogram mat.only.meryl > mat.only.hist && | 98 meryl histogram mat.only.meryl > mat.only.hist && |
142 <inputs> | 143 <inputs> |
143 <conditional name="operation_type"> | 144 <conditional name="operation_type"> |
144 <param name="command_type" type="select" label="Operation type selector" help="Select a type of operation"> | 145 <param name="command_type" type="select" label="Operation type selector" help="Select a type of operation"> |
145 <option value="count-kmers">Count operations</option> | 146 <option value="count-kmers">Count operations</option> |
146 <option value="filter-kmers">Filter operations</option> | 147 <option value="filter-kmers">Filter operations</option> |
147 <option value="arithmetic-kmers">Arithmetic operations on kmer counts</option> | 148 <option value="arithmetic-kmers">Arithmetic operations on k-mer counts</option> |
148 <option value="groups-kmers">Operations on sets of k-mers</option> | 149 <option value="groups-kmers">Operations on sets of k-mers</option> |
149 <option value="histogram-kmers">Generate histogram dataset</option> | 150 <option value="histogram-kmers">Generate histogram dataset</option> |
150 <option value="print">Print kmer counts to a tabular file</option> | 151 <option value="print">Print k-mer counts to a tabular file</option> |
151 <option value="trio-mode">Build hap-mer dbs for trios</option> | 152 <option value="trio-mode">Build hap-mer dbs for trios</option> |
152 </param> | 153 </param> |
153 <when value="count-kmers"> | 154 <when value="count-kmers"> |
154 <param name="count_operations" type="select" label="Count operations" help="Select an operation to be executed"> | 155 <param name="count_operations" type="select" label="Count operations" help="Select an operation to be executed"> |
155 <option value="count">Count: count the occurrences of canonical k-mers</option> | 156 <option value="count">Count: count the occurrences of canonical k-mers</option> |
180 </param> | 181 </param> |
181 <param name="input_meryldb_02" type="data" format="meryldb" label="Input meryldb" help="Select a meryldb dataset" /> | 182 <param name="input_meryldb_02" type="data" format="meryldb" label="Input meryldb" help="Select a meryldb dataset" /> |
182 | 183 |
183 <conditional name="filter_type"> | 184 <conditional name="filter_type"> |
184 <param name="type" type="select" label="Type of filtering"> | 185 <param name="type" type="select" label="Type of filtering"> |
185 <option value="times">Return kmers that occur N times in the input</option> | 186 <option value="times">Return k-mers that occur N times in the input</option> |
186 <option value="frequency">Return kmers occurring at specific frequencies</option> | 187 <option value="frequency">Return k-mers occurring at specific frequencies</option> |
187 </param> | 188 </param> |
188 <when value="times"> | 189 <when value="times"> |
189 <param name="N" type="integer" min="0" max="50000000000" value="" optional="true" label="Number of times in the input" help="Return kmers that occur N times in the input."/> | 190 <param name="N" type="integer" min="0" max="50000000000" value="" optional="true" label="Number of times in the input" help="Return k-mers that occur N times in the input."/> |
190 </when> | 191 </when> |
191 <when value="frequency"> | 192 <when value="frequency"> |
192 <param name="distinct" type="float" min="0" max="1" value="0.9998" optional="true" label="Frequency" help="Return kmers that at specific frequency (e.g. frequency = 0.9998 returns top 0.02% most frequent)"/> | 193 <param name="distinct" type="float" min="0" max="1" value="0.9998" optional="true" label="Frequency" help="Return k-mers that at specific frequency (e.g. frequency = 0.9998 returns top 0.02% most frequent)"/> |
193 </when> | 194 </when> |
194 </conditional> | 195 </conditional> |
195 </when> | 196 </when> |
196 <when value="arithmetic-kmers"> | 197 <when value="arithmetic-kmers"> |
197 <param name="arithmetic_operations" type="select" label="Arithmetic operations" help="Select an operation to be executed"> | 198 <param name="arithmetic_operations" type="select" label="Arithmetic operations" help="Select an operation to be executed"> |
198 <option value="increase">Increase: add x to the count of each k-mer</option> | 199 <option value="increase">Increase: add x to the count of each k-mer</option> |
199 <option value="decrease">Decrease: subsctract x from the count of each k-mer</option> | 200 <option value="decrease">Decrease: subtract x from the count of each k-mer</option> |
200 <option value="multiply">Multiply: multiply the count of each k-mer by x</option> | 201 <option value="multiply">Multiply: multiply the count of each k-mer by x</option> |
201 <option value="divide">Divide: divide the count of each k-mer by x</option> | 202 <option value="divide">Divide: divide the count of each k-mer by x</option> |
202 <option value="divide-round">Divide-round: divide the count of each k-mer by x and round th results</option> | 203 <option value="divide-round">Divide-round: divide the count of each k-mer by x and round th results</option> |
203 <option value="modulo">Modulo: set the count of each k-mer to the remainder of the count divided by x</option> | 204 <option value="modulo">Modulo: set the count of each k-mer to the remainder of the count divided by x</option> |
204 </param> | 205 </param> |
205 <param name="input_meryldb_02" type="data" format="meryldb" label="Input meryldb" help="Select a meryldb dataset" /> | 206 <param name="input_meryldb_02" type="data" format="meryldb" label="Input meryldb" help="Select a meryldb dataset" /> |
206 <param name="X" type="integer" min="1" max="1000000" value="" optional="true" label="Operand" /> | 207 <param name="X" type="integer" min="1" max="1000000" value="" optional="true" label="Operand" /> |
207 </when> | 208 </when> |
208 <when value="groups-kmers"> | 209 <when value="groups-kmers"> |
209 <param name="groups_operations" type="select" label="Operations on sets of kmers" help="Select an operation to be executed"> | 210 <param name="groups_operations" type="select" label="Operations on sets of k-mers" help="Select an operation to be executed"> |
210 <option value="union">Union: return k-mers that occur in any input</option> | 211 <option value="union">Union: return k-mers that occur in any input</option> |
211 <option value="union-min">Union-min: return k-mers that occur in any input, set the count to the minimum count</option> | 212 <option value="union-min">Union-min: return k-mers that occur in any input, set the count to the minimum count</option> |
212 <option value="union-max">Union-max: return k-mers that occur in any input, set the count to the maximum count</option> | 213 <option value="union-max">Union-max: return k-mers that occur in any input, set the count to the maximum count</option> |
213 <option value="union-sum">Union-sum: return k-mers that occur in any input, set the count to the sum of the counts</option> | 214 <option value="union-sum">Union-sum: return k-mers that occur in any input, set the count to the sum of the counts</option> |
214 <option value="intersect">Intersect: return k-mers that occur in all inputs, set the count to the count in the first input</option> | 215 <option value="intersect">Intersect: return k-mers that occur in all inputs, set the count to the count in the first input</option> |
360 <param name="N" value="100" /> | 361 <param name="N" value="100" /> |
361 </conditional> | 362 </conditional> |
362 </conditional> | 363 </conditional> |
363 <output name="read_db" ftype="meryldb"> | 364 <output name="read_db" ftype="meryldb"> |
364 <assert_contents> | 365 <assert_contents> |
365 <has_size value="59378" delta="300" /> | 366 <has_size value="59100" delta="300" /> |
366 </assert_contents> | 367 </assert_contents> |
367 </output> | 368 </output> |
368 </test> | 369 </test> |
369 <test expect_num_outputs="1"> | 370 <test expect_num_outputs="1"> |
370 <conditional name="operation_type"> | 371 <conditional name="operation_type"> |
373 <param name="input_meryldb_02" value="read-db.meryldb" ftype="meryldb" /> | 374 <param name="input_meryldb_02" value="read-db.meryldb" ftype="meryldb" /> |
374 <param name="X" value="100000" /> | 375 <param name="X" value="100000" /> |
375 </conditional> | 376 </conditional> |
376 <output name="read_db" ftype="meryldb"> | 377 <output name="read_db" ftype="meryldb"> |
377 <assert_contents> | 378 <assert_contents> |
378 <has_size value="59822" delta="300" /> | 379 <has_size value="59500" delta="300" /> |
379 </assert_contents> | 380 </assert_contents> |
380 </output> | 381 </output> |
381 </test> | 382 </test> |
382 <test expect_num_outputs="1"> | 383 <test expect_num_outputs="1"> |
383 <conditional name="operation_type"> | 384 <conditional name="operation_type"> |
399 <param name="input_meryldb_02" value="read-db.meryldb" ftype="meryldb" /> | 400 <param name="input_meryldb_02" value="read-db.meryldb" ftype="meryldb" /> |
400 <param name="X" value="3" /> | 401 <param name="X" value="3" /> |
401 </conditional> | 402 </conditional> |
402 <output name="read_db" ftype="meryldb"> | 403 <output name="read_db" ftype="meryldb"> |
403 <assert_contents> | 404 <assert_contents> |
404 <has_size value="60531" delta="300" /> | 405 <has_size value="60530" delta="300" /> |
405 </assert_contents> | 406 </assert_contents> |
406 </output> | 407 </output> |
407 </test> | 408 </test> |
408 <test expect_num_outputs="1"> | 409 <test expect_num_outputs="1"> |
409 <conditional name="operation_type"> | 410 <conditional name="operation_type"> |
412 <param name="input_meryldb_02" value="read-db.meryldb" ftype="meryldb" /> | 413 <param name="input_meryldb_02" value="read-db.meryldb" ftype="meryldb" /> |
413 <param name="X" value="2" /> | 414 <param name="X" value="2" /> |
414 </conditional> | 415 </conditional> |
415 <output name="read_db" ftype="meryldb"> | 416 <output name="read_db" ftype="meryldb"> |
416 <assert_contents> | 417 <assert_contents> |
417 <has_size value="56569" delta="300" /> | 418 <has_size value="56200" delta="300" /> |
418 </assert_contents> | 419 </assert_contents> |
419 </output> | 420 </output> |
420 </test> | 421 </test> |
421 <test expect_num_outputs="1"> | 422 <test expect_num_outputs="1"> |
422 <conditional name="operation_type"> | 423 <conditional name="operation_type"> |
425 <param name="input_meryldb_02" value="read-db.meryldb" ftype="meryldb" /> | 426 <param name="input_meryldb_02" value="read-db.meryldb" ftype="meryldb" /> |
426 <param name="X" value="2" /> | 427 <param name="X" value="2" /> |
427 </conditional> | 428 </conditional> |
428 <output name="read_db" ftype="meryldb"> | 429 <output name="read_db" ftype="meryldb"> |
429 <assert_contents> | 430 <assert_contents> |
430 <has_size value="56539" delta="300" /> | 431 <has_size value="56100" delta="300" /> |
431 </assert_contents> | 432 </assert_contents> |
432 </output> | 433 </output> |
433 </test> | 434 </test> |
434 <!-- test 11 --> | 435 <!-- test 11 --> |
435 <test expect_num_outputs="1"> | 436 <test expect_num_outputs="1"> |
452 <param name="input_meryldb_02" value="output_02.read-db.meryldb" ftype="meryldb" /> | 453 <param name="input_meryldb_02" value="output_02.read-db.meryldb" ftype="meryldb" /> |
453 <param name="input_meryldb_03" value="output_03.read-db.meryldb" ftype="meryldb" /> | 454 <param name="input_meryldb_03" value="output_03.read-db.meryldb" ftype="meryldb" /> |
454 </conditional> | 455 </conditional> |
455 <output name="read_db" ftype="meryldb"> | 456 <output name="read_db" ftype="meryldb"> |
456 <assert_contents> | 457 <assert_contents> |
457 <has_size value="36417" delta="300" /> | 458 <has_size value="36100" delta="300" /> |
458 </assert_contents> | 459 </assert_contents> |
459 </output> | 460 </output> |
460 </test> | 461 </test> |
461 <test expect_num_outputs="1"> | 462 <test expect_num_outputs="1"> |
462 <conditional name="operation_type"> | 463 <conditional name="operation_type"> |
491 <param name="input_meryldb_02" value="output_02.read-db.meryldb" ftype="meryldb" /> | 492 <param name="input_meryldb_02" value="output_02.read-db.meryldb" ftype="meryldb" /> |
492 <param name="input_meryldb_03" value="output_03.read-db.meryldb" ftype="meryldb" /> | 493 <param name="input_meryldb_03" value="output_03.read-db.meryldb" ftype="meryldb" /> |
493 </conditional> | 494 </conditional> |
494 <output name="read_db" ftype="meryldb"> | 495 <output name="read_db" ftype="meryldb"> |
495 <assert_contents> | 496 <assert_contents> |
496 <has_size value="59004" delta="350" /> | 497 <has_size value="58600" delta="300" /> |
497 </assert_contents> | 498 </assert_contents> |
498 </output> | 499 </output> |
499 </test> | 500 </test> |
500 <test expect_num_outputs="1"> | 501 <test expect_num_outputs="1"> |
501 <conditional name="operation_type"> | 502 <conditional name="operation_type"> |