comparison biom_convert.xml @ 0:501c21cce614 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/biom_format commit 01bf97e10e5491ec878cca24495d8125449dfc1e
author iuc
date Tue, 07 Jun 2016 17:26:00 -0400
parents
children 0de92f0b96ef
comparison
equal deleted inserted replaced
-1:000000000000 0:501c21cce614
1 <tool id="biom_convert" name="Convert BIOM" version="@VERSION@.0">
2 <description>formats</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>
10 <![CDATA[
11 biom convert -i "${input_type.input_table}" -o "${output_table}"
12 #if str( $input_type.input_type_selector ) == "tsv":
13 #if $input_type.process_obs_metadata:
14 --process-obs-metadata "${input_type.process_obs_metadata}"
15 #end if
16 #end if
17
18 #if str( $output_type.output_type_selector ) == "tsv":
19 --to-tsv
20 #if $output_type.header_key:
21 --header-key "${output_type.header_key}"
22 #if $output_type.output_metadata_id:
23 --output-metadata-id "${output_type.output_metadata_id}"
24 #end if
25 --tsv-metadata-formatter "${output_type.tsv_metadata_formatter}"
26 #end if
27 #else:
28 --table-type "${output_type.table_type}"
29 #if str( $output_type.biom_type.biom_type_selector ) == 'hdf5':
30 --to-hdf5
31 ${output_type.biom_type.collapsed_samples}
32 ${output_type.biom_type.collapsed_observations}
33 #else:
34 --to-json
35 #end if
36 #if $output_type.sample_metadata_fp:
37 --sample-metadata-fp "${output_type.sample_metadata_fp}"
38 #end if
39 #if $output_type.observation_metadata_fp:
40 --observation-metadata-fp "${output_type.observation_metadata_fp}"
41 #end if
42 #end if
43 ]]>
44 </command>
45 <inputs>
46 <conditional name="input_type">
47 <param name="input_type_selector" type="select" label="Choose the source BIOM format">
48 <option value="tsv" selected="True">Tabular File</option>
49 <option value="biom">BIOM File</option>
50 </param>
51 <when value="tsv">
52 <param name="input_table" type="data" format="tabular" label="Tabular File" argument="--input-fp"/>
53 <param name="process_obs_metadata" type="select" label="Process metadata associated with observations when converting" argument="--process-obs-metadata">
54 <option value="" selected="True">Do Not process metadata</option>
55 <option value="taxonomy">taxonomy</option>
56 <option value="naive">naive</option>
57 <option value="sc_separated">sc_separated</option>
58 </param>
59 </when>
60 <when value="biom">
61 <param name="input_table" type="data" format="biom1" label="Tabular File" argument="--input-fp"/>
62 </when>
63 </conditional>
64 <conditional name="output_type">
65 <param name="output_type_selector" type="select" label="Choose the output type" argument="--to-tsv">
66 <option value="tsv">TSV-formatted (classic) table</option>
67 <option value="biom" selected="True">BIOM</option>
68 </param>
69 <when value="tsv">
70 <param name="header_key" type="text" value="" label="observation metadata to include" help="Leave empty to ignore" argument="--header-key"/>
71 <param name="output_metadata_id" type="text" value="" label="name to be given to the observation metadata column" help="Leave empty to ignore" argument="--output-metadata-id"/>
72 <param name="tsv_metadata_formatter" type="select" label="Method for formatting the observation metadata" argumet="--tsv-metadata-formatter">
73 <option value="naive" selected="True">naive</option>
74 <option value="sc_separated">Semi-colon separated</option>
75 </param>
76 </when>
77 <when value="biom">
78 <param name="table_type" type="select" label="Table Type" argument="--table-type">
79 <option value="OTU table">OTU table</option>
80 <option value="Pathway table">Pathway table</option>
81 <option value="Function table">Function table</option>
82 <option value="Ortholog table">Ortholog table</option>
83 <option value="Gene table">Gene table</option>
84 <option value="Metabolite table">Metabolite table</option>
85 <option value="Taxon table">Taxon table</option>
86 <option value="Table" selected="True">Table</option>
87 </param>
88 <conditional name="biom_type">
89 <param name="biom_type_selector" type="select" label="BIOM format type" argument="--to-json / --to-hdf5">
90 <option value="json" selected="True">JSON-formatted table (BIOM1)</option>
91 <option value="hdf5">HDF5-formatted table (BIOM2)</option>
92 </param>
93 <when value="json">
94 </when>
95 <when value="hdf5">
96 <param name="collapsed_samples" type="boolean" truevalue="" falsevalue="--collapsed-samples" checked="False" label="Use collapsed samples" argument="--collapsed-observations"/>
97 <param name="collapsed_observations" type="boolean" truevalue="" falsevalue="--collapsed-samples" checked="False" label="Use collapsed observations"/>
98 </when>
99 </conditional>
100 <param name="sample_metadata_fp" type="data" format="tabular" optional="True" label="Add sample metadata from metadata mapping file" argument="--sample-metadata-fp"/>
101 <param name="observation_metadata_fp" type="data" format="tabular" optional="True" label="Add observation metadata from mapping file" argument="--observation-metadata-fp"/>
102 </when>
103 </conditional>
104 </inputs>
105 <outputs>
106 <data format="biom1" name="output_table">
107 <change_format>
108 <when input="output_type.output_type_selector" value="tsv" format="tabular" />
109 <when input="output_type.biom_type" value="hdf5" format="biom2" />
110 </change_format>
111 </data>
112 </outputs>
113 <tests>
114 <test>
115 <conditional name="input_type">
116 <param name="input_type_selector" value="tsv"/>
117 <param name="input_table" value="input_abundance_taxonomy_1.tabular" ftype="tabular"/>
118 <param name="process_obs_metadata" value="taxonomy"/>
119 </conditional>
120 <conditional name="output_type">
121 <param name="output_type_selector" value="biom"/>
122 <param name="table_type" value="OTU table"/>
123 <conditional name="biom_type">
124 <param name="biom_type_selector" value="json"/>
125 </conditional>
126 <param name="sample_metadata_fp"/>
127 <param name="observation_metadata_fp"/>
128 </conditional>
129 <output name="output_table" file="output_taxonomy_1.biom1.re" ftype="biom1" compare="re_match"/>
130 </test>
131 <test>
132 <conditional name="input_type">
133 <param name="input_type_selector" value="tsv"/>
134 <param name="input_table" value="input_abundance_1.tabular" ftype="tabular"/>
135 <param name="process_obs_metadata" value=""/>
136 </conditional>
137 <conditional name="output_type">
138 <param name="output_type_selector" value="biom"/>
139 <param name="table_type" value="OTU table"/>
140 <conditional name="biom_type">
141 <param name="biom_type_selector" value="json"/>
142 </conditional>
143 <param name="sample_metadata_fp"/>
144 <param name="observation_metadata_fp"/>
145 </conditional>
146 <output name="output_table" file="output_1.biom1.re" ftype="biom1" compare="re_match"/>
147 </test>
148 </tests>
149 <help><![CDATA[
150
151 Usage: biom convert [OPTIONS]::
152
153 Convert to/from the BIOM table format.
154
155 Convert between BIOM table formats. See examples here: http://biom-format.org/documentation/biom_conversion.html
156
157 Example usage:
158
159 Convert a "classic" BIOM file (tab-separated text) to an HDF5 BIOM formatted OTU table:
160
161 $ biom convert -i table.txt -o table.biom --to-hdf5
162
163
164 Options:
165 -i, --input-fp PATH The input BIOM table [required]
166 -o, --output-fp PATH The output BIOM table [required]
167 -m, --sample-metadata-fp PATH The sample metadata mapping file (will add sample metadata to the input BIOM table, if provided).
168 --observation-metadata-fp PATH The observation metadata mapping file (will add observation metadata to the input BIOM table, if provided).
169 --to-json Output as JSON-formatted table.
170 --to-hdf5 Output as HDF5-formatted table.
171 --to-tsv Output as TSV-formatted (classic) table. table is a BIOM table with collapsed samples, this will update the sample metadata of the table to the supported HDF5 collapsed format.
172 --collapsed-observations If --to_hdf5 is passed and the original table is a BIOM table with collapsed observations, this will update the supported HDF5 collapsed format.
173 --header-key TEXT The observation metadata to include from the input BIOM table file when creating a tsv table file. By default no observation metadata will be included.
174 --output-metadata-id TEXT The name to be given to the observation metadata column when creating a tsv table file if the column should be renamed.
175 --table-type OTU table,Pathway table,Function table,Ortholog table,Gene table,Metabolite table,Taxon table,Table The type of the table.
176 --process-obs-metadata taxonomy,naive,sc_separated Process metadata associated with observations when converting from a classic table.
177 --tsv-metadata-formatter naive,sc_separated Method for formatting the observation
178 --help Show this message and exit.
179
180 ]]></help>
181 <expand macro="citations" />
182 </tool>