changeset 1:85da3173a488 draft

"planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/lotus2 commit 187ff34ae1ea6f850882ef0fbbc80dbb3ffc2a24"
author earlhaminst
date Wed, 19 May 2021 02:38:24 +0000
parents 478e767a0e7a
children cf56a6553385
files lotus2.xml
diffstat 1 files changed, 59 insertions(+), 43 deletions(-) [+]
line wrap: on
line diff
--- a/lotus2.xml	Thu May 13 17:38:45 2021 +0000
+++ b/lotus2.xml	Wed May 19 02:38:24 2021 +0000
@@ -1,7 +1,17 @@
 <tool id="lotus2" name="LotuS2" version="@VERSION@" profile="20.01">
     <description>fast OTU processing pipeline</description>
     <macros>
-        <token name="@VERSION@">2.04</token>
+        <token name="@VERSION@">2.05.1</token>
+        <xml name="refDB_macro">
+            <param argument="-refDB" type="select" label="Reference Database">
+                <option value="SLV" selected="true">Silva LSU (23/28S) or SSU (16/18S) (SLV)</option>
+                <option value="GG">Greengenes (GG)</option>
+                <option value="UNITE">ITS focused on fungi (UNITE)</option>
+                <option value="PR2">SSU focused on Protists (PR2)</option>
+                <option value="beetax">Bee gut specific database and tax names (beetax)</option>
+                <option value="HITdb">Human gut microbiota (HITdb)</option>
+            </param>
+        </xml>
     </macros>
     <requirements>
         <requirement type="package" version="@VERSION@">lotus2</requirement>
@@ -55,31 +65,34 @@
 
 -clustering $clu_args.clustering
 -id $clu_args.id
--derepMin $clu_args.derepMin
+#if $clu_args.derepMin:
+    -derepMin '$clu_args.derepMin'
+#end if
+-deactivateChimeraCheck $clu_args.deactivateChimeraCheck
 -chim_skew $clu_args.chim_skew
--deactivateChimeraCheck $clu_args.deactivateChimeraCheck
 -readOverlap  $clu_args.readOverlap
 
--refDB $tax_args.refDB
+-taxAligner $tax_args.aligner_cond.taxAligner
+#if $tax_args.aligner_cond.taxAligner == '0':
+    -rdp_thr $tax_args.aligner_cond.rdp_thr
+#elif $tax_args.aligner_cond.taxAligner == '3':
+    -utax_thr $tax_args.aligner_cond.utax_thr
+#else:
+    -refDB $tax_args.aligner_cond.refDB
+#end if
 -amplicon_type $tax_args.amplicon_type
 -tax_group $tax_args.tax_group
--rdp_thr $tax_args.rdp_thr
--utax_thr $tax_args.utax_thr
 -keepUnclassified $tax_args.keepUnclassified
--taxAligner $tax_args.taxAligner
 -useBestBlastHitOnly $tax_args.useBestBlastHitOnly
 -LCA_cover $tax_args.LCA_cover
 -LCA_frac $tax_args.LCA_frac
 -greengenesSpecies $tax_args.greengenesSpecies
--pseudoRefOTUcalling $tax_args.pseudoRefOTUcalling
 
-&&
+; EXIT_VALUE=\$? ;
 
-cd output/ &&
-tar -cvzf higherLvl.tar.gz higherLvl/ &&
-tar -cvzf ExtraFiles.tar.gz ExtraFiles/ &&
-tar -cvzf LotuSLogS.tar.gz LotuSLogS/ &&
-tar -cvzf primary.tar.gz primary/
+tar -cvzf output.tar.gz output/
+&&
+exit \$EXIT_VALUE
     ]]></command>
 
     <inputs>
@@ -106,37 +119,53 @@
             <option value="454">454</option>
             <option value="PacBio">PacBio</option>
         </param>
