diff get.lineage.xml @ 0:f217eb7fad54 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit a9d1e0debcd357d8080a1c6c5f1d206dd45a7a4d
author iuc
date Fri, 19 May 2017 05:04:46 -0400
parents
children c5034189eb03
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/get.lineage.xml	Fri May 19 05:04:46 2017 -0400
@@ -0,0 +1,207 @@
+<tool profile="16.07" id="mothur_get_lineage" name="Get.lineage" version="@WRAPPER_VERSION@.0">
+    <description>Picks by taxon</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements"/>
+    <expand macro="stdio"/>
+    <expand macro="version_command"/>
+    <command><![CDATA[
+        @SHELL_OPTIONS@
+
+        #import re
+        ## create symlinks to input datasets
+        ln -s "$file.taxonomy" file.taxonomy.dat &&
+        #if $file.filetype == "useconstaxonomy":
+            ln -s "$file.shared" file.shared.dat &&
+            ln -s "$file.list" file.list.dat &&
+        #end if
+        ln -s "$fasta_in" fasta_in.dat &&
+        ln -s "$group_in" group_in.dat &&
+        ln -s "$alignreport_in" alignreport_in.dat &&
+        ln -s "$list_in" list_in.dat &&
+        ln -s "$name_in" name_in.dat &&
+        ln -s "$count" count.dat &&
+
+        echo 'get.lineage(
+            #if $file.filetype == "usetaxonomy":
+                taxonomy=file.taxonomy.dat
+            #else
+                constaxonomy=file.taxonomy.dat
+                #if $file.shared:
+                    ,shared=file.shared.dat
+                #end if
+                #if $file.list:
+                    ,list=file.list.dat
+                #end if
+            #end if
+            #if $file.taxons:
+                #set taxonstring=str($file.taxons).replace(",","-")
+                ,taxon='"'$re.sub("(\s|,)+",",",$re.sub("\(\d+\)","", $taxonstring ))'"'
+            #elif $taxon:
+                ,taxon='"'$re.sub("(\s|,)+",",",$re.sub("\(\d+\)","", $taxon.value )).replace(",","-")'"'
+            #end if
+            #if $fasta_in:
+                ,fasta=fasta_in.dat
+            #end if
+            #if $group_in:
+                ,group=group_in.dat
+            #end if
+            #if $alignreport_in:
+                ,alignreport=alignreport_in.dat
+            #end if
+            #if $list_in:
+                ,list=list_in.dat
+            #end if
+            #if $name_in:
+                ,name=name_in.dat
+                ,dups=$dups
+            #end if
+            #if $count:
+                ,count=count.dat
+            #end if
+        )'
+        | sed 's/ //g'  ## mothur trips over whitespace
+        | mothur
+        | tee mothur.out.log
+    ]]></command>
+    <inputs>
+        <conditional name="file">
+            <param name="filetype" type="select" label="choose which file is used">
+                <option value="usetaxonomy" selected="true">taxonomy</option>
+                <option value="useconstaxonomy">constaxonomy</option>
+            </param>
+            <when value="usetaxonomy">
+                <param name="taxonomy" type="data" format="mothur.seq.taxonomy" label="taxonomy - Taxonomy" help="please make sure your file has no quotation marks in it"/>
+                <param name="taxons" type="select" size="120" optional="true" multiple="true" label="Browse Taxons from Taxonomy">
+                    <options from_dataset="taxonomy">
+                        <column name="name" index="1"/>
+                        <column name="value" index="1"/>
+                        <filter type="unique_value" name="unique_taxon" column="1"/>
+                        <filter type="sort_by" name="sorted_taxon" column="1"/>
+                    </options>
+                    <sanitizer>
+                        <valid initial="default">
+                            <add preset="string.printable"/>
+                            <add value=";"/>
+                            <remove value="&quot;"/>
+                            <remove value="&apos;"/>
+                        </valid>
+                    </sanitizer>
+                </param>
+            </when>
+            <when value="useconstaxonomy">
+                <param name="taxonomy" type="data" format="mothur.cons.taxonomy" label="constaxonomy - Constaxonomy file. Provide either a constaxonomy file or a taxonomy file" help="please make sure your file has no quotation marks in it"/>
+                <param name="taxons" type="select" size="120" optional="true" multiple="true" label="Browse Taxons from Taxonomy">
+                    <options from_dataset="taxonomy">
+                        <column name="name" index="2"/>
+                        <column name="value" index="2"/>
+                        <filter type="unique_value" name="unique_taxon" column="2"/>
+                        <filter type="sort_by" name="sorted_taxon" column="2"/>
+                    </options>
+                    <sanitizer>
+                        <valid initial="default">
+                            <add preset="string.printable"/>
+                            <add value=";"/>
+                            <remove value="&quot;"/>
+                            <remove value="&apos;"/>
+                        </valid>
+                    </sanitizer>
+                </param>
+                <param name="shared" type="data" format="mothur.shared" optional="true" label="shared - shared file"/>
+                <param name="list" type="data" format="mothur.list" optional="true" label="list - list file"/>
+            </when>
+        </conditional>
+        <param name="taxon" type="text" area="True" size="5x120" label="taxon - Manually select Taxons for filtering" help="If no taxons selected from file, Enter 1 or more taxons separated by dashes here, e.g. Bacteria;Firmicutes;-Bacteria;Actinobacteria; "/>
+        <param name="fasta_in" type="data" format="fasta" optional="true" label="fasta - Fasta Sequences"/>
+        <param name="group_in" type="data" format="mothur.groups" optional="true" label="group - Groups"/>
+        <param name="alignreport_in" type="data" format="mothur.align.report" optional="true" label="alignreport - Align Report"/>
+        <param name="list_in" type="data" format="mothur.list" optional="true" label="list - OTU List"/>
+        <param name="name_in" type="data" format="mothur.names" optional="true" label="name - Sequences Name reference"/>
+        <param name="dups" type="boolean" truevalue="true" falsevalue="false" checked="true" label="dups - Apply to duplicate names"/>
+        <param name="count" type="data" format="mothur.count_table" optional="true" help="The count file is similar to the name file in that it is used to represent the number of duplicate sequences for a given representative sequence. It can also contain group information"/>
+    </inputs>
+    <outputs>
+        <expand macro="logfile-output"/>
+        <data name="taxonomy_out" format="mothur.seq.taxonomy" from_work_dir="file.taxonomy*.pick.*" label="${tool.name} on ${on_string}: pick.taxonomy"/>
+        <data name="fasta_out" format_source="fasta_in" from_work_dir="fasta_in*.pick.*" label="${tool.name} on ${on_string}: pick.fasta">
+            <filter>fasta_in</filter>
+        </data>
+        <data name="group_out" format="mothur.groups" from_work_dir="group_in*.pick.*" label="${tool.name} on ${on_string}: pick.group">
+            <filter>group_in</filter>
+        </data>
+        <collection name="list_out" type="list" label="${tool.name} on ${on_string}: pick.list">
+            <filter>list_in</filter>
+            <discover_datasets pattern="list_in*?\.(?P&lt;designation&gt;.*)\.pick.*" format="mothur.list"/>
+        </collection>
+        <data name="name_out" format="mothur.names" from_work_dir="name_in*.pick.*" label="${tool.name} on ${on_string}: pick.name">
+            <filter>name_in</filter>
+        </data>
+        <data name="alignreport_out" format="mothur.align.report" from_work_dir="alignreport_in*.pick.*" label="${tool.name} on ${on_string}: pick.align.report">
+            <filter>alignreport_in</filter>
+        </data>
+    </outputs>
+    <tests>
+        <test><!-- test with defaults and single taxon -->
+            <param name="filetype" value="usetaxonomy"/>
+            <param name="taxonomy" value="abrecovery.pds.wang.taxonomy" ftype="mothur.seq.taxonomy"/>
+            <param name="taxon" value="Bacteria;Firmicutes;"/>
+            <output name="taxonomy_out" md5="aca21af84b6bbb6ab6cd7ab8643943d2"/>
+        </test>
+        <test><!-- test with multiple taxons and all additional files -->
+            <param name="filetype" value="usetaxonomy"/>
+            <param name="taxonomy" value="abrecovery.pds.wang.taxonomy" ftype="mothur.seq.taxonomy"/>
+            <param name="taxon" value="Bacteria;Firmicutes;,Bacteria;Actinobacteria;"/>
+            <param name="group_in" value="abrecovery.groups" ftype="mothur.groups"/>
+            <param name="fasta_in" value="abrecovery.fasta" ftype="fasta"/>
+            <param name="name_in" value="abrecovery.names" ftype="mothur.names"/>
+            <param name="alignreport_in" value="Mock_S280_L001_R1_001_small.contigs.report" ftype="mothur.align.report"/>
+            <param name="list_in" value="amazon.an.list" ftype="mothur.list"/>
+            <output name="taxonomy_out" md5="682af62c68e02244c1eb1c39fa295c63"/>
+            <output name="group_out" md5="71eff499c4f32ff53937288c7ffe0f70" ftype="mothur.groups"/>
+            <output name="fasta_out" md5="c7e5182680e48595999fbc3561c76cef" ftype="fasta"/>
+            <output name="name_out" md5="424256fee5f9074465eed432c1a8fb10" ftype="mothur.names"/>
+            <output name="alignreport_out" md5="2a579d34a3794f8ce1934147e9ea78ef" ftype="mothur.align.report"/>
+            <output_collection name="list_out" count="36">
+                <element name="0.05" md5="d41d8cd98f00b204e9800998ecf8427e" ftype="mothur.list"/>
+            </output_collection>
+        </test>
+        <test><!-- test with taxons from file -->
+            <param name="filetype" value="usetaxonomy"/>
+            <param name="taxonomy" value="abrecovery.pds.wang.taxonomy" ftype="mothur.seq.taxonomy"/>
+            <param name="taxons" value="Bacteria(100);Firmicutes(100);Clostridia(100);Clostridiales(100);Lachnospiraceae(100);Dorea(99);,Bacteria(100);Firmicutes(100);Clostridia(100);Clostridiales(100);Lachnospiraceae(100);Roseburia(47);"/>
+            <output name="taxonomy_out" md5="f4067366d8ebdf56b75b1ac7a638bcb6"/>
+        </test>
+        <test><!-- test with constaxonomy file -->
+            <param name="filetype" value="useconstaxonomy"/>
+            <param name="taxonomy" value="example.constaxonomy" ftype="mothur.cons.taxonomy"/>
+            <param name="taxon" value="Bacteria;Bacteroidetes;"/>
+            <output name="taxonomy_out" md5="3a70d3cc47df38f9493a8c9cf02b75b7"/>
+        </test>
+        <test><!-- test with constaxonomy file and taxons from file -->
+            <param name="filetype" value="useconstaxonomy"/>
+            <param name="taxonomy" value="example.constaxonomy" ftype="mothur.cons.taxonomy"/>
+            <param name="taxons" value="Bacteria(100);Firmicutes(100);Clostridia(70);Clostridiales(70);Lachnospiraceae(51);unclassified;,Bacteria(100);Proteobacteria(100);Gammaproteobacteria(100);unclassified;unclassified;unclassified;"/>
+            <output name="taxonomy_out" md5="0ea2511f40073a95c0812268da0cf727"/>
+        </test>
+    </tests>
+    <help>
+<![CDATA[
+
+@MOTHUR_OVERVIEW@
+
+**Command Documentation**
+
+The get.lineage_ command reads a taxonomy_ file and a taxon and generates a new file that contains only the sequences in the that are from that taxon. You may also include either a fasta, name_, group_, list_, or align.report_ file to this command and mothur will generate new files for each of those containing only the selected sequences.
+
+.. _taxonomy: https://www.mothur.org/wiki/Taxonomy_outline
+.. _name: https://www.mothur.org/wiki/Name_file
+.. _group: https://www.mothur.org/wiki/Group_file
+.. _list: https://www.mothur.org/wiki/List_file
+.. _align.report: https://www.mothur.org/wiki/Align.seqs
+.. _get.lineage: https://www.mothur.org/wiki/Get.lineage
+
+]]>
+    </help>
+    <expand macro="citations"/>
+</tool>