changeset 8:a02b8b3f5a0c draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/nanoplot/ commit af418b2445709e63d3ed744f93fe74559e4fbaff
author iuc
date Wed, 10 Apr 2024 14:30:37 +0000
parents 7b379e98b9a9
children a38bdcec9e4c
files nanoplot.xml
diffstat 1 files changed, 11 insertions(+), 38 deletions(-) [+]
line wrap: on
line diff
--- a/nanoplot.xml	Thu Mar 07 08:46:06 2024 +0000
+++ b/nanoplot.xml	Wed Apr 10 14:30:37 2024 +0000
@@ -1,4 +1,4 @@
-<tool id="nanoplot" name="NanoPlot" version="@TOOL_VERSION@+galaxy0" profile="22.05">
+<tool id="nanoplot" name="NanoPlot" version="@TOOL_VERSION@+galaxy1" profile="22.05">
     <description>Plotting suite for Oxford Nanopore sequencing data and alignments</description>
     <macros>
         <token name="@TOOL_VERSION@">1.42.0</token>
@@ -16,47 +16,20 @@
     </stdio-->
     <version_command>NanoPlot --version</version_command>
     <command detect_errors="exit_code"><![CDATA[
-## set TMPDIR if not already set by admin
-## otherwise kalleido fails with `Less than 64MB of free space in temporary directory for shared memory files: 0`
-## export TMPDIR=\${TMPDIR:-\$_GALAXY_JOB_TMP_DIR};
-
-#set $myfiles = $mode.reads.files
+#set $myfiles = $mode.reads.files if $mode.choice == 'combined' else [$mode.reads.files]
 #set reads_temp = []
-#if $mode.choice == 'combined':
-    #for $i, $f in enumerate($myfiles)
-        #if $f.ext.startswith("fastq"):
-            #set $extension = 'fastq'
-        #else
-            #set $extension = $f.ext
-        #end if
-        #if $f.ext.endswith(".gz"):
-            #set $f = $extension + ".gz"
-        #else if $f.ext.endswith(".bz"):
-            #set $extension = $extension + "bz2"
-        #end if
-        ln -s '$f' './read_${i}.$extension' &&
-        #if "bam" in $extension
-            ln -s '$f.metadata.bam_index' './read_${i}.${extension}.bai' &&
-        #end if
-        $reads_temp.append("read_" + str($i) + "." + str($extension))
-    #end for
-#else
-    #if $myfiles.ext.startswith("fastq"):
-        #set $extension = 'fastq'
+#for $i, $f in enumerate($myfiles)
+    #if $f.ext.startswith("fastq"):
+       #set $extension = "fastq" if "." not in $f.ext else "fastq.%s" % $f.ext.split(".")[-1]
     #else
-        #set $extension = $myfiles.ext
-    #end if
-    #if $myfiles.ext.endswith(".gz"):
-        #set $extension = $extension + ".gz"
-    #else if $myfiles.ext.endswith(".bz"):
-        #set $extension = $extension + "bz2"
+        #set $extension = $f.ext
     #end if
-    ln -s '$myfiles' './read.$extension' &&
-    #if "bam" in $extension
-        ln -s '$myfiles.metadata.bam_index' './read.${extension}.bai' &&
+    ln -s '$f' './read_${i}.$extension' &&
+    #if $extension == "bam"
+        ln -s '$f.metadata.bam_index' './read_${i}.${extension}.bai' &&
     #end if
-    $reads_temp.append("read." + str($extension))
-#end if
+    $reads_temp.append("read_" + str($i) + "." + str($extension))
+#end for
 
 NanoPlot
     --threads \${GALAXY_SLOTS:-4}