Mercurial > repos > iuc > mothur_make_shared
diff make.shared.xml @ 0:e9d1265e868e draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 180a403421967d36f995941b1a4561349d75cfc5
| author | iuc |
|---|---|
| date | Fri, 24 Jun 2016 16:38:49 -0400 |
| parents | |
| children | 5f23107faaa8 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/make.shared.xml Fri Jun 24 16:38:49 2016 -0400 @@ -0,0 +1,123 @@ +<tool profile="16.07" id="mothur_make_shared" name="Make.shared" version="@WRAPPER_VERSION@.0" force_history_refresh="True"> + <description>Make a shared file from a list and a group</description> + <macros> + <import>macros.xml</import> + </macros> + <expand macro="requirements"/> + <expand macro="version_command"/> + <command detect_errors="aggressive"><![CDATA[ + ## create symlinks to input datasets + ln -s "$intype.otu" intype_otu.dat && + #if $intype.infile == "otulist": + ln -s "$intype.group" intype_group.dat && + #end if + + echo 'make.shared( + #if $intype.infile == "biom": + biom=intype_otu.dat + #else + #if $intype.group.is_of_type("mothur.groups"): + group=intype_group.dat, + #elif $intype.group.is_of_type("mothur.count_table"): + count=intype_group.dat, + #end if + #if $intype.label: + label=${ str($intype.label).replace(",","-") }, + #end if + #if $intype.groups: + groups=${ str($intype.groups).replace(",","-") }, + #end if + list=intype_otu.dat + #end if + )' + | sed 's/ //g' ## mothur trips over whitespace + | mothur && + + ## move output files to correct destination + mv mothur.*.logfile "$logfile" && + #if $intype.infile == 'otulist' and $intype.groups: + mv intype_otu*.groups "$groupout" + #else + mv intype_otu*.shared "$shared" + #end if + ]]></command> + <inputs> + <conditional name="intype"> + <param name="infile" type="select" label="Select input type" help=""> + <option value="otulist">OTU list</option> + <option value="biom">Biom 1.0 file</option> + </param> + <when value="otulist"> + <param name="otu" type="data" format="mothur.list" label="list - OTU List"/> + <param name="group" type="data" format="mothur.groups, mothur.count_table" label="supply group or count table if you supplied OTU list"/> + <param name="label" type="select" optional="true" label="label - Select OTU Labels to include" multiple="true" help="By default all are included if no selection is made."> + <expand macro="labeloptions"/> + </param> + <param name="groups" type="select" multiple="true" label="groups - Groups to include"> + <options> + <filter type="data_meta" ref="group" key="groups"/> + </options> + </param> + </when> + <when value="biom"> + <param name="otu" type="data" format="biom1" label="Biom 1.0 file"/> + </when> + </conditional> + </inputs> + <outputs> + <expand macro="logfile-output"/> + <data name="shared" format="mothur.shared" from_work_dir="intype_otu*.shared" label="${tool.name} on ${on_string}: shared"/> + <data name="groupout" format="mothur.groups" from_work_dir="intype_otu*.groups" label="${tool.name} on ${on_string}: groups"> + <filter>groups</filter> + </data> + <collection name="labelshares" type="list" label="${tool.name} on ${on_string}: share files per label"> + <discover_datasets pattern=".*?\.(?P<designation>.*)\.shared" format="mothur.shared"/> + <filter>groups</filter> + </collection> + </outputs> + <tests> + <test><!-- test with biom file --> + <param name="infile" value="biom"/> + <param name="otu" value="example.biom"/> + <output name="shared" md5="e44d5ca4e4a5dbc68e8219c5690aa156" ftype="mothur.shared"/> + <expand macro="logfile-test"/> + </test> + <test><!-- test with otu and group file--> + <param name="infile" value="otulist"/> + <param name="otu" value="amazon.an.list" ftype="mothur.list"/> + <param name="group" value="amazon.groups" ftype="mothur.groups"/> + <output name="shared" file="amazon.an.shared" ftype="mothur.shared"/> + <expand macro="logfile-test"/> + </test> + <test><!-- test with label and group select--> + <param name="infile" value="otulist"/> + <param name="otu" value="amazon.an.list" ftype="mothur.list"/> + <param name="group" value="amazon.groups" ftype="mothur.groups"/> + <param name="label" value="0.03,0.05,0.22"/> + <param name="groups" value="forest,pasture"/> + <output name="groupout" md5="fb60628ae445e7b06f9833f632b2cd0c" ftype="mothur.groups"/> + <output_collection name="labelshares" count="3"> + <element name="0.22" md5="592b4fb84412de47be18e64ef26b7a80" ftype="mothur.shared"/> + </output_collection> + <expand macro="logfile-test"/> + </test> + </tests> + <help> +<![CDATA[ + +@MOTHUR_OVERVIEW@ + +**Command Documenation** + +The make.shared_ command takes a list_ and a group_ file and outputs a shared_ file, as well as a rabund_ file for each group. + + +.. _list: http://www.mothur.org/wiki/List_file +.. _group: http://www.mothur.org/wiki/Group_file +.. _shared: http://www.mothur.org/wiki/Shared_file +.. _rabund: http://www.mothur.org/wiki/Rabund_file +.. _make.shared: http://www.mothur.org/wiki/Make.shared +]]> + </help> + <expand macro="citations"/> +</tool>
