diff aplcms_unsupervised.xml @ 1:52cec2e123fa draft

"planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/aplcms commit 5305d1a60fe5bf5f1abfec332d432b9d362f1f83"
author recetox
date Thu, 24 Sep 2020 00:15:56 +0000
parents bfe186af3dca
children b0ba0287b76f
line wrap: on
line diff
--- a/aplcms_unsupervised.xml	Tue Aug 25 09:08:24 2020 +0000
+++ b/aplcms_unsupervised.xml	Thu Sep 24 00:15:56 2020 +0000
@@ -1,70 +1,65 @@
-<tool id="recetox_aplcms_unsupervised" name="apLCMS - Unsupervised" version="@VERSION@">
-    <macros>
-        <import>aplcms_macros.xml</import>
-    </macros>
-
-    <expand macro="requirements" />
-
-    <command detect_errors="aggressive"><![CDATA[
-        #set file_str = str('", "').join([str($f) for $f in $files])
-
-        Rscript
-            -e 'result <- apLCMS::unsupervised(
-                    files = c("$file_str"),
-                    min_exp = $noise_filtering.min_exp,
-                    min_pres = $noise_filtering.min_pres,
-                    min_run = $noise_filtering.min_run,
-                    mz_tol = $noise_filtering.mz_tol,
-                    baseline_correct = $noise_filtering.baseline_correct,
-                    baseline_correct_noise_percentile = $noise_filtering.baseline_correct_noise_percentile,
-                    intensity_weighted = $noise_filtering.intensity_weighted,
-                    shape_model = "$feature_detection.shape_model",
-                    BIC_factor = $feature_detection.BIC_factor,
-                    peak_estim_method = "$feature_detection.peak_estim_method",
-                    min_bandwidth = $feature_detection.min_bandwidth,
-                    max_bandwidth = $feature_detection.max_bandwidth,
-                    sd_cut = c($feature_detection.sd_cut_min, $feature_detection.sd_cut_max),
-                    sigma_ratio_lim = c($feature_detection.sigma_ratio_lim_min, $feature_detection.sigma_ratio_lim_max),
-                    component_eliminate = $feature_detection.component_eliminate,
-                    moment_power = $feature_detection.moment_power,
-                    align_chr_tol = $peak_alignment.align_chr_tol,
-                    align_mz_tol = $peak_alignment.align_mz_tol,
-                    max_align_mz_diff = $peak_alignment.max_align_mz_diff,
-                    recover_mz_range = $weak_signal_recovery.recover_mz_range,
-                    recover_chr_range = $weak_signal_recovery.recover_chr_range,
-                    use_observed_range = $weak_signal_recovery.use_observed_range,
-                    recover_min_count = $weak_signal_recovery.recover_min_count
-                )'
-            -e 'arrow::write_feather(result\$final_times, "$times")'
-            -e 'arrow::write_feather(result\$final_features, "$features")'
-            -e 'arrow::write_feather(result\$aligned_times, "$aligned_times")'
-            -e 'arrow::write_feather(result\$aligned_features, "$aligned_features")'
-            -e 'arrow::write_feather(result\$corrected_features, "$corrected_features")'
-            -e 'arrow::write_feather(result\$extracted_features, "$extracted_features")'
-    ]]></command>
-
-    <expand macro="inputs">
-        <expand macro="noise_filtering" />
-        <expand macro="feature_detection" />
-        <expand macro="peak_alignment" />
-        <expand macro="weak_signal_recovery" />
-    </expand>
-
-    <outputs>
-        <data name="times" format="time_table.feather" />
-        <data name="features" format="peak_table.feather" />
-        <data name="aligned_times" format="time_table.feather" hidden="true" />
-        <data name="aligned_features" format="peak_table.feather" hidden="true" />
-        <data name="corrected_features" format="peak_table.feather" hidden="true" />
-        <data name="extracted_features" format="peak_table.feather" hidden="true" />
-    </outputs>
-
-    <help>
-        This is the Unsupervised version of apLCMS which is not relying on any existing knowledge about metabolites or
-        any historically detected features. For such functionality please use the Hybrid version of apLCMS.
-
-        @GENERAL_HELP@
-    </help>
-
-    <expand macro="citations" />
-</tool>
\ No newline at end of file
+<tool id="recetox_aplcms_unsupervised" name="apLCMS - Unsupervised" version="@TOOL_VERSION@+galaxy0">
+    <macros>
+        <import>aplcms_macros.xml</import>
+    </macros>
+
+    <expand macro="requirements" />
+
+    <command detect_errors="aggressive"><![CDATA[
+        #set file_str = str('", "').join([str($f) for $f in $files])
+
+        Rscript
+            -e 'x <- apLCMS::unsupervised(
+                    files = c("$file_str"),
+                    min_exp = $noise_filtering.min_exp,
+                    min_pres = $noise_filtering.min_pres,
+                    min_run = $noise_filtering.min_run,
+                    mz_tol = $noise_filtering.mz_tol,
+                    baseline_correct = $noise_filtering.baseline_correct,
+                    baseline_correct_noise_percentile = $noise_filtering.baseline_correct_noise_percentile,
+                    intensity_weighted = $noise_filtering.intensity_weighted,
+                    shape_model = "$feature_detection.shape_model",
+                    BIC_factor = $feature_detection.BIC_factor,
+                    peak_estim_method = "$feature_detection.peak_estim_method",
+                    min_bandwidth = $feature_detection.min_bandwidth,
+                    max_bandwidth = $feature_detection.max_bandwidth,
+                    sd_cut = c($feature_detection.sd_cut_min, $feature_detection.sd_cut_max),
+                    sigma_ratio_lim = c($feature_detection.sigma_ratio_lim_min, $feature_detection.sigma_ratio_lim_max),
+                    component_eliminate = $feature_detection.component_eliminate,
+                    moment_power = $feature_detection.moment_power,
+                    align_chr_tol = $peak_alignment.align_chr_tol,
+                    align_mz_tol = $peak_alignment.align_mz_tol,
+                    max_align_mz_diff = $peak_alignment.max_align_mz_diff,
+                    recover_mz_range = $weak_signal_recovery.recover_mz_range,
+                    recover_chr_range = $weak_signal_recovery.recover_chr_range,
+                    use_observed_range = $weak_signal_recovery.use_observed_range,
+                    recover_min_count = $weak_signal_recovery.recover_min_count
+                )'
+            -e 'rhdf5::h5write(x\$final_peaks, "$peaks", "peaks")'
+            -e 'rhdf5::h5write(x\$aligned_peaks, "$peaks", "aligned_peaks")'
+            -e 'rhdf5::h5write(x\$corrected_features, "$peaks", "corrected_features")'
+            -e 'rhdf5::h5write(x\$extracted_features, "$peaks", "extracted_features")'
+            -e 'rhdf5::h5write(x\$aligned_mz_tolerance, "$peaks", "aligned_mz_tolerance")'
+            -e 'rhdf5::h5write(x\$aligned_rt_tolerance, "$peaks", "aligned_rt_tolerance")'
+    ]]></command>
+
+    <expand macro="inputs">
+        <expand macro="noise_filtering" />
+        <expand macro="feature_detection" />
+        <expand macro="peak_alignment" />
+        <expand macro="weak_signal_recovery" />
+    </expand>
+
+    <outputs>
+        <data name="peaks" format="h5" />
+    </outputs>
+
+    <help>
+        This is the Unsupervised version of apLCMS which is not relying on any existing knowledge about metabolites or
+        any historically detected features. For such functionality please use the Hybrid version of apLCMS.
+
+        @GENERAL_HELP@
+    </help>
+
+    <expand macro="citations" />
+</tool>