Mercurial > repos > iuc > nanoplot
comparison nanoplot.xml @ 5:a3c4fe6f49ab draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/nanoplot/ commit 52e462654477b6acf9a087063d3ddb19f66f8b38
author | iuc |
---|---|
date | Thu, 16 Jun 2022 20:08:15 +0000 |
parents | edbb6c5028f5 |
children | 0f1c34698076 |
comparison
equal
deleted
inserted
replaced
4:edbb6c5028f5 | 5:a3c4fe6f49ab |
---|---|
1 <tool id="nanoplot" name="NanoPlot" version="@TOOL_VERSION@+galaxy1"> | 1 <tool id="nanoplot" name="NanoPlot" version="@TOOL_VERSION@+galaxy1" profile="20.05"> |
2 <description>Plotting suite for Oxford Nanopore sequencing data and alignments</description> | 2 <description>Plotting suite for Oxford Nanopore sequencing data and alignments</description> |
3 <macros> | 3 <macros> |
4 <token name="@TOOL_VERSION@">1.28.2</token> | 4 <token name="@TOOL_VERSION@">1.36.2</token> |
5 </macros> | 5 </macros> |
6 <requirements> | 6 <requirements> |
7 <requirement type="package" version="@TOOL_VERSION@">nanoplot</requirement> | 7 <requirement type="package" version="@TOOL_VERSION@">nanoplot</requirement> |
8 </requirements> | 8 </requirements> |
9 <stdio> | |
10 <regex match="kaleido problem" source="stderr" level="fatal" description="No static plots are saved due to some kaleido problem" /> | |
11 </stdio> | |
9 <version_command>NanoPlot --version</version_command> | 12 <version_command>NanoPlot --version</version_command> |
10 <command detect_errors="exit_code"><![CDATA[ | 13 <command detect_errors="exit_code"><![CDATA[ |
14 ## set TMPDIR if not already set by admin | |
15 ## otherwise kalleido fails with `Less than 64MB of free space in temporary directory for shared memory files: 0` | |
16 ## export TMPDIR=\${TMPDIR:-\$_GALAXY_JOB_TMP_DIR}; | |
17 | |
11 #set $myfiles = $mode.reads.files | 18 #set $myfiles = $mode.reads.files |
12 | |
13 #set reads_temp = [] | 19 #set reads_temp = [] |
14 #if $mode.choice == 'combined': | 20 #if $mode.choice == 'combined': |
15 #for $i, $f in enumerate($myfiles) | 21 #for $i, $f in enumerate($myfiles) |
16 #if $f.ext == "fastqsanger": | 22 #if $f.ext.startswith("fastq"): |
17 #set $extension = 'fastq' | 23 #set $extension = 'fastq' |
18 #else | 24 #else |
19 #set $extension = $f.ext | 25 #set $extension = $f.ext |
20 #end if | 26 #end if |
27 #if $f.ext.endswith(".gz"): | |
28 #set $f = $extension + ".gz" | |
29 #else if $f.ext.endswith(".bz"): | |
30 #set $extension = $extension + "bz2" | |
31 #end if | |
21 ln -s '$f' './read_${i}.$extension' && | 32 ln -s '$f' './read_${i}.$extension' && |
33 #if "bam" in $extension | |
34 ln -s '$f.metadata.bam_index' './read_${i}.${extension}.bai' && | |
35 #end if | |
22 $reads_temp.append("read_" + str($i) + "." + str($extension)) | 36 $reads_temp.append("read_" + str($i) + "." + str($extension)) |
23 #end for | 37 #end for |
24 #else | 38 #else |
25 #if $myfiles.ext == "fastqsanger": | 39 #if $myfiles.ext.startswith("fastq"): |
26 #set $extension = 'fastq' | 40 #set $extension = 'fastq' |
27 #else | 41 #else |
28 #set $extension = $myfiles.ext | 42 #set $extension = $myfiles.ext |
29 #end if | 43 #end if |
30 ln -s '$mode.reads.files' './read.$extension' && | 44 #if $myfiles.ext.endswith(".gz"): |
45 #set $extension = $extension + ".gz" | |
46 #else if $myfiles.ext.endswith(".bz"): | |
47 #set $extension = $extension + "bz2" | |
48 #end if | |
49 ln -s '$myfiles' './read.$extension' && | |
50 #if "bam" in $extension | |
51 ln -s '$myfiles.metadata.bam_index' './read.${extension}.bai' && | |
52 #end if | |
31 $reads_temp.append("read." + str($extension)) | 53 $reads_temp.append("read." + str($extension)) |
32 #end if | 54 #end if |
33 | 55 |
34 NanoPlot | 56 NanoPlot |
35 --threads \${GALAXY_SLOTS:-4} | 57 --threads \${GALAXY_SLOTS:-4} |
58 --tsv_stats | |
36 --$mode.reads.type ${' '.join($reads_temp)} | 59 --$mode.reads.type ${' '.join($reads_temp)} |
37 #if $filter.maxlength | 60 #if $filter.maxlength |
38 --maxlength $filter.maxlength | 61 --maxlength $filter.maxlength |
39 #end if | 62 #end if |
40 #if $filter.minlength | 63 #if $filter.minlength |
44 --downsample $filter.downsample | 67 --downsample $filter.downsample |
45 #end if | 68 #end if |
46 #if $filter.minqual | 69 #if $filter.minqual |
47 --minqual $filter.minqual | 70 --minqual $filter.minqual |
48 #end if | 71 #end if |
72 #if $filter.runtime_until | |
73 -- $filter.runtime_until | |
74 #end if | |
49 #if $filter.readtype | 75 #if $filter.readtype |
50 --readtype $filter.readtype | 76 --readtype $filter.readtype |
51 #end if | 77 #end if |
52 #if $customization.color | 78 #if $customization.color |
53 --color $customization.color | 79 --color $customization.color |
54 #end if | |
55 #if $customization.format | |
56 --format $customization.format | |
57 #end if | 80 #end if |
58 #if $customization.plots | 81 #if $customization.plots |
59 --plots ${str($customization.plots).replace(',', ' ')} | 82 --plots ${str($customization.plots).replace(',', ' ')} |
60 #end if | 83 #end if |
61 $filter.drop_outliers | 84 $filter.drop_outliers |
62 $filter.loglength | 85 $filter.loglength |
63 $filter.percentqual | 86 $filter.percentqual |
64 $filter.alength | 87 $filter.alength |
65 $filter.barcoded | 88 $filter.barcoded |
89 $filter.no_supplementary | |
66 $customization.N50 | 90 $customization.N50 |
67 -o '.' | 91 -o '.' |
92 && >&2 cat *log | |
68 ]]></command> | 93 ]]></command> |
69 <inputs> | 94 <inputs> |
70 <conditional name="mode"> | 95 <conditional name="mode"> |
71 <param name="choice" type="select" label="Select multifile mode" help="When supplying multiple files, batch mode will run NanoPlot on each file separately, while combined mode will run NanoPlot once on all the reads together. When only supplying a single input file, this setting does not matter."> | 96 <param name="choice" type="select" label="Select multifile mode" help="When supplying multiple files, batch mode will run NanoPlot on each file separately, while combined mode will run NanoPlot once on all the reads together. When only supplying a single input file, this setting does not matter."> |
72 <option value="batch" selected="true">batch</option> | 97 <option value="batch" selected="true">batch</option> |
188 type="integer" | 213 type="integer" |
189 argument="--minqual" | 214 argument="--minqual" |
190 optional="true" | 215 optional="true" |
191 label="Drop reads with an average quality lower than specified."/> | 216 label="Drop reads with an average quality lower than specified."/> |
192 <param | 217 <param |
218 type="integer" | |
219 argument="--runtime_until" | |
220 optional="true" | |
221 label="Only take the N first hours of a run"/> | |
222 <param | |
193 type="select" | 223 type="select" |
194 argument="--readtype" | 224 argument="--readtype" |
195 optional="true" | 225 optional="true" |
196 label="Which read type to extract information about from summary."> | 226 label="Which read type to extract information about from summary."> |
197 <option value="1D">1D</option> | 227 <option value="1D">1D</option> |
202 type="boolean" | 232 type="boolean" |
203 argument="--barcoded" | 233 argument="--barcoded" |
204 truevalue="--barcoded" | 234 truevalue="--barcoded" |
205 falsevalue="" | 235 falsevalue="" |
206 label="Use if you want to split the summary file by barcode."/> | 236 label="Use if you want to split the summary file by barcode."/> |
237 <param | |
238 type="boolean" | |
239 argument="--no_supplementary" | |
240 truevalue="--no_supplementary" | |
241 falsevalue="" | |
242 label="Use if you want to remove supplementary alignments"/> | |
207 </section> | 243 </section> |
208 <section | 244 <section |
209 name="customization" | 245 name="customization" |
210 title="Options for customizing the plots created" | 246 title="Options for customizing the plots created" |
211 expanded="false"> | 247 expanded="false"> |
363 <option value="yellowgreen">yellowgreen</option> | 399 <option value="yellowgreen">yellowgreen</option> |
364 <option value="yellow">yellow</option> | 400 <option value="yellow">yellow</option> |
365 </param> | 401 </param> |
366 <param | 402 <param |
367 type="select" | 403 type="select" |
368 argument="--format" | |
369 optional="true" | |
370 label="Specify the output format of the plots."> | |
371 <option selected="True" value="png">png</option> | |
372 <option value="svg">svg</option> | |
373 </param> | |
374 <param | |
375 type="select" | |
376 argument="--plots" | 404 argument="--plots" |
377 optional="true" | 405 optional="true" |
378 multiple="true" | 406 multiple="true" |
379 display="checkboxes" | 407 display="checkboxes" |
380 label="Specify the bivariate format of the plots."> | 408 label="Specify the bivariate format of the plots."> |
381 <option value="kde">kde</option> | 409 <option value="kde">kernel density estimation (kde)</option> |
382 <option value="hex">hex</option> | 410 <option value="dot">dots (dot)</option> |
383 <option value="dot">dot</option> | |
384 <option value="pauvre">pauvre</option> | |
385 </param> | 411 </param> |
386 <param | 412 <param |
387 type="boolean" | 413 type="boolean" |
388 argument="--N50" | 414 argument="--N50" |
389 truevalue="--N50" | 415 truevalue="--N50" |
391 label="Show the N50 mark in the read length histogram."/> | 417 label="Show the N50 mark in the read length histogram."/> |
392 </section> | 418 </section> |
393 </inputs> | 419 </inputs> |
394 <outputs> | 420 <outputs> |
395 <data name="output_html" format="html" from_work_dir="NanoPlot-report.html" label="${tool.name} on ${on_string}: HTML report"/> | 421 <data name="output_html" format="html" from_work_dir="NanoPlot-report.html" label="${tool.name} on ${on_string}: HTML report"/> |
396 <data name="nanostats" format="txt" from_work_dir="NanoStats.txt" label="${tool.name} on ${on_string}: NanoStats"/> | 422 <data name="nanostats" format="tabular" from_work_dir="NanoStats.txt" label="${tool.name} on ${on_string}: NanoStats"/> |
397 <data name="nanostats_post_filtering" format="txt" from_work_dir="NanoStats_post_filtering.txt" label="${tool.name} on ${on_string}: NanoStats post filtering"/> | 423 <data name="nanostats_post_filtering" format="tabular" from_work_dir="NanoStats_post_filtering.txt" label="${tool.name} on ${on_string}: NanoStats post filtering" /> |
398 <data name="read_length" format="png" from_work_dir="HistogramReadlength.*" label="${tool.name} on ${on_string}: Histogram Read Length "> | 424 <data name="read_length" format="png" from_work_dir="Non_weightedHistogramReadlength.png" label="${tool.name} on ${on_string}: Histogram Read Length"/> |
399 <change_format> | 425 <data name="log_read_length" format="png" from_work_dir="Non_weightedLogTransformed_HistogramReadlength.png" label="${tool.name} on ${on_string}: Log Transformed Histogram Read Length"/> |
400 <when input="customization.format" value="svg" format="svg"/> | |
401 </change_format> | |
402 </data> | |
403 <data name="log_read_length" format="png" from_work_dir="LogTransformed_HistogramReadlength.*" label="${tool.name} on ${on_string}: Log Transformed Histogram Read Length "> | |
404 <change_format> | |
405 <when input="customization.format" value="svg" format="svg"/> | |
406 </change_format> | |
407 </data> | |
408 </outputs> | 426 </outputs> |
409 <tests> | 427 <tests> |
410 <test> | 428 <test> |
411 <conditional name="mode"> | 429 <conditional name="mode"> |
412 <param name="choice" value="batch"/> | 430 <param name="choice" value="batch"/> |
413 <conditional name="reads"> | 431 <conditional name="reads"> |
414 <param name="type" value="fastq_rich"/> | 432 <param name="type" value="fastq_rich"/> |
415 <param name="files" value="reads.fastq.gz" ftype="fastq.gz"/> | 433 <param name="files" value="reads.fastq.gz" ftype="fastqsanger.gz"/> |
416 </conditional> | 434 </conditional> |
417 </conditional> | 435 </conditional> |
418 <section name="filter"> | 436 <section name="filter"> |
419 <param name="downsample" value="800"/> | 437 <param name="downsample" value="800"/> |
420 </section> | 438 </section> |
421 <section name="customization"> | 439 <section name="customization"> |
422 <param name="plots" value="hex,kde"/> | 440 <param name="plots" value="kde"/> |
423 </section> | 441 </section> |
424 <output name="output_html" file="NanoPlot-report.html" ftype="html" lines_diff="8" /> | 442 <output name="output_html" ftype="html"> |
425 <output name="nanostats_post_filtering" file="NanoStats_post_filtering.txt" ftype="txt"/> | 443 <assert_contents> |
426 <output name="read_length" file="HistogramReadlength.png" ftype="png" compare="sim_size" delta="3000"/> | 444 <has_text text="html"/> |
445 <has_text text="mean_qual"/> | |
446 </assert_contents> | |
447 </output> | |
448 <output name="nanostats" file="NanoStats.txt" ftype="tabular"/> | |
449 <output name="nanostats_post_filtering" file="NanoStats_post_filtering.txt" ftype="tabular"/> | |
450 <output name="read_length" ftype="png" file="HistogramReadlength.png" compare="sim_size"> | |
451 </output> | |
452 <output name="log_read_length" ftype="png"> | |
453 <assert_contents> | |
454 <has_text text="PNG"/> | |
455 </assert_contents> | |
456 </output> | |
427 </test> | 457 </test> |
428 <test> | 458 <test> |
429 <conditional name="mode"> | 459 <conditional name="mode"> |
430 <param name="choice" value="combined"/> | 460 <param name="choice" value="combined"/> |
431 <conditional name="reads"> | 461 <conditional name="reads"> |
437 <param name="maxlength" value="2000"/> | 467 <param name="maxlength" value="2000"/> |
438 <param name="minlenght" value="1000"/> | 468 <param name="minlenght" value="1000"/> |
439 </section> | 469 </section> |
440 <section name="customization"> | 470 <section name="customization"> |
441 <param name="color" value="yellow"/> | 471 <param name="color" value="yellow"/> |
442 <param name="format" value="svg"/> | |
443 </section> | 472 </section> |
444 <output name="output_html" file="bam-report.html" ftype="html" lines_diff="16"> | 473 <output name="output_html" ftype="html"> |
445 <assert_contents> | 474 <assert_contents> |
446 <has_text text="html"/> | 475 <has_text text="html"/> |
447 <has_text text="Aligned read length vs Percent identity plot using dots"/> <!-- bam report specific --> | 476 <has_text text="Aligned read length vs Percent identity plot using dots"/> <!-- bam report specific --> |
448 </assert_contents> | 477 </assert_contents> |
449 </output> | 478 </output> |
450 <output name="read_length" file="bam-LogTransformed_HistogramReadlength.svg" ftype="svg" compare="sim_size"/> | 479 <output name="read_length" ftype="png"> |
480 <assert_contents> | |
481 <has_text text="PNG"/> | |
482 </assert_contents> | |
483 </output> | |
451 </test> | 484 </test> |
452 <test><!-- test with multiple input files --> | 485 <test><!-- test with multiple input files --> |
453 <conditional name="mode"> | 486 <conditional name="mode"> |
454 <param name="choice" value="combined"/> | 487 <param name="choice" value="combined"/> |
455 <conditional name="reads"> | 488 <conditional name="reads"> |
458 </conditional> | 491 </conditional> |
459 </conditional> | 492 </conditional> |
460 <output name="output_html" ftype="html"> | 493 <output name="output_html" ftype="html"> |
461 <assert_contents> | 494 <assert_contents> |
462 <has_text text="html"/> | 495 <has_text text="html"/> |
463 <not_has_text text="Aligned read length vs Percent identity plot using dots"/> <!-- bam report specific --> | 496 <not_has_text text="Aligned read length vs Percent identity plot using dots"/> |
464 <has_text text="<td>9.0</td>"/> <!--check both files were used 4+5 reads --> | 497 <has_text text="<td>9</td>"/> <!--check both files were used 4+5 reads --> |
465 </assert_contents> | 498 </assert_contents> |
466 </output> | 499 </output> |
467 </test> | 500 </test> |
468 </tests> | 501 </tests> |
469 <help> | 502 <help> |