Mercurial > repos > recetox > recetox_aplcms_generate_feature_table
view recetox_aplcms_generate_feature_table.xml @ 1:e8962c8340f4 draft
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/recetox_aplcms commit 4254c6f6f05915ceab5af5d7040ac2c44a8364b4
author | recetox |
---|---|
date | Mon, 03 Apr 2023 14:57:14 +0000 (2023-04-03) |
parents | 2810c956ec39 |
children | 477b5144a422 |
line wrap: on
line source
<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 #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="${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>