comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:e9d1265e868e
1 <tool profile="16.07" id="mothur_make_shared" name="Make.shared" version="@WRAPPER_VERSION@.0" force_history_refresh="True">
2 <description>Make a shared file from a list and a group</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <expand macro="requirements"/>
7 <expand macro="version_command"/>
8 <command detect_errors="aggressive"><![CDATA[
9 ## create symlinks to input datasets
10 ln -s "$intype.otu" intype_otu.dat &&
11 #if $intype.infile == "otulist":
12 ln -s "$intype.group" intype_group.dat &&
13 #end if
14
15 echo 'make.shared(
16 #if $intype.infile == "biom":
17 biom=intype_otu.dat
18 #else
19 #if $intype.group.is_of_type("mothur.groups"):
20 group=intype_group.dat,
21 #elif $intype.group.is_of_type("mothur.count_table"):
22 count=intype_group.dat,
23 #end if
24 #if $intype.label:
25 label=${ str($intype.label).replace(",","-") },
26 #end if
27 #if $intype.groups:
28 groups=${ str($intype.groups).replace(",","-") },
29 #end if
30 list=intype_otu.dat
31 #end if
32 )'
33 | sed 's/ //g' ## mothur trips over whitespace
34 | mothur &&
35
36 ## move output files to correct destination
37 mv mothur.*.logfile "$logfile" &&
38 #if $intype.infile == 'otulist' and $intype.groups:
39 mv intype_otu*.groups "$groupout"
40 #else
41 mv intype_otu*.shared "$shared"
42 #end if
43 ]]></command>
44 <inputs>
45 <conditional name="intype">
46 <param name="infile" type="select" label="Select input type" help="">
47 <option value="otulist">OTU list</option>
48 <option value="biom">Biom 1.0 file</option>
49 </param>
50 <when value="otulist">
51 <param name="otu" type="data" format="mothur.list" label="list - OTU List"/>
52 <param name="group" type="data" format="mothur.groups, mothur.count_table" label="supply group or count table if you supplied OTU list"/>
53 <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.">
54 <expand macro="labeloptions"/>
55 </param>
56 <param name="groups" type="select" multiple="true" label="groups - Groups to include">
57 <options>
58 <filter type="data_meta" ref="group" key="groups"/>
59 </options>
60 </param>
61 </when>
62 <when value="biom">
63 <param name="otu" type="data" format="biom1" label="Biom 1.0 file"/>
64 </when>
65 </conditional>
66 </inputs>
67 <outputs>
68 <expand macro="logfile-output"/>
69 <data name="shared" format="mothur.shared" from_work_dir="intype_otu*.shared" label="${tool.name} on ${on_string}: shared"/>
70 <data name="groupout" format="mothur.groups" from_work_dir="intype_otu*.groups" label="${tool.name} on ${on_string}: groups">
71 <filter>groups</filter>
72 </data>
73 <collection name="labelshares" type="list" label="${tool.name} on ${on_string}: share files per label">
74 <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.shared" format="mothur.shared"/>
75 <filter>groups</filter>
76 </collection>
77 </outputs>
78 <tests>
79 <test><!-- test with biom file -->
80 <param name="infile" value="biom"/>
81 <param name="otu" value="example.biom"/>
82 <output name="shared" md5="e44d5ca4e4a5dbc68e8219c5690aa156" ftype="mothur.shared"/>
83 <expand macro="logfile-test"/>
84 </test>
85 <test><!-- test with otu and group file-->
86 <param name="infile" value="otulist"/>
87 <param name="otu" value="amazon.an.list" ftype="mothur.list"/>
88 <param name="group" value="amazon.groups" ftype="mothur.groups"/>
89 <output name="shared" file="amazon.an.shared" ftype="mothur.shared"/>
90 <expand macro="logfile-test"/>
91 </test>
92 <test><!-- test with label and group select-->
93 <param name="infile" value="otulist"/>
94 <param name="otu" value="amazon.an.list" ftype="mothur.list"/>
95 <param name="group" value="amazon.groups" ftype="mothur.groups"/>
96 <param name="label" value="0.03,0.05,0.22"/>
97 <param name="groups" value="forest,pasture"/>
98 <output name="groupout" md5="fb60628ae445e7b06f9833f632b2cd0c" ftype="mothur.groups"/>
99 <output_collection name="labelshares" count="3">
100 <element name="0.22" md5="592b4fb84412de47be18e64ef26b7a80" ftype="mothur.shared"/>
101 </output_collection>
102 <expand macro="logfile-test"/>
103 </test>
104 </tests>
105 <help>
106 <![CDATA[
107
108 @MOTHUR_OVERVIEW@
109
110 **Command Documenation**
111
112 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.
113
114
115 .. _list: http://www.mothur.org/wiki/List_file
116 .. _group: http://www.mothur.org/wiki/Group_file
117 .. _shared: http://www.mothur.org/wiki/Shared_file
118 .. _rabund: http://www.mothur.org/wiki/Rabund_file
119 .. _make.shared: http://www.mothur.org/wiki/Make.shared
120 ]]>
121 </help>
122 <expand macro="citations"/>
123 </tool>