Open jorainer opened 2 years ago
The resulting Spectra
could then eventually be filtered restricting to peaks of interest (based on their expected m/z) using the Spectra::filterMzValues
function.
That looks very cool, @jorainer ! :+1: I'll give it a try and let you know if I need anything else
The
featureSpectra
allows to extract MS1 spectra for each features from anXCMSnExp
. To extract the MS1 spectra closest to the apex position of the chromatographic peaks associated with the features:This will return a
Spectra
object with all MS1 spectra for all chromatographic peaks for all features inxdata
. Themethod = "closest_rt"
defines that, for each chromatographic peak, the MS1 spectrum closest to the apex position is selected. The feature and peak IDs are available withms1$peak_id
andms1$feature_id
. Alternatively, withreturn.type = "List"
aList
ofSpectra
objects is returned - oneSpectra
for each feature. Also, it would be possible to extract MS1 for specific features only by providing their IDs with thefeatures
parameter.Let me know if you would need some alternative/different way to extract data @RogerGinBer