Mercurial > repos > recetox > recetox_aplcms_generate_feature_table
comparison recetox_aplcms_generate_feature_table.xml @ 0:2810c956ec39 draft
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/recetox_aplcms commit 506df2aef355b3791567283e1a175914f06b405a
author | recetox |
---|---|
date | Mon, 13 Feb 2023 10:26:41 +0000 |
parents | |
children | e8962c8340f4 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:2810c956ec39 |
---|---|
1 <tool id="recetox_aplcms_generate_feature_table" name="recetox-aplcms - generate feature table" version="@TOOL_VERSION@+galaxy0"> | |
2 <description>generate feature table from noise-removed HRMS profile data</description> | |
3 <macros> | |
4 <import>macros.xml</import> | |
5 <import>help.xml</import> | |
6 </macros> | |
7 <expand macro="creator"/> | |
8 <expand macro="requirements"/> | |
9 | |
10 <command detect_errors="aggressive"><![CDATA[ | |
11 Rscript -e 'source("${__tool_directory__}/utils.R")' -e 'source("${run_script}")' | |
12 ]]></command> | |
13 <configfiles> | |
14 <configfile name="run_script"><![CDATA[ | |
15 profile <- load_data_from_parquet_file('$profile') | |
16 sample_name <- load_sample_name(profile) | |
17 | |
18 if(is.na(sample_name)) { | |
19 message("The file does not contain sample name.") | |
20 } | |
21 | |
22 feature_table <- prof.to.features( | |
23 profile = profile, | |
24 bandwidth = $bandwidth, | |
25 #if $min_bandwidth: | |
26 min_bandwidth = $min_bandwidth, | |
27 #else: | |
28 min_bandwidth = NA, | |
29 #end if | |
30 #if $max_bandwidth: | |
31 max_bandwidth = $max_bandwidth, | |
32 #else: | |
33 max_bandwidth = NA, | |
34 #end if | |
35 sd_cut = c($sd_cut_min, $sd_cut_max), | |
36 #if $shape.shape_model == "bi-Gaussian": | |
37 sigma_ratio_lim = c($shape.sigma_ratio_lim_min, $shape.sigma_ratio_lim_max), | |
38 #else: | |
39 sigma_ratio_lim = NA, | |
40 #end if | |
41 shape_model = "$shape.shape_model", | |
42 peak_estim_method = "$peak_estim_method", | |
43 component_eliminate = $component_eliminate, | |
44 moment_power = $moment_power, | |
45 BIC_factor = $BIC_factor, | |
46 do.plot = FALSE | |
47 ) | |
48 | |
49 feature_table <- save_sample_name(feature_table, sample_name) | |
50 save_data_as_parquet_file(feature_table, '$output_file') | |
51 ]]></configfile> | |
52 </configfiles> | |
53 | |
54 <inputs> | |
55 <param label="Input profile data" name="profile" type="data" format="parquet" | |
56 help="Mass spectrometry profile data." /> | |
57 <expand macro="bandwidth_params"/> | |
58 <expand macro="generate_feature_table_params"/> | |
59 </inputs> | |
60 | |
61 <outputs> | |
62 <data label="${tool.name} on ${on_string}" name="output_file" format="parquet" /> | |
63 </outputs> | |
64 | |
65 <tests> | |
66 | |
67 </tests> | |
68 | |
69 <help> | |
70 <![CDATA[ | |
71 @GENERATE_FEATURE_TABLE_HELP@ | |
72 | |
73 @GENERAL_HELP@ | |
74 ]]> | |
75 </help> | |
76 | |
77 <expand macro="citations"/> | |
78 </tool> |