diff tiara.xml @ 1:66058890173e draft default tip

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/tiara commit eb21d389502b053adf569eb53a0b4cc9e0864fbe
author bgruening
date Fri, 18 Oct 2024 11:50:31 +0000
parents 3f33a8ac8891
children
line wrap: on
line diff
--- a/tiara.xml	Thu May 30 11:10:39 2024 +0000
+++ b/tiara.xml	Fri Oct 18 11:50:31 2024 +0000
@@ -1,4 +1,4 @@
-<tool id="tiara" name="tiara" version="@TOOL_VERSION@+galaxy0" profile="21.05">
+<tool id="tiara" name="tiara" version="@TOOL_VERSION@+galaxy1" profile="21.05">
     <description>Deep-learning-based approach for identification of eukaryotic sequences in the metagenomic data </description>
     <macros>
         <import>macros.xml</import>
@@ -6,17 +6,12 @@
     <expand macro="biotools"/>
     <expand macro="requirements"/>
     <command detect_errors="exit_code"><![CDATA[ 
-        
+        mkdir ./results/ &&
         tiara 
         -t \${GALAXY_SLOTS:-4} 
         -i '$input' 
-        -o '$output'
+        -o ./results/main_result.txt
 
-        #if $taxonomy_filter
-            --tf #for $tf in $taxonomy_filter
-                $tf
-            #end for
-        #end if   
         #if $probabilities
             --pr '$probabilities'
         #end if
@@ -33,6 +28,15 @@
             --k1 $advanced_options.advance.first_stage_kmer
             --k2 $advanced_options.advance.second_stage_kmer
         #end if
+        #if $taxonomy_filter
+            --tf #for $tf in $taxonomy_filter
+                $tf
+            #end for
+            #for $tf in $taxonomy_filter
+              && ls -l ./results/
+              &&  mv ./results/${tf}*.dat ./results/${tf}.fasta
+            #end for
+        #end if
 
     ]]></command>
     <inputs>
@@ -43,9 +47,6 @@
             <option value="bac">bacteria</option>
             <option value="arc">archea</option>
             <option value="euk">eukarya</option>
-            <option value="unk">unknown</option>
-            <option value="pro">prokarya</option>
-            <option value="all">all</option>
         </param>
         <param argument="probabilities" type="boolean" truevalue="--pr" falsevalue="" checked="false" label="Add probabilities of individual classes for each sequence."/>
         <param argument="min_len" type="integer" value="3000" min="1000" optional="true" label="Minimum length of a sequence. Default: 3000 bp." help="Specify the desired minimum length in base pairs.Default value is 3000 bp and we do not recommend classifying sequences shorter than 1000 bp. "/>
@@ -77,48 +78,28 @@
         </section>
     </inputs>
     <outputs>
-        <data name="output" format="txt" label="${tool.name} on ${on_string}: sequence ID, classification results"/>
+        <collection name="output" type="list" label="${tool.name} on ${on_string}: classified sequences in txt and Fasta Output">
+            <discover_datasets pattern="__name_and_ext__"  ext="fasta,txt" directory="results" />
+        </collection>
     </outputs>
     <tests>
         <test expect_num_outputs="1">
             <param name="input" value="plast_fr.fasta.gz"/>
             <param name="taxonomy_filter" value="pla"/>
-            <output name="output" ftype="txt">
-                <assert_contents>
-                    <has_text_matching expression=".*sequence_id*"/>
-                    <has_n_lines n="11" delta="5"/>
-                </assert_contents>
-            </output>
-        </test>
-        <test expect_num_outputs="1">
-            <param name="input" value="mitplas1.fasta"/>
-            <param name="taxonomy_filter" value="pla,mit"/>
-            <output name="output" ftype="txt">
-                <assert_contents>
-                    <has_text_matching expression=".*sequence_id*"/>
-                    <has_n_lines n="30" delta="5"/>
-                </assert_contents>
-            </output>
+            <output_collection name="output" type="list">
+                <element name="main_result" file="main_result01.txt" ftype="txt"/>
+                <element name="pla" file="pla" ftype="fasta" />
+            </output_collection>
         </test>
         <test expect_num_outputs="1">
             <param name="input" value="sample_all.fasta"/>
-            <param name="taxonomy_filter" value="all"/>
-            <output name="output" ftype="txt">
-                <assert_contents>
-                    <has_text_matching expression=".*sequence_id*"/>
-                    <has_n_lines n="51" delta="5"/>
-                </assert_contents>
-            </output>
-        </test>
-        <test expect_num_outputs="1">
-            <param name="input" value="sample_all.fasta"/>
-            <param name="taxonomy_filter" value="euk,bac,arc,unk"/>
-            <output name="output" ftype="txt">
-                <assert_contents>
-                    <has_text_matching expression=".*sequence_id*"/>
-                    <has_n_lines n="51" delta="5"/>
-                </assert_contents>
-            </output>
+            <param name="taxonomy_filter" value="euk,bac,arc"/>
+            <output_collection name="output" type="list">
+                <element name="arc" file="arc" ftype="fasta" />
+                <element name="bac" file="bac" ftype="fasta" />
+                <element name="euk" file="euk" ftype="fasta" />
+                <element name="main_result" file="main_result02.txt" ftype="txt" />
+            </output_collection>
         </test>
         <test expect_num_outputs="1">
             <param name="input" value="eukarya_fr.fasta"/>
@@ -126,26 +107,11 @@
             <param name="min_len" value="5000"/>
             <param name="cutoff_stage1" value="0.65"/>
             <param name="cutoff_stage2" value="0.60"/>
-            <output name="output" ftype="txt">
-                <assert_contents>
-                    <has_text_matching expression=".*sequence_id*"/>
-                    <has_n_lines n="11" delta="5"/>
-                </assert_contents>
-            </output>
-        </test>
-        <test expect_num_outputs="1">
-            <param name="input" value="bacteria_fr.fasta"/>
-            <param name="taxonomy_filter" value="bac"/>
-            <param name="min_len" value="5000"/>
-            <param name="cutoff_stage1" value="0.65"/>
-            <param name="cutoff_stage2" value="0.60"/>
             <param name="probabilities" value="true"/>
-            <output name="output" ftype="txt">
-                <assert_contents>
-                    <has_text_matching expression=".*bac*"/>
-                    <has_n_lines n="11" delta="5"/>
-                </assert_contents>
-            </output>
+            <output_collection name="output" type="list">
+                <element name="euk" file="euk" ftype="fasta" />
+                <element name="main_result" file="main_result03.txt" ftype="txt" />
+            </output_collection>
         </test>
     </tests>
     <help><![CDATA[