library("tima")
# Setup complete workflow parameters
copy_backbone()
change_params_small(
fil_pat = "gentiana_experiment",
fil_fea_raw = "data/raw/features.csv",
fil_met_raw = "data/raw/metadata.tsv",
fil_sir_raw = "data/raw/sirius_output.zip",
fil_spe_raw = "data/raw/spectra.mgf",
ms_pol = "pos",
org_tax = "Gentiana lutea",
hig_con = TRUE,
summarize = FALSE
)Change Parameters (Convenience Function)
Description
Updates TIMA workflow parameters for quick setup with a simplified interface. This function modifies the prepare_params YAML configuration file by copying provided input files to the appropriate directories and updating parameter values. Implements SOLID principles with clear separation of concerns.
Usage
change_params_small(
fil_pat = NULL,
fil_fea_raw = NULL,
fil_met_raw = NULL,
fil_sir_raw = NULL,
fil_spe_raw = NULL,
ms_pol = NULL,
org_tax = NULL,
hig_con = NULL,
summarize = NULL,
cache_dir = NULL
)
Arguments
fil_pat
|
Character. Job identifier/pattern for output files (optional) |
fil_fea_raw
|
Character. Path to features file (e.g., from MZmine/SIRIUS) |
fil_met_raw
|
Character. Path to metadata file (optional if single taxon) |
fil_sir_raw
|
Character. Path to SIRIUS annotations directory/zip |
fil_spe_raw
|
Character. Path to spectra file (MGF format with MS1/MS2) |
ms_pol
|
Character. MS polarity: "pos" or "neg" |
org_tax
|
Character. Scientific name for single-taxon experiments |
hig_con
|
Logical. Filter for high confidence candidates only |
summarize
|
Logical. Summarize all candidates per feature to single row |
cache_dir
|
Character. Cache directory path (for testing; uses go_to_cache() if NULL) |
Details
This function:
-
Validates all input files exist before copying
-
Copies files to standardized cache locations
-
Updates the prepare_params YAML configuration
-
Handles NA values properly for YAML null representation
Value
Invisible NULL. Modifies prepare_params YAML as side effect.