diff create.database.xml @ 1:122c47c8dad6 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:10:46 -0400
parents 6efb9d6ab2b1
children 0ec0e6261ee6
line wrap: on
line diff
--- a/create.database.xml	Fri Jun 24 16:28:52 2016 -0400
+++ b/create.database.xml	Thu May 18 18:10:46 2017 -0400
@@ -4,44 +4,47 @@
         <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 "$otu" otu.dat &&
+        ln -s "$repfasta" repfasta.dat &&
+        ln -s "$nameOrCount" nameOrCount.dat &&
+        ln -s "$constaxonomy" constaxonomy.dat &&
         ln -s "$group" group.dat &&
-        ln -s "$count" count.dat &&
-        ln -s "$repfasta" repfasta.dat &&
-        ln -s "$repname" repname.dat &&
-        ln -s "$constaxonomy" constaxonomy.dat &&
 
         echo 'create.database(
             #if $otu.is_of_type("mothur.list"):
                 list=otu.dat
-            #else
+            #elif $otu.is_of_type("mothur.shared"):
                 shared=otu.dat
             #end if
             ,repfasta=repfasta.dat
-            ,repname=repname.dat
+            #if $nameOrCount.is_of_type("mothur.names"):
+                ,repname=nameOrCount.dat
+            #elif $nameOrCount.is_of_type("mothur.count_table"):
+                ,count=nameOrCount.dat
+            #end if
             ,constaxonomy=constaxonomy.dat
-            #if $label:
-                ,label=$label
-            #end if
             #if $group:
                 ,group=group.dat
             #end if
-            #if $count:
-                ,count=count.dat
+            #if $label:
+                ,label=$label
             #end if
         )'
         | sed 's/ //g'  ## mothur trips over whitespace
         | mothur
+        | tee mothur.out.log
     ]]></command>
     <inputs>
         <param name="otu" type="data" format="mothur.list,mothur.shared" label="list or shared - OTU List of Shared"/>
-        <param name="repfasta" type="data" format="fasta" label="repfasta - rep.fasta" help="rep.fasta file output by get.oturep"/>
-        <param name="repname" type="data" format="mothur.names" label="repname - rep.names" help="rep.names file output by get.oturep"/>
+        <param name="repfasta" type="data" format="fasta" label="repfasta - rep.fasta" help="rep.fasta file generated by get.oturep"/>
+        <param name="nameOrCount" type="data" format="mothur.names,mothur.count_table" label="repname/count - Representative sequences" help="rep.name file or rep.count_table file generated by get.oturep"/>
         <param name="constaxonomy" type="data" format="mothur.cons.taxonomy" label="constaxonomy - Consensus Taxonomy" help="consensus taxonomy file output by classify.otu"/>
-        <param name="count" type="data" format="mothur.count_table" optional="true" label="count file - count_table"/>
         <param name="group" type="data" format="mothur.groups" optional="true" label="group - Groups for summary file"/>
         <param name="label" type="select" label="label - OTU Labels" optional="true" help="Select exactly one label. If none selected, first label in your list or shared file will be used">
             <expand macro="labeloptions"/>
@@ -52,12 +55,23 @@
         <data name="database" format="tabular" from_work_dir="otu*.database" label="${tool.name} on ${on_string}: database"/>
     </outputs>
     <tests>
+        <!-- Test with a mothur.names file -->
         <test>
             <param name="otu" value="cd-test.list" ftype="mothur.list"/>
             <param name="repfasta" value="cd-test.repfasta" ftype="fasta"/>
-            <param name="repname" value="cd-test.repname" ftype="mothur.names"/>
+            <param name="nameOrCount" value="cd-test.repname" ftype="mothur.names"/>
+            <param name="constaxonomy" value="cd-test.constaxonomy" ftype="mothur.cons.taxonomy"/>
             <param name="label" value="unique"/>
+            <output name="database" file="cd-test.database" ftype="tabular"/>
+            <expand macro="logfile-test"/>
+        </test>
+        <!-- Test with a mothur.count_table file -->
+        <test>
+            <param name="otu" value="cd-test.list" ftype="mothur.list"/>
+            <param name="repfasta" value="cd-test.repfasta" ftype="fasta"/>
+            <param name="nameOrCount" value="cd-test.count_table" ftype="mothur.count_table"/>
             <param name="constaxonomy" value="cd-test.constaxonomy" ftype="mothur.cons.taxonomy"/>
+            <param name="label" value="unique"/>
             <output name="database" file="cd-test.database" ftype="tabular"/>
             <expand macro="logfile-test"/>
         </test>
@@ -67,13 +81,13 @@
 
 @MOTHUR_OVERVIEW@
 
-**Command Documenation**
+**Command Documentation**
 
 The create.database_ command reads a list_ or shared_ file, .cons.taxonomy, .rep.fasta, .rep.names and optional group file, and creates a database file.
 
-.. _list: http://www.mothur.org/wiki/List_file
-.. _shared: http://www.mothur.org/wiki/Shared_file
-.. _create.database: http://www.mothur.org/wiki/Create.database
+.. _list: https://www.mothur.org/wiki/List_file
+.. _shared: https://www.mothur.org/wiki/Shared_file
+.. _create.database: https://www.mothur.org/wiki/Create.database
 
 v.1.28.0: Updated to Mothur 1.33, added count paramter.