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