changeset 6:a72b974c98a2 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/semibin commit 2c08a2e49a2844efe92340c5a9e9c8323e4a33d6
author iuc
date Tue, 28 Oct 2025 08:21:31 +0000
parents 2c7ed948eeed
children
files concatenate_fasta.xml macros.xml test-data/input_multi_sorted10_naming.bam test-data/input_multi_sorted1_naming.bam test-data/input_multi_sorted2_naming.bam test-data/input_multi_sorted3_naming.bam test-data/input_multi_sorted4_naming.bam test-data/input_multi_sorted5_naming.bam test-data/input_multi_sorted6_naming.bam test-data/input_multi_sorted7_naming.bam test-data/input_multi_sorted8_naming.bam test-data/input_multi_sorted9_naming.bam test-data/input_single.fasta.bz2 test-data/input_single.fasta.gz
diffstat 14 files changed, 29 insertions(+), 41 deletions(-) [+]
line wrap: on
line diff
--- a/concatenate_fasta.xml	Sun Aug 10 11:38:22 2025 +0000
+++ b/concatenate_fasta.xml	Tue Oct 28 08:21:31 2025 +0000
@@ -11,23 +11,23 @@
     <command detect_errors="exit_code"><![CDATA[
 #import re
 #for $e in $input_fasta
-    #set $identifier = re.sub('[^\s\w\-\\.]', '_', str($e.element_identifier))
-    #if $e.ext.endswith(".gz")
-gunzip -c '$e' > '${identifier}.fasta' &&
-    #else
-ln -s '$e' '${identifier}.fasta' &&
-    #end if
+    #set $identifier = re.sub('[^\s\w\-]', '_', str($e.element_identifier))
+    ln -s '$e' '${identifier}.$e.ext' &&
 #end for
 
 SemiBin2 concatenate_fasta
-    --input-fasta *.fasta
+    --input-fasta
+    #for $e in $input_fasta
+        #set $identifier = re.sub('[^\s\w\-]', '_', str($e.element_identifier))
+            '${identifier}.$e.ext'
+    #end for
     --output 'output'
     --separator '$separator'
     --compression none
     -m $min_len
     ]]></command>
     <inputs>
-        <param argument="--input-fasta" type="data" multiple="true" format="fasta,fasta.gz" label="Contig sequences"/>
+        <param argument="--input-fasta" type="data" multiple="true" format="fasta,fasta.gz,fasta.bz2" label="Contig sequences"/>
         <expand macro="separator"/>
         <expand macro="concat_min_len"/>
     </inputs>
@@ -41,9 +41,9 @@
             <param name="min_len" value="0"/>
             <output name="fasta" ftype="fasta">
                 <assert_contents>
-                    <has_text text=">input_single:g1k_0"/>
-                    <has_text text=">input_single_3:g4k_7"/>
-                    <has_text text=">input_single_2:g1k_0"/>
+                    <has_text text=">input_single_fasta:g1k_0"/>
+                    <has_text text=">input_single_3_fasta:g4k_7"/>
+                    <has_text text=">input_single_2_fasta:g1k_0"/>
                 </assert_contents>
             </output>
         </test>
--- a/macros.xml	Sun Aug 10 11:38:22 2025 +0000
+++ b/macros.xml	Tue Oct 28 08:21:31 2025 +0000
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <macros>
     <token name="@TOOL_VERSION@">2.1.0</token>
-    <token name="@VERSION_SUFFIX@">0</token>
+    <token name="@VERSION_SUFFIX@">1</token>
     <token name="@PROFILE@">21.01</token>
     <xml name="biotools">
         <xrefs>
@@ -79,7 +79,7 @@
         </param>
     </xml>
     <xml name="input-fasta-single">
-        <param argument="--input-fasta" type="data" format="fasta,fasta.gz" label="Contig sequences"/>
+        <param argument="--input-fasta" type="data" format="fasta,fasta.gz,fasta.bz2" label="Contig sequences"/>
     </xml>
     <xml name="input-fasta-multi">
         <conditional name="multi_fasta">
@@ -88,11 +88,11 @@
                 <option value="multi">1 contig file per sample</option>
             </param>
             <when value="concatenated">
-                <param argument="--input-fasta" type="data" format="fasta,fasta.gz" label="Combined contig sequences"/>
+                <param argument="--input-fasta" type="data" format="fasta,fasta.gz,fasta.bz2" label="Combined contig sequences"/>
                 <expand macro="separator"/>
             </when>
             <when value="multi">
-                <param argument="--input-fasta" type="data" multiple="true" format="fasta,fasta.gz" label="Contig sequences"/>
+                <param argument="--input-fasta" type="data" multiple="true" format="fasta,fasta.gz,fasta.bz2" label="Contig sequences"/>
                 <expand macro="concat_min_len"/>
             </when>
         </conditional>
