Prepare features table

Description

This function prepares LC-MS feature tables by standardizing column names, filtering to top intensity samples per feature, and formatting data for downstream analysis. Supports multiple input formats (MZmine, SLAW, SIRIUS).

Usage

prepare_features_tables(
  features = get_params(step = "prepare_features_tables")\$files\$features\$raw,
  output = get_params(step = "prepare_features_tables")\$files\$features\$prepared,
  candidates = get_params(step = "prepare_features_tables")\$annotations\$canidates\$samples,
  name_adduct = get_params(step = "prepare_features_tables")\$names\$adduct,
  name_features = get_params(step = "prepare_features_tables")\$names\$features,
  name_rt = get_params(step = "prepare_features_tables")\$names\$rt\$features,
  name_mz = get_params(step = "prepare_features_tables")\$names\$precursor
)

Arguments

features Character string path to raw features file
output Character string path where prepared features should be saved
candidates Integer number of top-intensity samples to retain per feature (recommended: ≤5 to reduce data size while keeping representative samples)
name_adduct Character string name of the adduct column in input
name_features Character string name of the feature ID column in input
name_rt Character string name of the retention time column in input
name_mz Character string name of the m/z column in input

Value

Character string path to the prepared feature table

Examples

library("tima")

copy_backbone()
go_to_cache()
get_file(
  url = get_default_paths()$urls$examples$features,
  export = get_params(step = "prepare_features_tables")$files$features$raw
)
prepare_features_tables()
unlink("data", recursive = TRUE)