An object of class "MS2spectrum"
id:
annotation:
precursor: 98.51205
retention time: 30.17588
polarity: negative
MS2 spectrum with 28 fragment peaks
neutral loss pattern with 0 neutral losses
So, first issue is that it reads the positive file as negative (but correctly detects negative files as negative)
colnames<-(*tmp*, value = c("mz", "rt", "med.mz", "med.rt"))
Note: This second function works fine with some mzml files and their peak lists and doesn't work with others. I made sure to see if there is any difference in the input data I give to the second function, but both that work and that do not work have same data class.
Can you guide me why I encounter this error and is there a solution?
Hello,
I am using CluMSID for its basic two functions:
extractMS2spectra
ms2list <- extractMS2spectra(posModeFile.mzML) ms2list[[1]]
An object of class "MS2spectrum" id:
annotation:
precursor: 98.51205 retention time: 30.17588 polarity: negative MS2 spectrum with 28 fragment peaks neutral loss pattern with 0 neutral losses
So, first issue is that it reads the positive file as negative (but correctly detects negative files as negative)
Then I use a peak table that looks like this:
ID | mzmed | rtmed chr | dbl | dbl
M_1 | 98.51205 | 31.8 M_2 | 115.96410 | 32.4 M_3 | 97.93247 | 33.0 . . .
and use the second function which is: mergeMS2spectra
featlist2 <- mergeMS2spectra(ms2list, peaktable = inclusion_list, exclude_unmatched = TRUE)
This is the error message:
Error in names(x) <- value: Attribute 'names' [4] must have the same length as the vector [0]. Traceback:
colnames<-
(*tmp*
, value = c("mz", "rt", "med.mz", "med.rt"))Note: This second function works fine with some mzml files and their peak lists and doesn't work with others. I made sure to see if there is any difference in the input data I give to the second function, but both that work and that do not work have same data class.
Can you guide me why I encounter this error and is there a solution?
Kind Regards, Mahnoor