Estimate Precursor Purity for Mass Spectra
Spectra_get_purity.RdEstimates the purity of the precursor ion for MS/MS spectra. For MS2 spectra, calculates the proportion of precursor intensity within the isolation window that belongs to the targeted precursor m/z. For MS1 spectra, estimates purity using an associated MS1 scan.
Arguments
- sp
A
Spectraobject for which to estimate purity.- msLevel
Integer. MS level to process.
1for MS1 spectra (requiressp.ms1),2for MS2 spectra. Default is2.- sp.ms1
Optional. A
Spectraobject containing MS1 spectra used for purity calculation whenmsLevel = 1. IfNULL, MS1 spectra are imported from the raw data files.