comparison remove.rare.xml @ 0:5480c7cbde6f 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:11:18 -0400
parents
children c90c4b4a0fae
comparison
equal deleted inserted replaced
-1:000000000000 0:5480c7cbde6f
1 <tool profile="16.07" id="mothur_remove_rare" name="Remove.rare" version="@WRAPPER_VERSION@.0">
2 <description>Remove rare OTUs</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 "$input.otu" input_otu.dat &&
14 #if $input.source == 'list':
15 ln -s "$input.group" input.group.dat &&
16 ln -s "$input.count" input.count.dat &&
17 #end if
18
19 echo 'remove.rare(
20 #if $input.otu.is_of_type("mothur.rabund"):
21 rabund=input_otu.dat,
22 #elif $input.otu.is_of_type("mothur.sabund"):
23 sabund=input_otu.dat,
24 #elif $input.otu.is_of_type("mothur.list"):
25 list=input_otu.dat,
26 #if $input.group:
27 group=input.group.dat,
28 #end if
29 #if $input.groups:
30 groups=${ str($input.groups).replace(",","-") },
31 #end if
32 #if $input.count:
33 count=input.count.dat,
34 #end if
35 #elif $input.otu.is_of_type("mothur.shared"):
36 shared=input_otu.dat,
37 bygroup=$input.bygroup,
38 #if $input.groups:
39 groups=${ str($input.groups).replace(",","-") },
40 #end if
41 #end if
42 #if $input.label:
43 label=${ str($input.label).replace(",","-") },
44 #end if
45 nseqs=$nseqs
46 )'
47 | sed 's/ //g' ## mothur trips over whitespace
48 | mothur
49 | tee mothur.out.log
50 ]]></command>
51 <inputs>
52 <conditional name="input">
53 <param name="source" type="select" label="Select Input Format">
54 <option value="shared">shared</option>
55 <option value="list">list</option>
56 <option value="default">rabund or sabund</option>
57 </param>
58 <when value="shared">
59 <param name="otu" type="data" format="mothur.shared" label="shared - Otu dataset"/>
60 <param name="groups" type="select" optional="true" label="groups - Pick groups to analyze" multiple="true">
61 <options>
62 <filter type="data_meta" ref="otu" key="groups"/>
63 </options>
64 </param>
65 <param name="bygroup" type="boolean" truevalue="true" falsevalue="false" checked="false" label="bygroup - Remove any OTU that has nseqs or fewer sequences across all groups"/>
66 <param name="label" type="select" multiple="true" optional="true" label="label - OTU Labels">
67 <expand macro="labeloptions"/>
68 </param>
69 </when>
70 <when value="list">
71 <param name="otu" type="data" format="mothur.list" label="list - Otu dataset"/>
72 <param name="group" type="data" optional="true" format="mothur.groups" label="group - Groups"/>
73 <param name="count" type="data" format="count_table" optional="true" label="count - Count Table" help="If you clustered with a count file, can only supply one of group or count table, not both"/>
74 <param name="groups" type="select" optional="true" label="groups - Pick groups to analyze" multiple="true">
75 <options>
76 <filter type="data_meta" ref="group" key="groups"/>
77 </options>
78 </param>
79 <param name="label" type="select" multiple="false" optional="true" label="label - OTU Labels">
80 <expand macro="labeloptions"/>
81 </param>
82 </when>
83 <when value="default">
84 <param name="otu" type="data" format="mothur.list,mothur.rabund,mothur.sabund" label="list,rabund,sabund - Otu dataset"/>
85 <param name="label" type="select" multiple="true" optional="true" label="label - OTU Labels">
86 <expand macro="labeloptions"/>
87 </param>
88 </when>
89 </conditional>
90 <param name="nseqs" type="integer" value="1" min="0" label="nseqs - Number of sequences cutoff for an otu to be deemed rare"/>
91 </inputs>
92 <outputs>
93 <expand macro="logfile-output"/>
94 <data name="pick_otu" format_source="otu" from_work_dir="input_otu*.pick.*" label="${tool.name} on ${on_string}: pick.${input.otu.ext}">
95 <filter>input['source'] != 'shared'</filter>
96 </data>
97 <collection name="pick_shared" type="list" label="${tool.name} on ${on_string}: pick.shared per label">
98 <filter>input['source'] == 'shared'</filter>
99 <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.pick\.dat" format="mothur.shared"/>
100 </collection>
101 <data name="pick_group" format="mothur.groups" from_work_dir="input.group*.pick.*" label="${tool.name} on ${on_string}: pick.groups">
102 <filter>input['source'] == 'list'</filter>
103 </data>
104 </outputs>
105 <tests>
106 <test><!-- test with list -->
107 <param name="source" value="list"/>
108 <param name="otu" value="amazon.an.list" ftype="mothur.list"/>
109 <output name="pick_otu" md5="4779791c9b0ef95a54083ee1a6ad6c8d" ftype="mothur.list"/>
110 <expand macro="logfile-test"/>
111 </test>
112 <test><!-- test with list and group file -->
113 <param name="source" value="list"/>
114 <param name="otu" value="amazon.an.list" ftype="mothur.list"/>
115 <param name="group" value="amazon.groups" ftype="mothur.groups"/>
116 <param name="groups" value="forest,pasture"/>
117 <output name="pick_otu" md5="4779791c9b0ef95a54083ee1a6ad6c8d" ftype="mothur.list"/>
118 <output name="pick_group" md5="9561ba470c769670ab6d92563a44027f" ftype="mothur.groups"/>
119 <expand macro="logfile-test"/>
120 </test>
121 <test><!-- test with shared file -->
122 <param name="source" value="shared"/>
123 <param name="otu" value="amazon.an.shared" ftype="mothur.shared"/>
124 <output_collection name="pick_shared" count="36">
125 <element name="0.38" md5="e58da633dd16f0cb6472d6c6b3318c9f" ftype="mothur.shared"/>
126 </output_collection>
127 <expand macro="logfile-test"/>
128 </test>
129 <test><!-- test with shared file and label/group select -->
130 <param name="source" value="shared"/>
131 <param name="otu" value="amazon.an.shared" ftype="mothur.shared"/>
132 <param name="bygroup" value="true"/>
133 <param name="label" value="0.05,0.22,0.41"/>
134 <param name="groups" value="forest,pasture"/>
135 <output_collection name="pick_shared" count="3">
136 <element name="0.22" md5="46d97e6f97e7909d72d09a1726655539" ftype="mothur.shared"/>
137 </output_collection>
138 <expand macro="logfile-test"/>
139 </test>
140 <test><!-- test with rabund/sabund file -->
141 <param name="source" value="default"/>
142 <param name="otu" value="amazon.an.sabund" ftype="mothur.sabund"/>
143 <output name="pick_otu" md5="ca842ed3ef543d3dd76fd9089cd87c46" ftype="mothur.sabund"/>
144 <expand macro="logfile-test"/>
145 </test>
146 </tests>
147 <help>
148 <![CDATA[
149
150 @MOTHUR_OVERVIEW@
151
152 **Command Documentation**
153
154 The remove.rare_ command reads one of the following file types: list_, rabund_, sabund_ or shared_ file. It outputs a new file after removing the rare otus.
155
156 .. _list: https://www.mothur.org/wiki/List_file
157 .. _sabund: https://www.mothur.org/wiki/Sabund_file
158 .. _rabund: https://www.mothur.org/wiki/Rabund_file
159 .. _shared: https://www.mothur.org/wiki/Shared_file
160 .. _remove.rare: https://www.mothur.org/wiki/Remove.rare
161
162 ]]>
163 </help>
164 <expand macro="citations"/>
165 </tool>