comparison hdf5_to_txt.xml @ 0:5c545e1f0fa2 draft

"planemo upload for repository https://github.com/computational-metabolomics/dimspy-galaxy commit 6321871098b2c4bc9e321d20b7e66fff3d641839"
author computational-metabolomics
date Sat, 11 Apr 2020 16:45:45 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:5c545e1f0fa2
1 <tool id="dimspy_hdf5_to_txt" name="Convert DIMSpy-based HDF5 to tsv" version="@TOOL_VERSION@+galaxy@GALAXY_TOOL_VERSION@">
2 <description></description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <expand macro="requirements" />
7 <command detect_errors="exit_code">
8 <![CDATA[
9 #if $input.object_type == 'peak_lists'
10 dimspy hdf5-pls-to-txt
11 --input '$input.hdf5_file_in'
12 --output .
13 --delimiter $delimiter
14 #elif $input.object_type == 'peak_matrix'
15 #if $input.matrix_format == 'standard' or $input.matrix_format == 'standard_comprehensive'
16 dimspy hdf5-pm-to-txt
17 --input '$input.hdf5_file_in'
18 --output '$matrix_file_out'
19 --delimiter $delimiter
20 --attribute_name $input.matrix_attr
21 --representation-samples $input.representation_samples
22 #end if
23 #if $input.matrix_format == "standard_comprehensive"
24 &&
25 #end if
26 #if $input.matrix_format == 'comprehensive' or $input.matrix_format == 'standard_comprehensive'
27 dimspy hdf5-pm-to-txt
28 --input '$input.hdf5_file_in'
29 --output '$matrix_comprehensive_file_out'
30 --delimiter $delimiter
31 --comprehensive
32 --attribute_name '$input.matrix_attr'
33 --representation-samples $input.representation_samples
34 #end if
35 #end if
36 ]]>
37 </command>
38 <inputs>
39 <param name="delimiter" argument="--delimiter" type="hidden" value="tab" />
40 <conditional name="input">
41 <param name="object_type" type="select" label="Content HDF5 file" help="">
42 <option value="peak_matrix" selected="true">Peak Intensity Matrix</option>
43 <option value="peak_lists">Peak list(s)</option>
44 </param>
45 <when value="peak_lists">
46 <param name="hdf5_file_in" argument="--input" type="data" format="h5" label="Peaklist(s) (HDF5 file)" help="" />
47 </when>
48 <when value="peak_matrix">
49 <param name="hdf5_file_in" argument="--input" type="data" format="h5" label="Peak intensity matrix (HDF5 file)" help="" />
50 <param name="matrix_format" type="select" label="Select format(s) tsv formatted peak instensity matrix" help="">
51 <option value="standard" selected="true">Standard Peak Matrix (i.e. m/z and intensity).</option>
52 <option value="comprehensive">Comprehensive Peak Matrix (e.g. m/z and intensity, rsd, missing values).</option>
53 <option value="standard_comprehensive">Standard and comprehensive</option>
54 </param>
55 <param name="representation_samples" type="select" label="Should the rows or columns represent the samples?" help="">
56 <option value="rows" selected="true">Rows</option>
57 <option value="columns">Columns</option>
58 </param>
59 <param name="matrix_attr" type="select" label="The Peak Matrix should contain ... values" help="">
60 <option value="intensity" selected="true">Intensity</option>
61 <option value="mz">m/z</option>
62 <option value="snr">Signal-to-noise ratio (SNR)</option>
63 </param>
64 </when>
65 </conditional>
66 </inputs>
67 <outputs>
68 <collection name="peaklists_txt" type="list" label="${tool.name} on ${on_string}: Peaklists">
69 <filter>input["object_type"] == "peak_lists"</filter>
70 <discover_datasets pattern="(?P&lt;designation&gt;.+)\.txt" format="tsv" directory="." visible="false" />
71 </collection>
72 <data name="matrix_file_out" format="tsv" label="${tool.name} on ${on_string}: Peak Matrix">
73 <filter>input["object_type"] == "peak_matrix" and (input["matrix_format"] == "standard" or input["matrix_format"] == "standard_comprehensive")</filter>
74 </data>
75 <data name="matrix_comprehensive_file_out" format="tsv" label="${tool.name} on ${on_string}: Peak Matrix (comprehensive)" >
76 <filter>input["object_type"] == "peak_matrix" and (input["matrix_format"] == "comprehensive" or input["matrix_format"] == "standard_comprehensive")</filter>
77 </data>
78 </outputs>
79 <tests>
80 <test>
81 <conditional name="input">
82 <param name="object_type" value="peak_lists"/>
83 <param name="hdf5_file_in" value="pls.h5" ftype="h5"/>
84 </conditional>
85 <output_collection name="peaklists_txt" type="list">
86 <element name="batch04_QC17_rep01_262" file="batch04_QC17_rep01_262.txt" ftype="tsv"/>
87 <element name="batch04_QC17_rep02_263" file="batch04_QC17_rep02_263.txt" ftype="tsv"/>
88 <element name="batch04_QC17_rep03_264" file="batch04_QC17_rep03_264.txt" ftype="tsv"/>
89 </output_collection>
90 </test>
91 <test>
92 <conditional name="input">
93 <param name="object_type" value="peak_matrix"/>
94 <param name="hdf5_file_in" value="pm_as_bf_sf.h5" ftype="h5"/>
95 <param name="matrix_format" value="comprehensive"/>
96 <param name="representation_samples" value="columns"/>
97 <param name="matrix_attr" value="intensity"/>
98 </conditional>
99 <output name="matrix_comprehensive_file_out" file="peak_matrix_hdf5_to_txt_intensity.txt" ftype="tsv"/>
100 </test>
101 <test>
102 <conditional name="input">
103 <param name="object_type" value="peak_matrix"/>
104 <param name="hdf5_file_in" value="pm_as_bf_sf.h5" ftype="h5"/>
105 <param name="matrix_format" value="standard"/>
106 <param name="representation_samples" value="rows"/>
107 <param name="matrix_attr" value="mz"/>
108 </conditional>
109 <output name="matrix_file_out" file="peak_matrix_hdf5_to_txt_mz.txt" ftype="tsv"/>
110 </test>
111 <test>
112 <conditional name="input">
113 <param name="object_type" value="peak_matrix"/>
114 <param name="hdf5_file_in" value="pm_as_bf_sf.h5" ftype="h5"/>
115 <param name="matrix_format" value="standard_comprehensive"/>
116 <param name="representation_samples" value="rows"/>
117 <param name="matrix_attr" value="snr"/>
118 </conditional>
119 <output name="matrix_file_out" file="peak_matrix_hdf5_to_txt_snr.txt" ftype="tsv"/>
120 <output name="matrix_comprehensive_file_out" file="peak_matrix_hdf5_to_txt_comprehensive_snr.txt" ftype="tsv"/>
121 </test>
122 </tests>
123 <help>
124 --------------------------------
125 Convert DIMSpy-based HDF5 to tsv
126 --------------------------------
127
128 ..
129
130 ----------------------------------
131
132 Description
133 -----------
134
135 This tool converts a .hdf5 file, containing either peaklist(s) or a peak intensity matrix, to user-friendly .tsv file(s).
136
137 ----------------------------------
138
139 Parameters
140 ----------
141
142 **Contents of hdf5 file** (REQUIRED; default = **peak intensity matrix**) - selection menu in which the user defines whether the input .hdf5 file contains:
143
144 - **a peak intensity matrix**
145
146 - **peaklist(s)**
147
148 |
149
150 **Peak intensity matrix or peaklists (HDF5 file)** (REQUIRED) - selection menu in which the user chooses the .hdf5 file (from the active Galaxy history) to be converted to .tsv formatted output(s).
151
152 |
153
154 **Select format(s) tsv formatted peak intensity matrix** (REQUIRED; default = **Standard Peak Matrix**) - selection menu in which the user chooses from the following export options:
155
156 @help_options_addtional_output@
157
158 ----------------------------------
159
160 Output file(s)
161 --------------
162
163 **Important** - the metric recorded output peak matrix/matrices is adjusted using the "The peak matrix should contain intensity | m/z | SNR values" parameter. By default, samples are presented row-wise and peak mass-to-charge ratio values are presented column-wise in each peak matrix, though this may be adjusted using the "Should rows or columns represent samples" parameter toggle.
164
165 @help_outputs_matrix@
166
167 ----------------------------------------------
168
169 @github_developers_contributors@
170 @license@
171 </help>
172 <expand macro="citations" />
173 </tool>
174