-        <param argument="-barcode" type="data" format="fastqsanger" optional="true" label="Barcodes (MIDs)" help="FASTQ file with barcodes (in the processed mi/hiSeq format)" />
+        <param argument="-barcode" type="data" format="fastqsanger" optional="true" label="Barcode (MID) sequences (optional)" help="FASTQ file with barcodes (in the processed mi/hiSeq format), if provided by the sequencer" />
         <param argument="-forwardPrimer" type="text" value="" label="Forward primer used to amplify DNA region" help="E.g. 16S primer fwd" />
         <param argument="-reversePrimer" type="text" value="" label="Reverse primer used to amplify DNA region" help="E.g. 16S primer rev" />
         <section name="clu_args" title="Clustering Options">
             <param argument="-clustering" type="select" label="Clustering algorithm">
                 <option value="1">UPARSE</option>
                 <option value="2">swarm</option>
-                <option value="3" selected="true">cd-hit</option>
+                <option value="3">cd-hit</option>
                 <option value="6">unoise3</option>
-                <option value="7">dada2</option>
+                <option value="7" selected="true">dada2</option>
             </param>
             <param argument="-id" type="float" min="0" max="1" value="0.97" label="Clustering threshold for OTUs" />
-            <param argument="-derepMin" type="integer" min="0" value="1" label="Minimum size of dereplicated clustered" />
-            <param argument="-chim_skew" type="integer" min="0" value="2" label="Skew in chimeric fragment abundance" />
+            <param argument="-derepMin" type="text" value="" label="Minimum size of dereplicated raw reads" help="E.g. 4:1,4:2,3:3 . See http://lotus2.earlham.ac.uk/images/Derep_options.pdf for how to specify this parameter" />
             <param argument="-deactivateChimeraCheck" type="select" label="Chimera check">
                 <option value="0" selected="true">OTU chimera checks</option>
                 <option value="1">No chimera check at all</option>
                 <option value="2">Deactivate deNovo chimera check</option>
                 <option value="3">Deactivate ref based chimera check</option>
             </param>
+            <param argument="-chim_skew" type="integer" min="0" value="2" label="Skew in chimeric fragment abundance" />
             <param argument="-readOverlap" type="integer" min="0" value="300" label="Maximum number of basepairs that two reads are overlapping" />
         </section>
         <section name="tax_args" title="Taxonomy Options">
-            <param argument="-refDB" type="select" label="Reference Database">
-                <option value="SLV" selected="true">Silva LSU (23/28S) or SSU (16/18S)</option>
-                <option value="GG">Greengenes</option>
-                <option value="UNITE">ITS focused on fungi</option>
-                <option value="PR2">SSU focused on Protists</option>
-                <option value="beetax">Bee gut specific database and tax names</option>
-                <option value="HITdb">Human gut microbiota</option>
-            </param>
+            <conditional name="aligner_cond">
+                <param argument="-taxAligner" type="select" label="Taxonomy aligner">
+                    <option value="0" selected="true">Deactivated (just use RDP)</option>
+                    <option value="1">Blast</option>
+                    <option value="2">Use LAMBDA to search against a 16S reference database for taxonomic profiling of OTUs</option>
+                    <option value="3">Use UTAX with custom databases</option>
+                    <option value="4">Use VSEARCH to align OTUs to custom databases</option>
+                </param>
+                <when value="0">
+                    <param argument="-rdp_thr" type="float" min="0" max="1" value="0.8" label="Confidence threshold for RDP"/>
+                </when>
+                <when value="1">
+                    <expand macro="refDB_macro" />
+                </when>
+                <when value="2">
+                    <expand macro="refDB_macro" />
+                </when>
+                <when value="3">
+                    <param argument="-utax_thr" type="float" min="0" max="1" value="0.8" label="Confidence threshold for UTAX"/>
+                </when>
+                <when value="4">
+                    <expand macro="refDB_macro" />
+                </when>
+            </conditional>
             <param argument="-amplicon_type" type="select" label="Amplicon type">
                 <option value="LSU">LSU Large subunit (23S/28S)</option>
                 <option value="SSU" selected="true">SSU small subunit (16S/18S)</option>
@@ -148,22 +177,11 @@
                 <option value="bacteria" selected="true">bacterial 16S rDNA annnotation</option>
                 <option value="fungi">fungal 18S/23S/ITS annotation</option>
             </param>
