diff waveica.xml @ 0:328710890963 draft

"planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/waveica commit 98e541a75678eee749261630610b946c258fd5f3"
author recetox
date Wed, 23 Mar 2022 11:35:30 +0000
parents
children b77023c41c76
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/waveica.xml	Wed Mar 23 11:35:30 2022 +0000
@@ -0,0 +1,105 @@
+<tool id="waveica" name="WaveICA" version="@TOOL_VERSION@+galaxy1" python_template_version="3.5">
+    <description>removal of batch effects for untargeted metabolomics data</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="creator"/>
+
+    <requirements>
+        <requirement type="package" version="@TOOL_VERSION@">r-recetox-waveica</requirement>
+    </requirements>
+    <command detect_errors="aggressive"><![CDATA[
+        Rscript
+            -e 'source("${__tool_directory__}/waveica_wrapper.R")'
+
+            #if $batch_correction.mode == "batchwise":
+            -e 'normalized_data <- waveica(
+                data = "$data",
+                wavelet_filter = "$wf.wavelet_filter",
+                wavelet_length = "$wf.wavelet_length",
+                k = $k,
+                t = $batch_correction.t,
+                t2 = $batch_correction.t2,
+                alpha = $alpha,
+                exclude_blanks = $exclude_blanks
+            )'
+            #else if $batch_correction.mode == "single_batch":
+            -e 'normalized_data <- waveica_singlebatch(
+                data = "$data",
+                wavelet_filter = "$wf.wavelet_filter",
+                wavelet_length = "$wf.wavelet_length",
+                k = $k,
+                alpha = $alpha,
+                cutoff = $batch_correction.cutoff,
+                exclude_blanks = $exclude_blanks
+            )'
+            #end if
+
+            -e 'store_data(normalized_data,"$normalized_data")'
+    ]]></command>
+
+    <inputs>
+        <expand macro="general_parameters"/>
+        <expand macro="wf"/>
+        <conditional name="batch_correction">
+            <param name="mode" type="select" label="Batch correction mode" help="'multiple batches' takes into account
+            inter- and intrabatch intensity drift; 'single batch' relies only on the injection order of the samples and
+            requires no batch information [2]">
+                <option value="batchwise" selected="true">Multiple batches</option>
+                <option value="single_batch">Single batch (or no batch information)</option>
+            </param>
+            <when value="batchwise">
+                <expand macro="batchwise_parameters"/>
+            </when>
+            <when value="single_batch">
+                <expand macro="singlebatch_parameters"/>
+            </when>
+        </conditional>
+        <expand macro="exclude_blanks"/>
+    </inputs>
+
+    <expand macro="outputs"/>
+
+    <tests>
+        <test>
+            <param name="data" value="input_data.csv" ftype="csv"/>
+            <param name="mode" value="batchwise"/>
+            <param name="wavelet_filter" value="d"/>
+            <param name="filter_length" value="2"/>
+            <param name="k" value="20"/>
+            <param name="t" value="0.05"/>
+            <param name="t2" value="0.05"/>
+            <param name="alpha" value="0"/>
+            <output name="normalized_data" file="normalized_data.tsv"/>
+        </test>
+        <!-- The following test has different results on three platform I've tried -->
+        <!-- <test>
+            <param name="data" value="input_data_nobatch.csv" ftype="csv"/>
+            <param name="mode" value="single_batch"/>
+            <param name="wavelet_filter" value="d"/>
+            <param name="filter_length" value="2"/>
+            <param name="k" value="20"/>
+            <param name="alpha" value="0"/>
+            <param name="cutoff" value="0"/>
+            <output name="normalized_data" file="normalized_data_nobatch.tsv"/>
+        </test> -->
+        <test expect_failure="true">
+            <param name="data" value="na_data.csv" ftype="csv"/>
+        </test>
+        <test expect_failure="true">
+            <param name="data" value="incomplete_metadata_data.csv" ftype="csv"/>
+        </test>
+    </tests>
+
+    <help>
+        <![CDATA[
+        @HELP@
+        ]]>
+    </help>
+
+    <citations>
+        <citation type="doi">10.1016/j.aca.2019.02.010</citation>
+        <citation type="doi">10.1007/s11306-021-01839-7</citation>
+    </citations>
+
+</tool>