diff unique.seqs.xml @ 1:a8d6c0935377 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit ea40e3d84e7850eb4226d6c85f709dcad18d4ba9
author iuc
date Thu, 18 May 2017 18:19:28 -0400
parents 4098a8c01660
children 84e71b1537f3
line wrap: on
line diff
--- a/unique.seqs.xml	Fri Jun 24 16:54:29 2016 -0400
+++ b/unique.seqs.xml	Thu May 18 18:19:28 2017 -0400
@@ -4,34 +4,58 @@
         <import>macros.xml</import>
     </macros>
     <expand macro="requirements"/>
+    <expand macro="stdio"/>
     <expand macro="version_command"/>
-    <command detect_errors="aggressive"><![CDATA[
+    <command><![CDATA[
+        @SHELL_OPTIONS@
+
         ## create symlinks to input datasets
         ln -s "$names" names.dat &&
         ln -s "$fasta" fasta.dat &&
 
         echo 'unique.seqs(
-            #if $names:
+            #if $names.is_of_type('mothur.names'):
                 name=names.dat,
+            #elif $names.is_of_type('mothur.count_table'):
+                count=names.dat,
             #end if
             fasta=fasta.dat
         )'
         | sed 's/ //g'  ## mothur trips over whitespace
         | mothur
+        | tee mothur.out.log
     ]]></command>
     <inputs>
         <param name="fasta" type="data" format="fasta" label="fasta - Sequences to filter"/>
-        <param name="names" type="data" format="mothur.names" optional="true" label="names - Sequences Names"/>
+        <param name="names" type="data" format="mothur.names,mothur.count_table" optional="true" label="name file or count table - Sequences Names"/>
     </inputs>
     <outputs>
         <expand macro="logfile-output"/>
         <data name="out_fasta" format_source="fasta" from_work_dir="fasta*.unique.*" label="${tool.name} on ${on_string}: fasta"/>
-        <data name="out_names" format="mothur.names" from_work_dir="fasta*.names" label="${tool.name} on ${on_string}: names"/>
+        <data name="out_names" format="mothur.names" from_work_dir="fasta*.names" label="${tool.name} on ${on_string}: names">
+            <filter>names.ext != "mothur.count_table"</filter>
+        </data>
+        <data name="out_count" format="mothur.count_table" from_work_dir="fasta*.count_table" label="${tool.name} on ${on_string}: count_table">
+            <filter>names and names.ext == "mothur.count_table"</filter>
+        </data>
     </outputs>
     <tests>
-        <test>
+        <test><!-- test with names file -->
             <param name="fasta" value="amazon.fasta"/>
-            <param name="names" value="amazon.names"/>
+            <param name="names" value="amazon1.names" ftype="mothur.names"/>
+            <output name="out_fasta" file="amazon.unique.fasta" ftype="fasta"/>
+            <output name="out_names" file="amazon.unique.names" ftype="mothur.names"/>
+            <expand macro="logfile-test"/>
+        </test>
+        <test><!-- test with count file -->
+            <param name="fasta" value="amazon.unique.fasta"/>
+            <param name="names" value="amazon.count_table" ftype="mothur.count_table"/>
+            <output name="out_fasta" file="amazon.unique.fasta" ftype="fasta"/>
+            <output name="out_count" md5="2024cbb895f79346606ab196dd130639" ftype="mothur.count_table"/>
+            <expand macro="logfile-test"/>
+        </test>
+        <test><!-- test wth fasta only -->
+            <param name="fasta" value="amazon.fasta"/>
             <output name="out_fasta" file="amazon.unique.fasta" ftype="fasta"/>
             <output name="out_names" file="amazon.unique.names" ftype="mothur.names"/>
             <expand macro="logfile-test"/>
@@ -42,12 +66,12 @@
 
 @MOTHUR_OVERVIEW@
 
-**Command Documenation**
+**Command Documentation**
 
 The unique.seqs_ command returns only the unique sequences found in a fasta-formatted sequence file and a name_ file that indicates those sequences that are identical to the reference sequence.
 
-.. _name: http://www.mothur.org/wiki/Name_file
-.. _unique.seqs: http://www.mothur.org/wiki/Unique.seqs
+.. _name: https://www.mothur.org/wiki/Name_file
+.. _unique.seqs: https://www.mothur.org/wiki/Unique.seqs
 
 ]]>
     </help>