Repository 'nanoplot'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/nanoplot

Changeset 5:a3c4fe6f49ab (2022-06-16)
Previous changeset 4:edbb6c5028f5 (2020-01-19) Next changeset 6:0f1c34698076 (2023-02-24)
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/nanoplot/ commit 52e462654477b6acf9a087063d3ddb19f66f8b38
modified:
nanoplot.xml
test-data/HistogramReadlength.png
test-data/NanoStats.txt
test-data/NanoStats_post_filtering.txt
b
diff -r edbb6c5028f5 -r a3c4fe6f49ab nanoplot.xml
--- a/nanoplot.xml Sun Jan 19 19:03:02 2020 -0500
+++ b/nanoplot.xml Thu Jun 16 20:08:15 2022 +0000
[
b'@@ -1,38 +1,61 @@\n-<tool id="nanoplot" name="NanoPlot" version="@TOOL_VERSION@+galaxy1">\n+<tool id="nanoplot" name="NanoPlot" version="@TOOL_VERSION@+galaxy1" profile="20.05">\n     <description>Plotting suite for Oxford Nanopore sequencing data and alignments</description>\n     <macros>\n-        <token name="@TOOL_VERSION@">1.28.2</token>\n+        <token name="@TOOL_VERSION@">1.36.2</token>\n     </macros>\n     <requirements>\n         <requirement type="package" version="@TOOL_VERSION@">nanoplot</requirement>\n     </requirements>\n+    <stdio>\n+        <regex match="kaleido problem" source="stderr" level="fatal" description="No static plots are saved due to some kaleido problem" />\n+    </stdio>\n     <version_command>NanoPlot --version</version_command>\n     <command detect_errors="exit_code"><![CDATA[\n+## set TMPDIR if not already set by admin\n+## otherwise kalleido fails with `Less than 64MB of free space in temporary directory for shared memory files: 0`\n+## export TMPDIR=\\${TMPDIR:-\\$_GALAXY_JOB_TMP_DIR};\n+\n #set $myfiles = $mode.reads.files\n-\n #set reads_temp = []\n #if $mode.choice == \'combined\':\n     #for $i, $f in enumerate($myfiles)\n-        #if $f.ext == "fastqsanger":\n+        #if $f.ext.startswith("fastq"):\n             #set $extension = \'fastq\'\n         #else\n             #set $extension = $f.ext\n         #end if\n+        #if $f.ext.endswith(".gz"):\n+            #set $f = $extension + ".gz"\n+        #else if $f.ext.endswith(".bz"):\n+            #set $extension = $extension + "bz2"\n+        #end if\n         ln -s \'$f\' \'./read_${i}.$extension\' &&\n+        #if "bam" in $extension\n+            ln -s \'$f.metadata.bam_index\' \'./read_${i}.${extension}.bai\' &&\n+        #end if\n         $reads_temp.append("read_" + str($i) + "." + str($extension))\n     #end for\n #else\n-    #if $myfiles.ext == "fastqsanger":\n+    #if $myfiles.ext.startswith("fastq"):\n         #set $extension = \'fastq\'\n     #else\n         #set $extension = $myfiles.ext\n     #end if\n-    ln -s \'$mode.reads.files\' \'./read.$extension\' &&\n+    #if $myfiles.ext.endswith(".gz"):\n+        #set $extension = $extension + ".gz"\n+    #else if $myfiles.ext.endswith(".bz"):\n+        #set $extension = $extension + "bz2"\n+    #end if\n+    ln -s \'$myfiles\' \'./read.$extension\' &&\n+    #if "bam" in $extension\n+        ln -s \'$myfiles.metadata.bam_index\' \'./read.${extension}.bai\' &&\n+    #end if\n     $reads_temp.append("read." + str($extension))\n #end if\n \n NanoPlot\n     --threads \\${GALAXY_SLOTS:-4}\n+    --tsv_stats\n     --$mode.reads.type ${\' \'.join($reads_temp)}\n     #if $filter.maxlength\n         --maxlength $filter.maxlength\n@@ -46,15 +69,15 @@\n     #if $filter.minqual\n         --minqual $filter.minqual\n     #end if\n+    #if $filter.runtime_until\n+        -- $filter.runtime_until\n+    #end if\n     #if $filter.readtype\n         --readtype $filter.readtype\n     #end if\n     #if $customization.color\n         --color $customization.color\n     #end if\n-    #if $customization.format\n-        --format $customization.format\n-    #end if\n     #if $customization.plots\n         --plots ${str($customization.plots).replace(\',\', \' \')}\n     #end if\n@@ -63,8 +86,10 @@\n     $filter.percentqual\n     $filter.alength\n     $filter.barcoded\n+    $filter.no_supplementary\n     $customization.N50\n     -o \'.\'\n+    && >&2 cat *log\n     ]]></command>\n     <inputs>\n         <conditional name="mode">\n@@ -190,6 +215,11 @@\n                 optional="true"\n                 label="Drop reads with an average quality lower than specified."/>\n             <param\n+                type="integer"\n+                argument="--runtime_until"\n+                optional="true"\n+                label="Only take the N first hours of a run"/>\n+            <param\n                 type="select"\n                 argument="--readtype"\n                 optional="true"\n@@ -204,6 +234,12 @@\n                 truevalue="--barcoded"\n                 falsevalue=""\n                 label="Use if you want to split the summary file by'..b' post filtering" />\n+        <data name="read_length" format="png" from_work_dir="Non_weightedHistogramReadlength.png" label="${tool.name} on ${on_string}: Histogram Read Length"/>\n+        <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"/>\n     </outputs>\n     <tests>\n         <test>\n@@ -412,18 +430,30 @@\n                 <param name="choice" value="batch"/>\n                 <conditional name="reads">\n                     <param name="type" value="fastq_rich"/>\n-                    <param name="files" value="reads.fastq.gz" ftype="fastq.gz"/>\n+                    <param name="files" value="reads.fastq.gz" ftype="fastqsanger.gz"/>\n                 </conditional>\n             </conditional>\n             <section name="filter">\n                 <param name="downsample" value="800"/>\n             </section>\n             <section name="customization">\n-                <param name="plots" value="hex,kde"/>\n+                <param name="plots" value="kde"/>\n             </section>\n-            <output name="output_html" file="NanoPlot-report.html" ftype="html" lines_diff="8" />\n-            <output name="nanostats_post_filtering" file="NanoStats_post_filtering.txt" ftype="txt"/>\n-            <output name="read_length" file="HistogramReadlength.png" ftype="png" compare="sim_size" delta="3000"/>\n+            <output name="output_html" ftype="html">\n+                <assert_contents>\n+                    <has_text text="html"/>\n+                    <has_text text="mean_qual"/>\n+                </assert_contents>\n+            </output>\n+            <output name="nanostats" file="NanoStats.txt" ftype="tabular"/>\n+            <output name="nanostats_post_filtering" file="NanoStats_post_filtering.txt" ftype="tabular"/>\n+            <output name="read_length" ftype="png" file="HistogramReadlength.png" compare="sim_size">\n+            </output>\n+            <output name="log_read_length" ftype="png">\n+                <assert_contents>\n+                    <has_text text="PNG"/>\n+                </assert_contents>\n+            </output>\n         </test>\n         <test>\n             <conditional name="mode">\n@@ -439,15 +469,18 @@\n             </section>\n             <section name="customization">\n                 <param name="color" value="yellow"/>\n-                <param name="format" value="svg"/>\n             </section>\n-            <output name="output_html" file="bam-report.html" ftype="html" lines_diff="16">\n+            <output name="output_html" ftype="html">\n                 <assert_contents>\n                     <has_text text="html"/>\n                     <has_text text="Aligned read length vs Percent identity plot using dots"/> <!-- bam report specific -->\n                 </assert_contents>\n             </output>\n-            <output name="read_length" file="bam-LogTransformed_HistogramReadlength.svg" ftype="svg" compare="sim_size"/>\n+            <output name="read_length" ftype="png">\n+                <assert_contents>\n+                    <has_text text="PNG"/>\n+                </assert_contents>\n+            </output>\n         </test>\n         <test><!-- test with multiple input files -->\n              <conditional name="mode">\n@@ -460,8 +493,8 @@\n             <output name="output_html" ftype="html">\n                 <assert_contents>\n                     <has_text text="html"/>\n-                    <not_has_text text="Aligned read length vs Percent identity plot using dots"/> <!-- bam report specific -->\n-                    <has_text text="&lt;td&gt;9.0&lt;/td&gt;"/> <!--check both files were used 4+5 reads -->\n+                    <not_has_text text="Aligned read length vs Percent identity plot using dots"/>\n+                    <has_text text="&lt;td&gt;9&lt;/td&gt;"/> <!--check both files were used 4+5 reads -->\n                 </assert_contents>\n             </output>\n         </test>\n'
b
diff -r edbb6c5028f5 -r a3c4fe6f49ab test-data/HistogramReadlength.png
b
Binary file test-data/HistogramReadlength.png has changed
b
diff -r edbb6c5028f5 -r a3c4fe6f49ab test-data/NanoStats.txt
--- a/test-data/NanoStats.txt Sun Jan 19 19:03:02 2020 -0500
+++ b/test-data/NanoStats.txt Thu Jun 16 20:08:15 2022 +0000
b
@@ -1,6 +1,25 @@
-General summary:        
-Mean read length:           2,564.9
-Median read length:         1,910.0
-Number of reads:                9.0
-Read length N50:            4,275.0
-Total bases:               23,084.0
+Metrics dataset
+number_of_reads 371
+number_of_bases 8611871.0
+median_read_length 9390.0
+mean_read_length 23212.6
+read_length_stdev 42729.8
+n50 60395.0
+active_channels 169
+mean_qual 10.1
+median_qual 10.3
+longest_read_(with_Q):1 393431 (10.6)
+longest_read_(with_Q):2 341725 (11.8)
+longest_read_(with_Q):3 320662 (8.0)
+longest_read_(with_Q):4 226843 (9.1)
+longest_read_(with_Q):5 221901 (10.0)
+highest_Q_read_(with_length):1 13.3 (6333)
+highest_Q_read_(with_length):2 13.1 (5448)
+highest_Q_read_(with_length):3 12.9 (27834)
+highest_Q_read_(with_length):4 12.8 (20351)
+highest_Q_read_(with_length):5 12.8 (97730)
+Reads >Q5: 371 (100.0%) 8.6Mb
+Reads >Q7: 371 (100.0%) 8.6Mb
+Reads >Q10: 207 (55.8%) 4.7Mb
+Reads >Q12: 49 (13.2%) 0.9Mb
+Reads >Q15: 0 (0.0%) 0.0Mb
b
diff -r edbb6c5028f5 -r a3c4fe6f49ab test-data/NanoStats_post_filtering.txt
--- a/test-data/NanoStats_post_filtering.txt Sun Jan 19 19:03:02 2020 -0500
+++ b/test-data/NanoStats_post_filtering.txt Thu Jun 16 20:08:15 2022 +0000
b
@@ -1,27 +1,25 @@
-General summary:        
-Active channels:                169.0
-Mean read length:            23,212.6
-Mean read quality:               10.1
-Median read length:           9,390.0
-Median read quality:             10.3
-Number of reads:                371.0
-Read length N50:             60,395.0
-Total bases:              8,611,871.0
-Number, percentage and megabases of reads above quality cutoffs
->Q5: 371 (100.0%) 8.6Mb
->Q7: 371 (100.0%) 8.6Mb
->Q10: 207 (55.8%) 4.7Mb
->Q12: 49 (13.2%) 0.9Mb
->Q15: 0 (0.0%) 0.0Mb
-Top 5 highest mean basecall quality scores and their read lengths
-1: 13.3 (6333)
-2: 13.1 (5448)
-3: 12.9 (27834)
-4: 12.8 (20351)
-5: 12.8 (97730)
-Top 5 longest reads and their mean basecall quality score
-1: 393431 (10.6)
-2: 341725 (11.8)
-3: 320662 (8.0)
-4: 226843 (9.1)
-5: 221901 (10.0)
+Metrics dataset
+number_of_reads 371
+number_of_bases 8611871.0
+median_read_length 9390.0
+mean_read_length 23212.6
+read_length_stdev 42729.8
+n50 60395.0
+active_channels 169
+mean_qual 10.1
+median_qual 10.3
+longest_read_(with_Q):1 393431 (10.6)
+longest_read_(with_Q):2 341725 (11.8)
+longest_read_(with_Q):3 320662 (8.0)
+longest_read_(with_Q):4 226843 (9.1)
+longest_read_(with_Q):5 221901 (10.0)
+highest_Q_read_(with_length):1 13.3 (6333)
+highest_Q_read_(with_length):2 13.1 (5448)
+highest_Q_read_(with_length):3 12.9 (27834)
+highest_Q_read_(with_length):4 12.8 (20351)
+highest_Q_read_(with_length):5 12.8 (97730)
+Reads >Q5: 371 (100.0%) 8.6Mb
+Reads >Q7: 371 (100.0%) 8.6Mb
+Reads >Q10: 207 (55.8%) 4.7Mb
+Reads >Q12: 49 (13.2%) 0.9Mb
+Reads >Q15: 0 (0.0%) 0.0Mb