filter scans by collision energy
Hi xcms fans!
As a long-time xcms user, I've used the software to align and compare both MS1 and MS2 data in a variety of formats. However, recently I just acquired a large amount of data that has interleaved "regular" MS1 scans and "all-ions" MS1 scans. These "all-ions" MS1 scans use the collision cell at various collision energies to fragment all ions that enter them, but no mass selection (e.g. with a quadrupole) is used.
I'd like to perform xcms on the "regular" MS1 scans, i.e. those that have a collision energy of 0, and have xcms ignore the other scans (for now). However since the "all ions" data is not really an MS2 scan I can't use the `mslevel` parameter to `xcmsSet()`. I see that the xcmsRaw() constructor will fill in a `msnCollisionEnergy` parameter. Is this something xcms can filter on during invocation of `xcmsSet()`? If so, how?
I've played around a bit with one file using `xcmsRaw()` and I don't completely understand the behavior.
one_file <- 'mzml_files/s001_m001.mzML'
xraw_msn <- xcmsRaw(one_file, includeMSn = T)
xraw_reg <- xcmsRaw(one_file)
> xraw_reg
An "xcmsRaw" object with 438 mass spectra
Time range: 3-359.3 seconds (0-6 minutes)
Mass range: 69.9971-1499.0236 m/z
Intensity range: 200-7108400
MSn data on 0 mass(es)
with 0 MSn spectra
Profile method: bin
Profile step: 1 m/z (1430 grid points from 70 to 1499 m/z)
Memory usage: 31.1 MB
> xraw_msn
An "xcmsRaw" object with 438 mass spectra
Time range: 3-359.3 seconds (0-6 minutes)
Mass range: 69.9971-1499.0236 m/z
Intensity range: 200-7108400
MSn data on 439 mass(es)
with 439 MSn spectra
Profile method: bin
Profile step: 1 m/z (1430 grid points from 70 to 1499 m/z)
Memory usage: 52.2 MB
print(xraw_msn@msnCollisionEnergy[1:10])
[1] 20 20 20 20 20 20 20 20 20 20
print(xraw_reg@msnCollisionEnergy)
numeric(0)
print(xraw_msn@msnCollisionEnergy[1:10])
[1] 2 2 2 2 2 2 2 2 2 2
print(xraw_reg@msnCollisionEnergy)
numeric(0)
print(xraw_msn@msnCollisionEnergy)
numeric(0)
print(xraw_reg@msnCollisionEnergy)
numeric(0)
print(xraw_msn@msnScanindex[1:10])
print(xraw_msn@scanindex[1:10])
print(xraw_reg@msnScanindex[1:10])
print(xraw_reg@scanindex[1:10])
[1] 0 1679 2838 4726 6588 8444 10293 12153 14017 15817
[1] 0 2912 4721 7469 10169 12866 15576 18299 20934 23643
[1] NA NA NA NA NA NA NA NA NA NA
[1] 0 2912 4721 7469 10169 12866 15576 18299 20934 23643
Is this telling me that by default xcms will ignore the scans with collision energy 20 and treat them as "ms2" scans even though they aren't really? And I can read those scans with `includeMSn = T` when invoking `xcmsSet()` or `xcmsRaw()`? How will these "msn" features be treated after peak finding and alignment across samples?