-            <param argument="-rdp_thr" type="float" min="0" max="1" value="0.8" label="Confidence threshold for RDP"/>
-            <param argument="-utax_thr" type="float" min="0" max="1" value="0.8" label="Confidence threshold for UTAX"/>
             <param argument="-keepUnclassified" type="boolean" truevalue="1" falsevalue="0" checked="true" label="Keep unclassified OTUs" help="Includes unclassified OTUs (i.e. no match in RDP/Blast database) in OTU and taxa abundance matrix calculations" />
-            <param argument="-taxAligner" type="select" label="Taxonomy aligner">
-                <option value="0" selected="true">Deactivated (just use RDP)</option>
-                <option value="1">Blast</option>
-                <option value="2">Use LAMBDA to search against a 16S reference database for taxonomic profiling of OTUs</option>
-                <option value="3">Use UTAX with custom databases</option>
-                <option value="4">Use VSEARCH to align OTUs to custom databases</option>
-                <option value="5">Use USEARCH to align OTUs to custom databases</option>
-            </param>
             <param argument="-useBestBlastHitOnly" type="boolean" truevalue="1" falsevalue="0" checked="false" label="Use best blast hit only" help="If selected, do not use LCA (lowest common ancestor) to determine most likely taxonomic level (not recommended)" />
             <param argument="-LCA_cover" type="float" min="0" max="1" value="0.9" label="Minimum horizontal coverage of an OTU sequence against ref DB"/>
             <param argument="-LCA_frac" type="float" min="0" max="1" value="0.9" label="Minimum fraction of reads with identical taxonomy"/>
             <param argument="-greengenesSpecies" type="boolean" truevalue="1" falsevalue="0" checked="false" label="Create greengenes output labels instead of OTU" />
-            <param argument="-pseudoRefOTUcalling" type="boolean" truevalue="1" falsevalue="0" checked="false" label="Create Reference based (open) OTUs" />
         </section>
     </inputs>
 
@@ -174,10 +192,7 @@
         <data name="OTUphylo_nwk" format="newick" label="${tool.name} on ${on_string}: Newick-formatted phylogenetic tree between sequences" from_work_dir="output/OTUphylo.nwk" />
         <data name="hiera_blast" format="tabular" label="${tool.name} on ${on_string}: OTU taxonomy assignments based on Blastn" from_work_dir="output/hiera_BLAST.txt" />
         <data name="hiera_rdp" format="tabular" label="${tool.name} on ${on_string}: OTU taxonomy assignments based on RDP classifier" from_work_dir="output/hiera_RDP.txt" />
-        <data name="primary" format="tar" label="${tool.name} on ${on_string}: Copies of sdm options and mapping file" from_work_dir="output/primary.tar.gz" />
-        <data name="higherlvl" format="tar" label="${tool.name} on ${on_string}: Abundance matrices" from_work_dir="output/higherLvl.tar.gz" />
-        <data name="lotuslogs" format="tar" label="${tool.name} on ${on_string}: Log files" from_work_dir="output/LotuSLogS.tar.gz" />
-        <data name="extrafiles" format="tar" label="${tool.name} on ${on_string}: Extra files" from_work_dir="output/ExtraFiles.tar.gz" />
+        <data name="primary" format="tar" label="${tool.name} on ${on_string}: All output files" from_work_dir="output.tar.gz" />
     </outputs>
 
     <tests>
@@ -185,6 +200,7 @@
             <param name="paired_or_single" value="single"/>
             <param name="input" value="Anh_sample1.fastq.gz,Anh_sample2.fastq.gz" ftype="fastqsanger.gz"/>
             <param name="platform" value="454" />
+            <param name="clustering" value="3" />
             <output name="otu" file="OTU.txt" compare="sim_size" />
             <output name="otu_fna" file="OTU.fna" compare="sim_size" />
             <output name="hiera_rdp" file="hiera_RDP.txt" compare="sim_size" />
@@ -197,6 +213,6 @@
 Documentation can be found at `<http://lotus2.earlham.ac.uk/>`_.
     ]]></help>
     <citations>
-        <citation type="doi">10.1186/2049-2618-2-30</citation>
+        <citation type="doi">10.1186/s40168-021-01012-1</citation>
     </citations>
 </tool>