xia-lab / OptiLCMS

R package for optimized LC-MS spectra processing
Other
21 stars 4 forks source link

How to get aligned feature list from mSet object? #4

Open YasinEl opened 3 years ago

YasinEl commented 3 years ago

Thank you for your package! I was wondering how it is possible to get the aligned peak list from the mSet object?

I realize that it is possible to get the unaligned peak list via:

mSet@peakpicking[["chromPeaks"]]

which is in my understanding equivalent to:

xcms::chromPeaks(XCMSnExp_object)

However, what is the mSet equivalent to:

feature_defs <- xcms::featureDefinitions(XCMSnExp_object)
feature_areas <- xcms::featureValues(XCMSnExp_object, value = "into")

df <- merge(feature_defs, feature_areas, by=0, all=TRUE)
df <- df[,!(names(df) %in% c("peakidx"))]

?

Thank you and best wishes, Yasin