-
Notifications
You must be signed in to change notification settings - Fork 0
/
make_otu_table.xml
executable file
·182 lines (178 loc) · 7.88 KB
/
make_otu_table.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<tool id="make_otu_table" name="Make otu table" version="2.0">
<!--
<description>Make an otu or zotu table</description>
-->
<requirements>
<requirement type="package" version="1.14.0">bioconductor-dada2=</requirement>
<requirement type="package" version="1.76">biopython=</requirement>
<requirement type="package" version="2.14.2">vsearch=</requirement>
<!-- <requirement type="package" version="6.0">unzip</requirement> -->
</requirements>
<stdio>
<exit_code range="1:" level="fatal" description="A fatal error occured. Please check tool stderr/stdout logs." />
</stdio>
<command>
<![CDATA[
bash '$__tool_directory__/make_otu_table.sh'
$input
$input_type
$algo.cluster_algo
#if not $output_label
$output_zip
$output_log
$output_otu_sequence
$output_otutab
$output_bioom
#end if
#if $output_label
$output_zip_custom_name
$output_log_custom_name
$output_otu_sequence_custom_name
$output_otutab_custom_name
$output_bioom_custom_name
#end if
#if $algo.cluster_algo == "unoise"
$algo.unoise_alpha
$algo.minsize
#end if
#if $algo.cluster_algo == "vsearch_unoise"
$algo.unoise_alpha
$algo.minsize
#end if
#if $algo.cluster_algo == "vsearch_unoise_no_chimera_check"
$algo.unoise_alpha
$algo.minsize
#end if
#if $algo.cluster_algo == "vsearch"
$algo.cluster_id
$algo.minsize
#end if
#if $algo.cluster_algo == "vsearch_no_chimera_check"
$algo.cluster_id
$algo.minsize
#end if
#if $algo.cluster_algo == "cluster_otus"
$algo.minsize
#end if
]]>
</command>
<macros>
<macro name="output_file_selection">
<param name="output_selection_otu_sequence" type="boolean" label="Otu sequences fasta file" checked="yes" truevalue="yes" falsevalue="no"/>
<param name="output_selection_otutab" type="boolean" label="Otu table" checked="yes" truevalue="yes" falsevalue="no"/>
<param name="output_selection_log" type="boolean" label="Log file" checked="yes" truevalue="yes" falsevalue="no"/>
<param name="output_selection_bioom" type="boolean" label="Bioom file" checked="no" truevalue="yes" falsevalue="no"/>
<param name="output_selection_file_zip" type="boolean" label="zip file" checked="no" truevalue="yes" falsevalue="no"/>
</macro>
<macro name="unoise_macro">
<param name="unoise_alpha" type="float" label="unoise_alpha" value="2.0" min="0.1" max="20"/>
<param name="minsize" type="integer" label="Minimal accepted abundance before clustering" value="8" min="1" max="100"/>
</macro>
<macro name="vsearch_unoise_macro">
<param name="unoise_alpha" type="float" label="unoise_alpha" value="2.0" min="0.1" max="20"/>
<param name="minsize" type="integer" label="Minimal accepted abundance before clustering" value="8" min="1" max="100"/>
</macro>
<macro name="vsearch_macro">
<param name="cluster_id" type="float" label="Cluster id" value="0.97" min="0.1" max="1"/>
<param name="minsize" type="integer" label="Minimal accepted abundance before clustering" value="8" min="1" max="100"/>
</macro>
<macro name="cluster_otus_macro">
<param name="minsize" type="integer" label="Minimal accepted abundance before clustering" value="8" min="1" max="100"/>
</macro>
</macros>
<inputs>
<param format="zip" name="input" type="data" label="zip file containing fasta or fastq files"/>
<!--
<param name="input_type" type="select" multiple="false" label="Input type">
<option value="FASTA">fasta</option>
<option value="FASTQ" selected="true">fastq</option>
</param>-->
<conditional name="algo">
<param name="cluster_algo" type="select" multiple="false" label="Clustering">
<option value="unoise" selected="true">UNOISE</option>
<option value="dada2">DADA2</option>
<option value="cluster_otus">cluster_otus (UPARSE)</option>
<option value="vsearch">VSEARCH with chimera checking (--uchime_denovo)</option>
<option value="vsearch_no_chimera_check">VSEARCH without chimera checking</option>
<option value="vsearch_unoise">VSEARCH unoise with chimera checking (--uchime3_denovo)</option>
<option value="vsearch_unoise_no_chimera_check">VSEARCH unoise without chimera checking</option>
</param>
<when value="unoise">
<expand macro="unoise_macro"/>
</when>
<when value="vsearch">
<expand macro="vsearch_macro"/>
</when>
<when value="vsearch_no_chimera_check">
<expand macro="vsearch_macro"/>
</when>
<when value="cluster_otus">
<expand macro="cluster_otus_macro"/>
</when>
<when value="vsearch_unoise">
<expand macro="vsearch_unoise_macro"/>
</when>
<when value="vsearch_unoise_no_chimera_check">
<expand macro="vsearch_unoise_macro"/>
</when>
</conditional>
<param name="input_type" type="select" multiple="false" label="Input type" dynamic_options="input_type_filter(algo)"/>
<conditional name="output_type">
<param name="output_files" type="select" multiple="false" label="Output">
<option value="out_zip">Output as zip</option>
<option value="out_files" selected="true">Output as seprated files</option>
</param>
<when value="out_files">
<expand macro="output_file_selection"/>
</when>
</conditional>
<param name="output_label" type="text" value="" label="History output name" />
</inputs>
<code file="/srv/galaxy/local_tools/galaxy-tool-make-otu-table/dynamic_xml.py"/>
<outputs>
<data format="zip" type="data" name="output_zip" label="$input.display_name zip">
<filter>output_type['output_files'] == "out_zip" or output_type['output_selection_file_zip'] and output_label == ''</filter>
</data>
<data format="txt" name="output_log" label="$input.display_name log">
<filter>output_type['output_files'] == "out_files" and output_type['output_selection_log'] and output_label == ''</filter>
</data>
<data format="fasta" name="output_otu_sequence" label="$input.display_name sequences">
<filter>output_type['output_files'] == "out_files" and output_type['output_selection_otu_sequence'] and output_label == ''</filter>
</data>
<data format="tabular" name="output_otutab" label="$input.display_name otu table">
<filter>output_type['output_files'] == "out_files" and output_type['output_selection_otutab'] and output_label == ''</filter>
</data>
<data format="txt" name="output_bioom" label="$input.display_name bioom file">
<filter>output_type['output_files'] == "out_files" and output_type['output_selection_bioom'] and output_label == ''</filter>
</data>
<!-- CUSTOM OUTPUT NAME -->
<data format="zip" type="data" name="output_zip_custom_name" label="$output_label zip">
<filter>output_type['output_files'] == "out_zip" or output_type['output_selection_file_zip'] and output_label != ''</filter>
</data>
<data format="txt" name="output_log_custom_name" label="$output_label log">
<filter>output_type['output_files'] == "out_files" and output_type['output_selection_log'] and output_label != ''</filter>
</data>
<data format="fasta" name="output_otu_sequence_custom_name" label="$output_label sequences">
<filter>output_type['output_files'] == "out_files" and output_type['output_selection_otu_sequence'] and output_label != ''</filter>
</data>
<data format="tabular" name="output_otutab_custom_name" label="$output_label otu table">
<filter>output_type['output_files'] == "out_files" and output_type['output_selection_otutab'] and output_label != ''</filter>
</data>
<data format="txt" name="output_bioom_custom_name" label="$output_label bioom file">
<filter>output_type['output_files'] == "out_files" and output_type['output_selection_bioom'] and output_label != ''</filter>
</data>
</outputs>
<tests>
<test>
<param name="test_input" value="test_input.txt"/>
<output name="test_output" file="test_output.txt"/>
</test>
</tests>
<help>
</help>
<citations>
<citation type="doi">10.7717/peerj.2584</citation>
<citation type="doi">10.1101/081257</citation>
<citation type="doi">10.1038/nmeth.2604</citation>
</citations>
</tool>