Mercurial > repos > recetox > recetox_aplcms_compute_clusters
view recetox_aplcms_compute_clusters.xml @ 0:82737757f3d5 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:27:56 +0000 |
parents | |
children | 092bbb03a217 |
line wrap: on
line source
<tool id="recetox_aplcms_compute_clusters" name="recetox-aplcms - compute clusters" version="@TOOL_VERSION@+galaxy0"> <description>compute clusters of mz and rt across samples and assign cluster IDs to individual features</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[ #set filenames = str("', '").join([str($f) for $f in $files]) feature_tables <- load_parquet_collection(c('$filenames')) sample_names <- unlist(lapply(feature_tables, load_sample_name)) validate_sample_names(sample_names) ordering <- order(sample_names) feature_tables <- feature_tables[ordering] sample_names <- sample_names[ordering] #if $tolerances_input_method.input_method == "file" tolerances <- load_data_from_parquet_file('$input_tolerances') #end if clusters <- compute_clusters( feature_tables = feature_tables, #if $tolerances_input_method.input_method == "file" mz_tol_relative = get_mz_tol(tolerances), rt_tol_relative = get_rt_tol(tolerances), #else #if $tolerances_input_method.mz_tol_relative: mz_tol_relative = $tolerances_input_method.mz_tol_relative, #else: mz_tol_relative = NA, #end if #if $tolerances_input_method.rt_tol_relative: rt_tol_relative = $tolerances_input_method.rt_tol_relative, #else: rt_tol_relative = NA, #end if #end if mz_max_diff = 10 * $mz_max_diff, mz_tol_absolute = $mz_tol_absolute, sample_names = sample_names, do.plot = FALSE ) save_parquet_collection(clusters, sample_names, "clustered") save_tolerances(clusters, '$tolerances') ]]></configfile> </configfiles> <inputs> <param name="files" type="data_collection" collection_type="list" format="parquet" label="Input data" help="List of tables containing features." /> <expand macro="compute_clusters_params"/> </inputs> <outputs> <collection name="clustered_feature_tables" type="list" label="${tool.name} feature_tables on ${on_string}"> <discover_datasets pattern="__designation__" directory="clustered" format="parquet" /> </collection> <data name="tolerances" format="parquet" label="${tool.name} on ${on_string} (updated tolerances)" /> </outputs> <tests> </tests> <help> <![CDATA[ @COMPUTE_CLUSTERS_HELP@ @GENERAL_HELP@ @EXAMPLE_OUTPUT@ ]]> </help> <expand macro="citations"/> </tool>