Mercurial > repos > recetox > recetox_aplcms_generate_feature_table
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/recetox_aplcms_generate_feature_table.xml Mon Feb 13 10:26:41 2023 +0000 @@ -0,0 +1,78 @@ +<tool id="recetox_aplcms_generate_feature_table" name="recetox-aplcms - generate feature table" version="@TOOL_VERSION@+galaxy0"> + <description>generate feature table from noise-removed HRMS profile data</description> + <macros> + <import>macros.xml</import> + <import>help.xml</import> + </macros> + <expand macro="creator"/> + <expand macro="requirements"/> + + <command detect_errors="aggressive"><![CDATA[ + Rscript -e 'source("${__tool_directory__}/utils.R")' -e 'source("${run_script}")' + ]]></command> + <configfiles> + <configfile name="run_script"><![CDATA[ + profile <- load_data_from_parquet_file('$profile') + sample_name <- load_sample_name(profile) + + if(is.na(sample_name)) { + message("The file does not contain sample name.") + } + + feature_table <- prof.to.features( + profile = profile, + bandwidth = $bandwidth, + #if $min_bandwidth: + min_bandwidth = $min_bandwidth, + #else: + min_bandwidth = NA, + #end if + #if $max_bandwidth: + max_bandwidth = $max_bandwidth, + #else: + max_bandwidth = NA, + #end if + sd_cut = c($sd_cut_min, $sd_cut_max), + #if $shape.shape_model == "bi-Gaussian": + sigma_ratio_lim = c($shape.sigma_ratio_lim_min, $shape.sigma_ratio_lim_max), + #else: + sigma_ratio_lim = NA, + #end if + shape_model = "$shape.shape_model", + peak_estim_method = "$peak_estim_method", + component_eliminate = $component_eliminate, + moment_power = $moment_power, + BIC_factor = $BIC_factor, + do.plot = FALSE + ) + + feature_table <- save_sample_name(feature_table, sample_name) + save_data_as_parquet_file(feature_table, '$output_file') + ]]></configfile> + </configfiles> + + <inputs> + <param label="Input profile data" name="profile" type="data" format="parquet" + help="Mass spectrometry profile data." /> + <expand macro="bandwidth_params"/> + <expand macro="generate_feature_table_params"/> + </inputs> + + <outputs> + <data label="${tool.name} on ${on_string}" name="output_file" format="parquet" /> + </outputs> + + <tests> + + </tests> + + <help> + <![CDATA[ + @GENERATE_FEATURE_TABLE_HELP@ + + @GENERAL_HELP@ + ]]> + </help> + + <expand macro="citations"/> +</tool>