Centroid an mzML file with configurable parameters
Source:R/centroid_one_file.R
centroid_one_file.Rd
This function processes an mzML file to apply centroiding with detailed controls for peak picking, smoothing, and noise estimation. It allows fine-tuning of MS1 and MS2 peak detection, optimizing spectral data analysis for various experimental needs.
Arguments
- file
character(1)
Path to the input mzML file. Must be a valid, accessible mzML format file.- pattern
character(1)
Regular expression pattern to match in the input file path, used for modifying the output file path.- replacement
character(1)
Replacement string for altering the output file path based on thepattern
.- min_datapoints_ms1
integer(1)
(default:2L
) Minimum datapoints to be considered for MS1 data.- min_datapoints_ms2
integer(1)
(default:1L
) Minimum datapoints to be considered for MS2 data.- mz_tol_da_ms1
numeric(1)
(default:0.002
) m/z tolerance in Daltons for MS1 data.- mz_tol_da_ms2
numeric(1)
(default:0.005
) m/z tolerance in Daltons for MS2 data.- mz_tol_ppm_ms1
numeric(1)
(default:5
) m/z tolerance in parts per million (ppm) for MS1.- mz_tol_ppm_ms2
numeric(1)
(default:10
) m/z tolerance in parts per million (ppm) for MS2.- mz_fun
function
(default:base::mean
) Function to aggregate m/z values within each peak group. Ignored ifmz_weighted = TRUE
.- int_fun
function
(default:base::sum
) Function to aggregate peak intensities within each peak group.- mz_weighted
logical(1)
(default:TRUE
) IfTRUE
, uses intensity-weighted mean for m/z value aggregation.