Skip to main content
Topic: How to export Xset object intensity data? (Read 3241 times) previous topic - next topic

How to export Xset object intensity data?

Hi,

I am working on my master thesis on comparing metabolomics MS pipelines, batch effect removal and parameter optimization of the pipeline. And wanted to check that I am doing what I think I am doing.

I wish to convert my xset object into a matrix I(peak groups, sample) where each cell represents the intensity for that peak group in that sample and then I will store the meta-data separately. I have gotten it to work by extracting the xset@peaks, xset@groupidx and xset@groups. Then i fetch the intensities by a for loop:
for each groupidx gidx
    for each peak in peaks(gidx)
        I(gidx, peak.sample) = I(gidx, peak.sample) + peaks.intf

So my questions are:
- is there an easier/more elegant way to do this?(e.g. some internal function/property in Xcms I missed?)
- is the intensities fetched by fillPeaks() included in peaks & groupidx or will my algorithm miss this data?
- is intf the "standard" measure of intensity of a peak or is one of the other(maxf or even maxo, into) more commonly used?

(Sidenote: I searched for some benchmark datasets to include in my analysis (I have access to an inhouse dataset, but ideally using an established benchmark is better). I found the 'centWave' dataset and the 'IPO-package' datasets, is there any other?)

Re: How to export Xset object intensity data?

Reply #1
Are you looking for the peakTable function or am I misunderstanding what you are trying to do?
If you use CAMERA the equivalent function is getPeaklist.

fillpeaks peaks are in @peaks yes.

I would think into is the most common.

I don't think there is a real benchmark available anywhere. Difficult to establish a ground truth. It is always a compromise.
Blog: stanstrup.github.io

Re: How to export Xset object intensity data?

Reply #2
Thanks for the quick reply.

Ah thanks for peakTable, it was almost exactly what I was looking for (ideally I just want the last columns of information, but I can just extract that).

Hmm ok, what is the difference between "into" and "intf" and why choose "into"? I thought "into" was raw data and "intf" was processed data. Isn't there higher technical variation and noise in the raw signal?

 

Re: How to export Xset object intensity data?

Reply #3
I have not been aware of intf since I am normally using centwave that doesn't have this concept. I am using into because when I compared to intb the CAMERA grouping was better with into suggesting that was a more stable measure.

As for intf vs into I cannot answer but I guess it depends how good the fitted model is.
Blog: stanstrup.github.io