diff abyss-pe.xml @ 10:8f1b150a2487 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/abyss commit 4ad8aac500f821c9ad069e5e8723a0d8af4d2700"
author iuc
date Wed, 12 Jan 2022 17:04:56 +0000
parents 890b794c997d
children 7547fcab5d19
line wrap: on
line diff
--- a/abyss-pe.xml	Tue Jan 04 09:57:32 2022 +0000
+++ b/abyss-pe.xml	Wed Jan 12 17:04:56 2022 +0000
@@ -1,10 +1,11 @@
-<tool id="abyss-pe" name="ABySS" version="@TOOL_VERSION@+galaxy0">
+<tool id="abyss-pe" name="ABySS" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@">
     <description>de novo sequence assembler</description>
     <xrefs>
         <xref type="bio.tools">abyss</xref>
     </xrefs>
     <macros>
         <token name="@TOOL_VERSION@">2.3.4</token>
+        <token name="@VERSION_SUFFIX@">1</token>
         <xml name="reads_conditional">
             <conditional name="reads">
                 <param name="reads_selector" type="select" label="Type of paired-end datasets">
@@ -38,6 +39,49 @@
     </stdio>
     <version_command>ABYSS --version | head -n 1</version_command>
     <command><![CDATA[
+
+#def get_link_fname($data, $prefix, $index)
+    ## Make a name for symlinked files including extension
+    #return ''.join([str($prefix), '_', str($index), '.', str($data.ext)])
+#end def
+
+## Go through all inputs and create symbolic links
+#for $i, $v in enumerate($lib_repeat)
+    #if $v.reads.reads_selector == 'paired'
+        ln -s $v.reads.reads1 $get_link_fname($v.reads.reads1, 'lib_reads1', $i) &&
+        ln -s $v.reads.reads2 $get_link_fname($v.reads.reads2, 'lib_reads2', $i) &&
+    #elif $v.reads.reads_selector == 'paired_collection'
+        ln -s $v.reads.reads_coll.forward $get_link_fname($v.reads.reads_coll.forward, 'lib_reads_coll_forward', $i) &&
+        ln -s $v.reads.reads_coll.reverse $get_link_fname($v.reads.reads_coll.reverse, 'lib_reads_coll_reverse', $i) &&
+    #else
+        ln -s $v.reads.reads_il $get_link_fname($v.reads.reads_il, 'lib_reads_il', $i) &&
+    #end if
+#end for
+
+#for $i, $v in enumerate($mp_repeat)
+    #if $v.reads.reads_selector == 'paired'
+        ln -s $v.reads.reads1 $get_link_fname($v.reads.reads1, 'mp_reads1', $i) &&
+        ln -s $v.reads.reads2 $get_link_fname($v.reads.reads2, 'mp_reads2', $i) &&
+    #elif $v.reads.reads_selector == 'paired_collection'
+        ln -s $v.reads.reads_coll.forward $get_link_fname($v.reads.reads_coll.forward, 'mp_reads_coll_forward', $i) &&
+        ln -s $v.reads.reads_coll.reverse $get_link_fname($v.reads.reads_coll.reverse, 'mp_reads_coll_reverse', $i) &&
+    #else
+        ln -s $v.reads.reads_il $get_link_fname($v.reads.reads_il, 'mp_reads_il', $i) &&
+    #end if
+#end for
+
+#if str($se_reads) != 'None'
+    #for $i, $v in enumerate($se_reads)
+        ln -s $v $get_link_fname($v, 'se_reads', $i) &&
+    #end for
+#end if
+
+#if str($long_seqs) != 'None'
+    #for $i, $v in enumerate($long_seqs)
+        ln -s $v $get_link_fname($v, 'long_seqs', $i) &&
+    #end for
+#end if
+
 abyss-pe
 name=abyss
 j=\${GALAXY_SLOTS:-1}
@@ -99,52 +143,36 @@
     N='$N'
 #end if
 #if $lib_repeat
-    lib='
-    #for $i in range(len($lib_repeat))
-        lib$i
-    #end for
-    '
+    lib='${' '.join(['lib'+str($i) for $i in range(len($lib_repeat))])}'
     #for $i, $v in enumerate($lib_repeat)
         #if $v.reads.reads_selector == 'paired'
-            lib${i}='${v.reads.reads1} ${v.reads.reads2}'
+            lib${i}='${get_link_fname($v.reads.reads1, "lib_reads1", $i)} ${get_link_fname($v.reads.reads2, "lib_reads2", $i)}'
         #elif $v.reads.reads_selector == 'paired_collection'
-            lib${i}='${v.reads.reads_coll.forward} ${v.reads.reads_coll.reverse}'
+            lib${i}='$get_link_fname($v.reads.reads_coll.forward, "lib_reads_coll_forward", $i)} ${get_link_fname($v.reads.reads_coll.reverse, "lib_reads_coll_reverse", $i)}'
         #else
-            lib${i}='${v.reads.reads_il}'
+            lib${i}='${get_link_fname($v.reads.reads_il, "lib_reads_il", $i)}'
         #end if
     #end for
 #end if
 #if str($se_reads) != 'None'
-    se='
-    #for $v in $se_reads
-        $v
-    #end for
-    '
+    se='${' '.join([$get_link_fname($v, "se_reads", $i) for $i, $v in enumerate($se_reads)])}'
 #end if
 #if $mp_repeat
-    mp='
-    #for $i in range(len($mp_repeat))
-        mp$i
-    #end for
-    '
+    mp='${' '.join(['mp'+str($i) for $i in range(len($mp_repeat))])}'
     #for $i, $v in enumerate($mp_repeat)
         #if $v.reads.reads_selector == 'paired'
-            mp${i}='${v.reads.reads1} ${v.reads.reads2}'
+            mp${i}='${get_link_fname($v.reads.reads1, "mp_reads1", $i)} ${get_link_fname($v.reads.reads2, "mp_reads2", $i)}'
         #elif $v.reads.reads_selector == 'paired_collection'
-            mp${i}='${v.reads.reads_coll.forward} ${v.reads.reads_coll.reverse}'
+            mp${i}='$get_link_fname($v.reads.reads_coll.forward, "mp_reads_coll_forward", $i)} ${get_link_fname($v.reads.reads_coll.reverse, "mp_reads_coll_reverse", $i)}'
         #else
-            mp${i}='${v.reads.reads_il}'
+            mp${i}='${get_link_fname($v.reads.reads_il, "mp_reads_il", $i)}'
         #end if
     #end for
 #end if
 #if str($long_seqs) != 'None'
-    long='
-    #for $i in range(len($long_seqs))
-        long$i
-    #end for
-    '
+    long='${' '.join(['long'+str($i) for $i in range(len($long_seqs))])}'
     #for $i, $v in enumerate($long_seqs)
-        long${i}='$v'
+        long$i='${get_link_fname($v, "long_seqs", $i)}'
     #end for
 #end if
     ]]></command>
