comparison waveica.xml @ 1:b77023c41c76 draft

planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/waveica commit d82e7dad96bebe9424ac7bf490e2786d82c3681a
author recetox
date Thu, 29 Sep 2022 15:21:04 +0000
parents 328710890963
children 6480c6d5fa36
comparison
equal deleted inserted replaced
0:328710890963 1:b77023c41c76
1 <tool id="waveica" name="WaveICA" version="@TOOL_VERSION@+galaxy1" python_template_version="3.5"> 1 <tool id="waveica" name="WaveICA" version="@TOOL_VERSION@+galaxy2" python_template_version="3.5">
2 <description>removal of batch effects for untargeted metabolomics data</description> 2 <description>removal of batch effects for untargeted metabolomics data</description>
3 <macros> 3 <macros>
4 <import>macros.xml</import> 4 <import>macros.xml</import>
5 </macros> 5 </macros>
6 <expand macro="creator"/> 6 <expand macro="creator"/>
7 7
8 <requirements> 8 <requirements>
9 <requirement type="package" version="@TOOL_VERSION@">r-recetox-waveica</requirement> 9 <requirement type="package" version="@TOOL_VERSION@">r-recetox-waveica</requirement>
10 <requirement type="package" version="8.0.0">r-arrow</requirement>
10 </requirements> 11 </requirements>
11 <command detect_errors="aggressive"><![CDATA[ 12 <command detect_errors="aggressive"><![CDATA[
12 Rscript 13 Rscript
13 -e 'source("${__tool_directory__}/waveica_wrapper.R")' 14 -e 'source("${__tool_directory__}/waveica_wrapper.R")'
14 15
15 #if $batch_correction.mode == "batchwise": 16 #if $batch_correction.mode == "batchwise":
16 -e 'normalized_data <- waveica( 17 -e 'normalized_data <- waveica(
17 data = "$data", 18 file = "$input_num.data",
19 #if $input_num.input_choice == "2":
20 metadata = "$input_num.input_metadata.metadata",
21 ext = "$input_num.data.ext,$input_num.input_metadata.metadata.ext",
22 #else:
23 ext = "$input_num.data.ext",
24 #end if
18 wavelet_filter = "$wf.wavelet_filter", 25 wavelet_filter = "$wf.wavelet_filter",
19 wavelet_length = "$wf.wavelet_length", 26 wavelet_length = "$wf.wavelet_length",
20 k = $k, 27 k = $k,
21 t = $batch_correction.t, 28 t = $batch_correction.t,
22 t2 = $batch_correction.t2, 29 t2 = $batch_correction.t2,
23 alpha = $alpha, 30 alpha = $alpha,
24 exclude_blanks = $exclude_blanks 31 exclude_blanks = $exclude_blanks
25 )' 32 )'
26 #else if $batch_correction.mode == "single_batch": 33 #else if $batch_correction.mode == "single_batch":
27 -e 'normalized_data <- waveica_singlebatch( 34 -e 'normalized_data <- waveica_singlebatch(
28 data = "$data", 35 file = "$input_num.data",
36 #if $input_num.input_choice == "2":
37 metadata = "$input_num.input_metadata.metadata",
38 ext = "$input_num.data.ext,$input_num.input_metadata.metadata.ext",
39 #else:
40 ext = "$input_num.data.ext",
41 #end if
29 wavelet_filter = "$wf.wavelet_filter", 42 wavelet_filter = "$wf.wavelet_filter",
30 wavelet_length = "$wf.wavelet_length", 43 wavelet_length = "$wf.wavelet_length",
31 k = $k, 44 k = $k,
32 alpha = $alpha, 45 alpha = $alpha,
33 cutoff = $batch_correction.cutoff, 46 cutoff = $batch_correction.cutoff,
34 exclude_blanks = $exclude_blanks 47 exclude_blanks = $exclude_blanks
35 )' 48 )'
36 #end if 49 #end if
37 50
38 -e 'store_data(normalized_data,"$normalized_data")' 51 -e 'store_data(normalized_data, "$normalized_data", "$input_num.data.ext")'
39 ]]></command> 52 ]]></command>
40 53
41 <inputs> 54 <inputs>
55 <conditional name="input_num">
56 <param name="input_choice" type="select" label="Choose input files:">
57 <option value="1" selected="true">1</option>
58 <option value="2">2</option>
59 </param>
60 <when value="1">
61 <expand macro="input_data"/>
62 </when>
63 <when value="2">
64 <section name="input_metadata" title="Input metadata table" expanded="true">
65 <param name="metadata" label="Input metadata" type="data" format="csv,tsv,parquet" help="" />
66 </section>
67 <expand macro="input_data"/>
68 </when>
69 </conditional>
42 <expand macro="general_parameters"/> 70 <expand macro="general_parameters"/>
43 <expand macro="wf"/> 71 <expand macro="wf"/>
44 <conditional name="batch_correction"> 72 <conditional name="batch_correction">
45 <param name="mode" type="select" label="Batch correction mode" help="'multiple batches' takes into account 73 <param name="mode" type="select" label="Batch correction mode" help="'multiple batches' takes into account
46 inter- and intrabatch intensity drift; 'single batch' relies only on the injection order of the samples and 74 inter- and intrabatch intensity drift; 'single batch' relies only on the injection order of the samples and
59 </inputs> 87 </inputs>
60 88
61 <expand macro="outputs"/> 89 <expand macro="outputs"/>
62 90
63 <tests> 91 <tests>
64 <test> 92 <test><!-- TEST 1 -->
65 <param name="data" value="input_data.csv" ftype="csv"/> 93 <param name="data" value="input_data.csv" ftype="csv"/>
66 <param name="mode" value="batchwise"/> 94 <param name="mode" value="batchwise"/>
67 <param name="wavelet_filter" value="d"/> 95 <param name="wavelet_filter" value="d"/>
68 <param name="filter_length" value="2"/> 96 <param name="filter_length" value="2"/>
69 <param name="k" value="20"/> 97 <param name="k" value="20"/>
70 <param name="t" value="0.05"/> 98 <param name="t" value="0.05"/>
71 <param name="t2" value="0.05"/> 99 <param name="t2" value="0.05"/>
72 <param name="alpha" value="0"/> 100 <param name="alpha" value="0"/>
101 <output name="normalized_data" file="normalized_data.csv"/>
102 </test>
103 <test><!-- TEST 2 -->
104 <param name="data" value="input_data.tsv" ftype="tsv"/>
105 <param name="mode" value="batchwise"/>
106 <param name="wavelet_filter" value="d"/>
107 <param name="filter_length" value="2"/>
108 <param name="k" value="20"/>
109 <param name="t" value="0.05"/>
110 <param name="t2" value="0.05"/>
111 <param name="alpha" value="0"/>
73 <output name="normalized_data" file="normalized_data.tsv"/> 112 <output name="normalized_data" file="normalized_data.tsv"/>
113 </test>
114 <test><!-- TEST 3 -->
115 <param name="data" value="input_data.parquet" ftype="parquet"/>
116 <param name="mode" value="batchwise"/>
117 <param name="wavelet_filter" value="d"/>
118 <param name="filter_length" value="2"/>
119 <param name="k" value="20"/>
120 <param name="t" value="0.05"/>
121 <param name="t2" value="0.05"/>
122 <param name="alpha" value="0"/>
123 <output name="normalized_data" file="normalized_data.parquet"/>
124 </test>
125 <test><!-- TEST 4 -->
126 <param name="input_choice" value="2"/>
127 <param name="data" value="feature_table.csv" ftype="csv"/>
128 <param name="metadata" value="metadata.csv" ftype="csv"/>
129 <param name="mode" value="batchwise"/>
130 <param name="wavelet_filter" value="d"/>
131 <param name="filter_length" value="2"/>
132 <param name="k" value="20"/>
133 <param name="t" value="0.05"/>
134 <param name="t2" value="0.05"/>
135 <param name="alpha" value="0"/>
136 <output name="normalized_data" file="normalized_data.csv"/>
137 </test>
138 <test><!-- TEST 5 -->
139 <param name="input_choice" value="2"/>
140 <param name="data" value="feature_table.tsv" ftype="tsv"/>
141 <param name="metadata" value="metadata.tsv" ftype="tsv"/>
142 <param name="mode" value="batchwise"/>
143 <param name="wavelet_filter" value="d"/>
144 <param name="filter_length" value="2"/>
145 <param name="k" value="20"/>
146 <param name="t" value="0.05"/>
147 <param name="t2" value="0.05"/>
148 <param name="alpha" value="0"/>
149 <output name="normalized_data" file="normalized_data.tsv"/>
150 </test>
151 <test><!-- TEST 6 -->
152 <param name="input_choice" value="2"/>
153 <param name="data" value="feature_table.parquet" ftype="parquet"/>
154 <param name="metadata" value="metadata.csv" ftype="csv"/>
155 <param name="mode" value="batchwise"/>
156 <param name="wavelet_filter" value="d"/>
157 <param name="filter_length" value="2"/>
158 <param name="k" value="20"/>
159 <param name="t" value="0.05"/>
160 <param name="t2" value="0.05"/>
161 <param name="alpha" value="0"/>
162 <output name="normalized_data" file="normalized_data.parquet" compare="sim_size" delta="200"/>
74 </test> 163 </test>
75 <!-- The following test has different results on three platform I've tried --> 164 <!-- The following test has different results on three platform I've tried -->
76 <!-- <test> 165 <!-- <test>
77 <param name="data" value="input_data_nobatch.csv" ftype="csv"/> 166 <param name="data" value="input_data_nobatch.csv" ftype="csv"/>
78 <param name="mode" value="single_batch"/> 167 <param name="mode" value="single_batch"/>