@@ -101,39 +101,27 @@
         <param name="min_len" type="integer" min="0" value="0" label="Minimal length for contigs to be kept"/>
     </xml>
     <token name="@SINGLE_FASTA_FILES@"><![CDATA[
-#if $input_fasta.ext.endswith(".gz")
-gunzip -c '$input_fasta' > 'contigs.fasta' &&
-#else
-ln -s '$input_fasta' 'contigs.fasta' &&
-#end if
+ln -s '$input_fasta' 'contigs.$input_fasta.ext' &&
     ]]></token>
     <token name="@FASTA_FILES@"><![CDATA[
 #if $mode.select == 'single' or $mode.select == 'co'
-    #if $mode.input_fasta.ext.endswith(".gz")
-gunzip -c '$mode.input_fasta' > 'contigs.fasta' &&
-    #else
-ln -s '$mode.input_fasta' 'contigs.fasta' &&
-    #end if
+ln -s '$input_fasta' 'contigs.$input_fasta.ext' &&
 #else
     #if $mode.multi_fasta.select == 'concatenated'
-        #if $mode.multi_fasta.input_fasta.ext.endswith(".gz")
-gunzip -c '$mode.multi_fasta.input_fasta' > 'contigs.fasta' &&
-        #else
-ln -s '$mode.multi_fasta.input_fasta' 'contigs.fasta' &&
-        #end if
+ln -s '$input_fasta' 'contigs.$input_fasta.ext' &&
 #set $separator = $mode.multi_fasta.separator
     #else
         #for $e in $mode.multi_fasta.input_fasta
-            #set $identifier = re.sub('[^\s\w\-\\.]', '_', str($e.element_identifier))
-            #if $e.ext.endswith(".gz")
-gunzip -c '$e' > '${identifier}.fasta' &&
-            #else
-ln -s '$e' '${identifier}.fasta' &&
-            #end if
+            #set $identifier = re.sub('[^\s\w\-]', '_', str($e.element_identifier))
+ln -s '$e' '${identifier}.$e.ext' &&
         #end for
 #set $separator = ':'
 SemiBin2 concatenate_fasta
-    --input-fasta *.fasta
+    --input-fasta
+    #for $e in $mode.multi_fasta.input_fasta
+        #set $identifier = re.sub('[^\s\w\-]', '_', str($e.element_identifier))
+        '${identifier}.$e.ext'
+    #end for
     --output 'output'
     --separator '$separator'
     --compression none
@@ -158,18 +146,18 @@
     </xml>
     <token name="@BAM_FILES@"><![CDATA[
 #if $mode.select == 'single'
-#set $identifier = re.sub('[^\s\w\-\\.]', '_', str($mode.input_bam.element_identifier))
+#set $identifier = re.sub('[^\s\w\-]', '_', str($mode.input_bam.element_identifier))
 ln -s '$mode.input_bam' '${identifier}.bam' &&
 #else
     #for $e in $mode.input_bam
-        #set $identifier = re.sub('[^\s\w\-\\.]', '_', str($e.element_identifier))
+        #set $identifier = re.sub('[^\s\w\-]', '_', str($e.element_identifier))
 ln -s '$e' '${identifier}.bam' &&
     #end for
 #end if
     ]]></token>
     <token name="@STROBEALIGN_FILES@"><![CDATA[
 #for $e in $mode.align_select.abundance
-    #set $identifier = re.sub('[^\s\w\-\\.]', '_', str($e.element_identifier))
+    #set $identifier = re.sub('[^\s\w\-]', '_', str($e.element_identifier))
     ln -s '$e' '${identifier}.txt' &&
 #end for
     ]]></token>
@@ -513,4 +501,4 @@
             <citation type="doi">10.1038/s41467-022-29843-y</citation>
         </citations>
     </xml>
-</macros>
+</macros>
\ No newline at end of file
Binary file test-data/input_multi_sorted10_naming.bam has changed
Binary file test-data/input_multi_sorted1_naming.bam has changed
Binary file test-data/input_multi_sorted2_naming.bam has changed
Binary file test-data/input_multi_sorted3_naming.bam has changed
Binary file test-data/input_multi_sorted4_naming.bam has changed
Binary file test-data/input_multi_sorted5_naming.bam has changed
Binary file test-data/input_multi_sorted6_naming.bam has changed
Binary file test-data/input_multi_sorted7_naming.bam has changed
Binary file test-data/input_multi_sorted8_naming.bam has changed
Binary file test-data/input_multi_sorted9_naming.bam has changed
Binary file test-data/input_single.fasta.bz2 has changed
Binary file test-data/input_single.fasta.gz has changed