Open NorStorz opened 3 months ago
Hm, strange error. Can you please run table(msLevel(mse))
- I would assume you have MS1 and MS2 spectra in your data set?
If we call rtime
on the full object (MsExperiment
/XcmsExperiment
) and as(..., "list")
only on the data set filtered for one MS level than we have indeed a bug... PR with a fix would be highly welcome :)
Also, have you tried to run plot
without type = "XIC"
? I think, for MsExperiment
the plot
is always the type XIC.
Hi,
Yes i have MS1 and MS2 spectra in my data set. table(msLevel(spectra(mse)))
returns:
1 2
1260153 579438
And plot(mse)
also leads to the error.
And it seems to be a problem for all LC-MS/MS data. I tried some data from the msdata
package, which also caused the error:
library("msdata")
FilePaths <- msdata::proteomics(full.names=TRUE)
mse_test <- readMsExperiment(FilePaths[4])
plot(mse_test)
I will look into this and create a PR.
Great! Thanks @NorStorz - let me know if you need some help or if something is unclear.
Hi, i run into the following error when i try to call
plot(mse, type = "XIC")
on timfTOF data with MsBackendTimsTof:Error in rep(rtime(z), lns) : invalid 'times' argument
This example should be reproducible:
From the traceback i could find out that the error occurs inside the function
.xmse_plot_xic
I tested it with the following code:The problem seems to be that
rtime(z)
and 'lns' differ in length. This is probably caused by the MS1 filtering of the Spectra:This is my session info: