Re: XCMS - MS1 scans empty
Reply #9 –
I didn't have any readily available Agilent QqQ precursor ion scan data on hand, but could probably generate some next week if required.
Anyway, this is an old jank solution I was using to "convert" MS2 data to look like MS1 data:
## Load mzR library
library(mzR)
## Open the mzML file that you want to convert
dat<-openMSfile('myMSdata.mzML')
## Get spectra data
pks <- spectra(dat)
## Get file header
hdr <- header(dat)
## Remove all scans but ms2 scans
pks<-pks[hdr$msLevel==2]
hdr<-hdr[hdr$msLevel==2,]
## Take a quick look and make sure everything looks ok
head(hdr)
## Provide new scan/acquisition numbers
hdr$seqNum<-hdr$acquisitionNum<-seq(nrow(hdr))
## Clear all precursor charge/Intensity/MZ/ScanNum columns
## Not sure if this is required and how precursor ion scans will differ
hdr$precursorCharge<-hdr$precursorIntensity<-hdr$precursorMZ<-hdr$precursorScanNum<-0
## Overwrite msLevel to 'pretend' to be MS1 data
hdr$msLevel<-1
## Write out the new 'MS1' data
writeMSData(pks,'myAlteredMSdata.mzML',header=hdr)
There are a few fields that still contain MS2 information, so I'm not sure if they will conflict with anything downstream.
So, I'm not sure how well this will work for you. But let everyone know if it's helpful.
Good luck!