Useful Functions for Harmonized W4M Tool Development
Check Errors
check_one_character
check_one_complex
check_one_integer
check_one_logical
check_one_numeric
check_param_type_n_length - to check parameters
check_parameter_length - validate parameter's length
check_parameter_type - validate parameter's type
collapse_lines - to paste strings with collapse = "\n"
collapse - to paste strings with collapse = ""
Convert Parameters
Convert data frame to numeric.
Test type of a data frame.
Data frame loading from a file.
Filtering tools for Galaxy scripting
Filtering a data set following the 3-tables format
get_base_dir - to get... the base directory
Instantiate a Logger
get_r_env - provides env vars begining with R_*
Import two W4M tables
Import the three W4M tables
in_galaxy_env - check if the script has been run by galaxy
Checking intensities of a data set following the W4M 3-tables format
Intensity checking tools for Galaxy scripting
Table match check functions
match3
Merging a dataMatrix with a metadata file
Mini tools for Galaxy scripting
optparse_character - define a command parameter as string
optparse_flag - define a command parameter as a trigger
optparse_integer - define a command parameter as an integer
optparse_list - define a command parameter as a list of objects
optparse_numeric - define a command parameter as an numeric
optparse_parameters - parse easily the command line parameters
Parse Command arguments
printf - to format a string and print it
printfp - to paste, format and print a string
printp - to format a string and print it
Reproduce ID
run_galaxy_function - automate running functions in galaxy
run_galaxy_processing - automate running code in galaxy
show_galaxy_footer - shows the footer for glaxy tools
show_galaxy_header - shows the header for glaxy tools
show_sys - prints env variables related to R
Shy Lib
source_local - source file, from absolute or relative path
Stock ID
stopaste - to paste string to a message and stop
stopaste0 - to paste string to a message and stop
stopf - to stop and format message
unmangle_galaxy_param - revert effects of galaxy manglings.
unmangle_galaxy_string - revert effects of galaxy mangling
Log info/warning/error/debug/verbose messages
W4MLogger_.message__
Adds a file where logs are duplicated
W4MLogger_finalize
W4MLogger$set_debug
W4MLogger$set_error
W4MLogger$set_info
Defines in which file logs are duplicated
W4MLogger$set_verbose
W4MLogger$set_warning
The W4MLogger Class
Provides a set of utility function to prevent the spread of utility scripts in W4M (Workflow4Metabolomics) tools, and centralize them in a single package. To note, some are meant to be replaced by the use of dedicated packages in the future, like the parse_args() function: it is here only to prepare the ground for more global changes in W4M scripts and tools. This package is used by part of the W4M Galaxy modules, some of them being available on the community-maintained GitHub repository for Metabolomics' Galaxy tools <https://github.com/workflow4metabolomics/tools-metabolomics>. See Delporte et al (2025) <doi:10.1002/cpz1.70095> for more details.