| Title: | CentroidR |
|---|---|
| Description: | CentroidR provides the infrastructure to centroid profile spectra. |
| Authors: | Adriano Rutz [aut, cre] (ORCID: <https://orcid.org/0000-0003-0443-9902>), Johannes Rainer [aut] (ORCID: <https://orcid.org/0000-0002-6977-7147>) |
| Maintainer: | Adriano Rutz <[email protected]> |
| License: | AGPL (>= 3) |
| Version: | 0.0.0.9003 |
| Built: | 2026-06-09 11:06:11 UTC |
| Source: | https://github.com/adafede/CentroidR |
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.
centroid_one_file( file, pattern, replacement, min_datapoints_ms1 = 5L, min_datapoints_ms2 = 1L, mz_tol_da_ms1 = 0.0025, mz_tol_da_ms2 = 0.0025, mz_tol_ppm_ms1 = 5, mz_tol_ppm_ms2 = 5, mz_fun_ms1 = base::mean, mz_fun_ms2 = base::mean, int_fun_ms1 = base::max, int_fun_ms2 = base::max, mz_weighted = TRUE, time_domain = TRUE, intensity_exponent = 3 )centroid_one_file( file, pattern, replacement, min_datapoints_ms1 = 5L, min_datapoints_ms2 = 1L, mz_tol_da_ms1 = 0.0025, mz_tol_da_ms2 = 0.0025, mz_tol_ppm_ms1 = 5, mz_tol_ppm_ms2 = 5, mz_fun_ms1 = base::mean, mz_fun_ms2 = base::mean, int_fun_ms1 = base::max, int_fun_ms2 = base::max, mz_weighted = TRUE, time_domain = TRUE, intensity_exponent = 3 )
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 the |
min_datapoints_ms1 |
integer(1). Minimum datapoints to be considered for MS1 data. Default: 5L. |
min_datapoints_ms2 |
integer(1). Minimum datapoints to be considered for MS2 data. Default: 1L. |
mz_tol_da_ms1 |
numeric(1). m/z tolerance in Daltons for MS1 data. Default: 0.0025. |
mz_tol_da_ms2 |
numeric(1). m/z tolerance in Daltons for MS2 data. Default: 0.0025. |
mz_tol_ppm_ms1 |
numeric(1). m/z tolerance in parts per million (ppm) for MS1. Default: 5. |
mz_tol_ppm_ms2 |
numeric(1). m/z tolerance in parts per million (ppm) for MS2. Default: 5. |
mz_fun_ms1 |
function. Function to aggregate m/z values within each peak group (MS1). Ignored if |
mz_fun_ms2 |
function. Function to aggregate m/z values within each peak group (MS2). Ignored if |
int_fun_ms1 |
function. Function to aggregate peak intensities within each peak group (MS1). Default: base::max. |
int_fun_ms2 |
function. Function to aggregate peak intensities within each peak group (MS2). Default: base::max. |
mz_weighted |
logical(1). If |
time_domain |
logical(1). If |
intensity_exponent |
numeric(1). If |
The function processes both MS1 and MS2 data with user-defined smoothing, peak-picking, and noise estimation.
File path modifications are supported via pattern and replacement.
logical(1). Returns TRUE if centroiding was successful, otherwise FALSE.
Johannes Rainer, Adriano Rutz