Mercurial > repos > recetox > recetox_aplcms_generate_feature_table
view recetox_aplcms_generate_feature_table.xml @ 3:477b5144a422 draft
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/recetox_aplcms commit 505c3374a3e1e9aa450fcb752f2b8f87558fedbb
author | recetox |
---|---|
date | Thu, 25 May 2023 09:14:23 +0000 |
parents | e8962c8340f4 |
children | 702a849c1e0e |
line wrap: on
line source
<tool id="recetox_aplcms_generate_feature_table" name="recetox-aplcms - generate feature table" version="@TOOL_VERSION@+galaxy1"> <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 #if $advanced.sd_cut.sd_cut_bounds == "FALSE": sd_cut = c($advanced.sd_cut.sd_cut_min, $advanced.sd_cut.sd_cut_max), #else sd_cut = c(0, Inf), #end if sigma_ratio_lim = determine_sigma_ratios($advanced.shape_model.sigma_ratio_lim_min, $advanced.shape_model.sigma_ratio_lim_max), shape_model = "bi-Gaussian", peak_estim_method = "$advanced.peak_estim.peak_estim_method", component_eliminate = $advanced.component_eliminate, #if $advanced.peak_estim.peak_estim_method == "moment": moment_power = $advanced.peak_estim.moment_power, #else moment_power = 1, #end if 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="${($profile.element_identifier).rsplit('.',1)[0]}.parquet" name="output_file" format="parquet" /> </outputs> <tests> </tests> <help> <![CDATA[ @GENERATE_FEATURE_TABLE_HELP@ @GENERAL_HELP@ ]]> </help> <expand macro="citations"/> </tool>