@@ -203,8 +231,8 @@
             <repeat name="lib_repeat">
                 <conditional name="reads">
                     <param name="reads_selector" value="paired" />
-                    <param name="reads1" ftype="fastqsanger" value="assembly_sample-R1.fastq.gz" />
-                    <param name="reads2" ftype="fastqsanger" value="assembly_sample-R2.fastq.gz" />
+                    <param name="reads1" ftype="fastqsanger.gz" value="assembly_sample-R1.fastq.gz" />
+                    <param name="reads2" ftype="fastqsanger.gz" value="assembly_sample-R2.fastq.gz" />
                 </conditional>
             </repeat>
             <param name="k" value="50" />
@@ -215,15 +243,15 @@
             <output name="stats" file="abyss-stats1.tab" />
         </test>
         <test>
-            <param name="se_reads" ftype="fastqsanger" value="assembly_sample-R1.fastq.gz,assembly_sample-R2.fastq.gz" />
+            <param name="se_reads" ftype="fastq.gz" value="assembly_sample-R1.fastq.gz,assembly_sample-R2.fastq.gz" />
             <param name="k" value="50" />
             <output name="unitigs" file="abyss-unitigs2.fa" />
             <output name="indels" file="empty_file.fasta" />
             <output name="stats" file="abyss-stats2.tab" />
         </test>
         <test>
-            <param name="se_reads" ftype="fastqsanger" value="assembly_sample-R1.fastq.gz,assembly_sample-R2.fastq.gz" />
-            <param name="long_seqs" ftype="fastqsanger" value="assembly_sample-R2.fastq.gz" />
+            <param name="se_reads" ftype="fasta" value="assembly_sample-R1.fasta,assembly_sample-R2.fasta" />
+            <param name="long_seqs" ftype="fasta" value="assembly_sample-R2.fasta" />
             <param name="k" value="50" />
             <output name="unitigs" file="abyss-unitigs3.fa" />
             <output name="long_scaffolds" file="abyss-long-scaffolds3.fa" />