diff chimera.slayer.xml @ 2:6f7f890e6a54 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
author iuc
date Tue, 20 Mar 2018 21:55:10 -0400
parents 72b33fe8c05a
children a899cc1416bc
line wrap: on
line diff
--- a/chimera.slayer.xml	Tue Sep 05 17:07:29 2017 -0400
+++ b/chimera.slayer.xml	Tue Mar 20 21:55:10 2018 -0400
@@ -7,124 +7,129 @@
     <expand macro="stdio"/>
     <expand macro="version_command"/>
     <command><![CDATA[
-        @SHELL_OPTIONS@
+@SHELL_OPTIONS@
 
-        ## enable mothur to find blast
-        loc=`which mothur` && ln -s "\${loc%/mothur}"/* . &&
+## enable mothur to find blast
+ln -s ln -s `dirname \$(which mothur)`/* . &&
 
-        ## create symlinks to input datasets
-        ln -s "$fasta" fasta.dat &&
-        #if $alignment.source == "self":
-            ln -s "$alignment.name" alignment.name.dat &&
-            ln -s "$alignment.group" alignment.group.dat &&
-            ln -s "$alignment.count" alignment.count.dat &&
-        #else:
-            ln -s "$alignment.template" alignment.template.dat &&
-        #end if
+## create symlinks to input datasets
+ln -s '$fasta' fasta.dat &&
+#if $alignment.source == "self":
+    ln -s '$alignment.name' alignment.name.dat &&
+    ln -s '$alignment.group' alignment.group.dat &&
+    ln -s '$alignment.count' alignment.count.dat &&
+#else:
+    ln -s '$alignment.reference' alignment.reference.dat &&
+#end if
 
-        echo 'chimera.slayer(
-            fasta=fasta.dat,
-            #if $alignment.source == "self":
-                reference=self,
-                #if $alignment.name:
-                    name=$alignment.name,
-                #end if
-                #if $alignment.group:
-                    group=$alignment.group,
-                #end if
-                #if $alignment.count:
-                    count=$alignment.count,
-                #end if
-            #else:
-                reference=$alignment.template,
-            #end if
-            #if $options.setby == "user":
-                search=$options.search,
-                window=$options.window,
-                increment=$options.increment,
-                match=$options.match,
-                mismatch=$options.mismatch,
-                numwanted=$options.numwanted,
-                parents=$options.parents,
-                minsim=$options.minsim,
-                mincov=$options.mincov,
-                iters=$options.iters,
-                minbs=$options.minbs,
-                minsnp=$options.minsnp,
-                divergence=$options.divergence,
-                trim=$options.trim,
-                split=$options.split,
-            #end if
-            dereplicate=$dereplicate,
-            processors='\${GALAXY_SLOTS:-8}'
-        )'
-        | sed 's/ //g'  ## mothur trips over whitespace
-        | ./mothur
-        | tee mothur.out.log
+echo 'chimera.slayer(
+    fasta=fasta.dat,
+    #if $alignment.source == "self":
+        reference=self,
+        #if $alignment.name:
+            name=$alignment.name,
+        #end if
+        #if $alignment.group:
+            group=$alignment.group,
+        #end if
+        #if $alignment.count:
+            count=$alignment.count,
+        #end if
+    #else:
+        reference=$alignment.reference,
+    #end if
+    #if $options.setby == "user":
+        search=$options.search,
+        window=$options.window,
+        increment=$options.increment,
+        match=$options.match,
+        mismatch=$options.mismatch,
+        numwanted=$options.numwanted,
+        parents=$options.parents,
+        minsim=$options.minsim,
+        mincov=$options.mincov,
+        iters=$options.iters,
+        minbs=$options.minbs,
+        minsnp=$options.minsnp,
+        divergence=$options.divergence,
+        trim=$options.trim,
+        split=$options.split,
+    #end if
+    dereplicate=$dereplicate,
+    processors='\${GALAXY_SLOTS:-8}'
+)'
+| sed 's/ //g'  ## mothur trips over whitespace
+| ./mothur
+| tee mothur.out.log
     ]]></command>
     <inputs>
-        <param name="fasta" type="data" format="fasta" label="fasta - Candiate Sequences"/>
+        <param argument="fasta" type="data" format="fasta" label="fasta - Candiate Sequences"/>
         <conditional name="alignment">
-            <param name="source" type="select" label="Select Reference Template from" help="">
+            <param name="source" type="select" label="Select Reference Template from">
                 <option value="hist">History</option>
                 <option value="ref">Cached Reference</option>
                 <option value="self">Self - Use abundant sequences from the input Candiate Sequences fasta </option>
             </param>
             <when value="ref">
-                <param name="template" type="select" label="reference - Select an alignment database " help="">
+                <param argument="reference" type="select" label="reference - Select an alignment database">
                     <options from_data_table="mothur_aligndb">
                     </options>
                 </param>
             </when>
             <when value="hist">
-                <param name="template" type="data" format="fasta" label="reference - Reference to align with" help=""/>
+                <param argument="reference" type="data" format="fasta" label="reference - Reference to align with"/>
             </when>
             <when value="self">
-                <param name="count" type="data" format="mothur.count_table" optional="true" label="count - Count file"/>
-                <param name="name" type="data" format="mothur.names" optional="true" label="names - Sequences Names"/>
-                <param name="group" type="data" format="mothur.groups" optional="true" label="group - Sequences Name reference" help="use the more abundant sequences from the same sample to check the query sequence"/>
+                <param argument="count" type="data" format="mothur.count_table" optional="true" label="count - Count file"/>
+                <param argument="name" type="data" format="mothur.names" optional="true" label="names - Sequences Names"/>
+                <param argument="group" type="data" format="mothur.groups" optional="true" label="group - Sequences Name reference"
+                    help="use the more abundant sequences from the same sample to check the query sequence"/>
             </when>
         </conditional>
         <conditional name="options">
-            <param name="setby" type="select" label="Slayer Options" help="">
+            <param name="setby" type="select" label="Slayer Options">
                 <option value="default">Use default settings</option>
                 <option value="user">Manually set options</option>
             </param>
             <when value="default"/>
             <when value="user">
-                <param name="search" type="select" label="search - Search method for finding the closest parent" help="">
+                <param argument="search" type="select" label="search - Search method for finding the closest parent">
                     <option value="blast" selected="true">blast</option>
                     <option value="kmer">kmer</option>
                 </param>
-                <param name="window" type="integer" value="50" label="window - Window size for searching for chimeras (default 50)"/>
-                <param name="increment" type="integer" value="5" label="increment - Increment for window slide on each iteration (default 5)"/>
-                <param name="match" type="integer" value="5" label="match - Reward matched bases (default 5)"/>
-                <param name="mismatch" type="integer" value="-4" label="mismatch - Penalty for mismatched bases (default -4)"/>
-                <param name="numwanted" type="integer" value="15" label="numwanted - Number of potential parents to to compare with query sequence (default 15)"/>
-                <param name="parents" type="integer" value="3" label="parents - Number of potential parents to investigate from the numwanted best matches"/>
-                <param name="minsim" type="integer" value="90" label="minsim - Minimum similarity % between the query and parent (default 90)"/>
-                <param name="mincov" type="integer" value="70" label="mincov - Minimum coverage % of closest matches in reference and the query (default 70)"/>
-                <param name="iters" type="integer" value="1000" label="iters - Number of bootstrap iterations to try (default 100)"/>
-                <param name="minbs" type="integer" value="90" label="minbs - Minimum bootstrap support % for calling a sequence chimeric (default 90)"/>
-                <param name="minsnp" type="integer" value="10" label="minsnp - Percent of SNPs to sample on each side of breakpoint for computing bootstrap support (default 100)"/>
-                <param name="divergence" type="float" value="1.007" label="divergence - Divergence cutoff for chimera determination (default 1.007)"/>
-                <param name="trim" type="boolean" truevalue="true" falsevalue="false" checked="false" label="trim - include chimeric sequences trimmed to their longest peice"/>
-                <param name="split" type="boolean" truevalue="true" falsevalue="false" checked="false" label="split - detect tri- and quadmeras" help="if a sequence comes back as non-chimeric, mothur will test the two sides to see if they are chimeric."/>
+                <param argument="window" type="integer" value="50" label="window - Window size for searching for chimeras (default 50)"/>
+                <param argument="increment" type="integer" value="5" label="increment - Increment for window slide on each iteration (default 5)"/>
+                <param argument="match" type="integer" value="5" label="match - Reward matched bases (default 5)"/>
+                <param argument="mismatch" type="integer" value="-4" label="mismatch - Penalty for mismatched bases (default -4)"/>
+                <param argument="numwanted" type="integer" value="15" label="numwanted - Number of potential parents to to compare with query sequence (default 15)"/>
+                <param argument="parents" type="integer" value="3" label="parents - Number of potential parents to investigate from the numwanted best matches"/>
+                <param argument="minsim" type="integer" value="90" label="minsim - Minimum similarity % between the query and parent (default 90)"/>
+                <param argument="mincov" type="integer" value="70" label="mincov - Minimum coverage % of closest matches in reference and the query (default 70)"/>
+                <param argument="iters" type="integer" value="1000" label="iters - Number of bootstrap iterations to try (default 1000)"/>
+                <param argument="minbs" type="integer" value="90" label="minbs - Minimum bootstrap support % for calling a sequence chimeric (default 90)"/>
+                <param argument="minsnp" type="integer" value="10" label="minsnp - Percent of SNPs to sample on each side of breakpoint for computing bootstrap support (default 10)"/>
+                <param argument="divergence" type="float" value="1.007" label="divergence - Divergence cutoff for chimera determination (default 1.007)"/>
+                <param argument="trim" type="boolean" truevalue="true" falsevalue="false" checked="false" label="trim - include chimeric sequences trimmed to their longest piece"/>
+                <param argument="split" type="boolean" truevalue="true" falsevalue="false" checked="false" label="split - detect tri- and quadmeras"
+                    help="if a sequence comes back as non-chimeric, mothur will test the two sides to see if they are chimeric."/>
             </when>
         </conditional>
-        <param name="dereplicate" type="boolean" falsevalue="false" truevalue="true" checked="false" label="dereplicate - remove chimeric sequences from all groups, default=f" help="If parameter is false, then if one group finds the seqeunce to be chimeric, then all groups find it to be chimeric"/>
+        <param name="dereplicate" type="boolean" falsevalue="false" truevalue="true" checked="false" label="dereplicate - remove chimeric sequences from all groups"
+            help="If parameter is false, then if one group finds the seqeunce to be chimeric, then all groups find it to be chimeric"/>
+        <expand macro="param-savelog"/>
     </inputs>
     <outputs>
         <expand macro="logfile-output"/>
-        <data name="out_file" from_work_dir="fasta.slayer.chimeras" format="txt" label="${tool.name} on ${on_string}: slayer.chimeras"/>
+        <data name="slayer.chimeras" from_work_dir="fasta.slayer.chimeras" format="txt" label="${tool.name} on ${on_string}: slayer.chimeras"/>
         <data name="out_accnos" from_work_dir="fasta.slayer.accnos" format="mothur.accnos" label="${tool.name} on ${on_string}: slayer.accnos"/>
     </outputs>
     <tests>
         <test><!-- test with external reference -->
             <param name="fasta" value="Mock_S280_L001_R1_001_small.trim.contigs.good.align_head"/>
             <param name="source" value="hist"/>
-            <param name="template" value="HMP_MOCK.v35.align"/>
-            <output name="out_file" file="Mock_S280_L001_R1_001_small.trim.contigs.good.slayer.chimeras" ftype="txt"/>
+            <param name="reference" value="HMP_MOCK.v35.align"/>
+            <output name="slayer.chimeras" file="Mock_S280_L001_R1_001_small.trim.contigs.good.slayer.chimeras" ftype="txt"/>
+            <param name="savelog" value="true"/>
             <expand macro="logfile-test"/>
         </test>
         <test><!-- test with self as reference -->
@@ -133,13 +138,12 @@
             <param name="setby" value="user"/>
             <param name="search" value="kmer"/>
             <param name="name" value="HMP_MOCK.v35.align.names"/>
-            <output name="out_file" file="HMP_MOCK.v35.slayer.chimeras" ftype="txt"/>
+            <output name="slayer.chimeras" file="HMP_MOCK.v35.slayer.chimeras" ftype="txt"/>
+            <param name="savelog" value="true"/>
             <expand macro="logfile-test"/>
         </test>
     </tests>
-
-    <help>
-<![CDATA[
+    <help><![CDATA[
 
 @MOTHUR_OVERVIEW@
 
@@ -163,7 +167,6 @@
 .. _ChimeraSlayer: http://microbiomeutil.sourceforge.net/
 .. _chimera.slayer: https://www.mothur.org/wiki/Chimera.slayer
 
-]]>
-    </help>
+    ]]></help>
     <expand macro="citations"/>
 </tool>