9.8 Background removal in MS/MS data
Even if data-dependent acquisition (DDA) is used to acquire MS/MS data, there may still be a substantial number of background peaks present in the MS/MS spectra. The filtering section introduced several filters to remove these.
Another approach to remove background is to identify frequently occurring background peaks, which typically are a sign of contamination in the analytical system, and subsequently remove these. The getBGMSMSPeaks() function inspects all MS/MS data in a set of blank analyses and identifies frequently occurring peaks.
# get background MS/MS peaks from blank analyses
bgPeaks <- getBGMSMSPeaks(anaInfo, replicates = "solvent-pos")#> Averaging the spectra for each of the 3 analyses
#> Using 'mzr' backend for reading MS data.
#> ================================================================================
#> Averaging analyses averaged spectra... Done!
#> mz intensity abundance_rel_ana abundance_abs_ana abundance_rel_spec abundance_abs_spec
#> <num> <num> <num> <num> <num> <num>
#> 1: 98.97532 6325.059 1 3 0.4669805 233.3333
#> 2: 100.11211 4400.579 1 3 0.2261462 113.0000
#> 3: 101.01768 3430.920 1 3 0.2321316 116.0000
#> 4: 102.99709 3728.637 1 3 0.3108626 155.3333
#> 5: 107.08547 4883.053 1 3 0.5610356 280.3333
#> ---
#> 19: 139.07513 4069.568 1 3 0.5043540 252.0000
#> 20: 145.00769 14196.250 1 3 0.2955198 147.6667
#> 21: 163.01816 14682.364 1 3 0.2988518 149.3333
#> 22: 169.08578 4610.031 1 3 0.2307982 115.3333
#> 23: 181.02875 3742.822 1 3 0.2401476 120.0000
The replicates function argument tells which analyses are used for blank subtraction, in the above example all the analyses with the replicate set to “solvent-pos” are used. It is also possible to specify multiple replicate names. Typically, you will choose sample analyses here that did not undergo any sample preparation, such as pure solvent blanks.
The filter() function is then used to remove these peaks in the peak list data.
The removeMZs filter removes all the MS/MS peaks from the mz column. You can also specify a vector with m/z values to remove, for instance, if you identified background peaks by other means than the getBGMSMSPeaks() function.
For more details, see the reference manual (?getBGMSMSPeaks).