Combine multiple scans into a consensus spectrum

aggregate_scans(
  group_scans,
  MS2tol,
  n_top_spectra_summed = 3L,
  quality_weights = c(purity = 2, quality = 1)
)

Arguments

group_scans

a tibble which minimally contains precursorMz, precursorPurity, quality (derived from the parent peak), and data.

MS2tol

a list of MS2 tol parameters produced with build_clamr_config

n_top_spectra_summed

integer counts of maximum number of spectra to aggregate

quality_weights

length 2 named vector with names "purity" and "quality" indicating the relative amount to weight by precursor purity (i.e., the amount of isolated signal matching the precursorMz) versus peak quality (i.e., good peak shapes).