Skip to main content
Topic: How to integrate the reporttab(xcms) and getPeaklist(CAMERA) (Read 5772 times) previous topic - next topic

How to integrate the reporttab(xcms) and getPeaklist(CAMERA)

Hello, I find the the serial number of reporttab(xcms) is difference
from that of getPeaklist(CAMERA). Is there code to integrate? the code "cbind" could not solve this problem.
    Thank you very much!
 
scincerely yours,
HEMI

Re: How to integrate the reporttab(xcms) and getPeaklist(CAM

Reply #1
Hi Hemi,

I assume with reporttab you mean the outcome of diffreport(xcms) function?

For combining both results, it's very important that the diffreport result is not sorted after p-value.
Because then both tables have the same order and can be easily combined.
I show you an easy adoptable example with the faaKO data set.

Code: [Select]
library(faahKO)
library(CAMERA)

xs.grp  <- group(faahko)
xs.fp  <- fillPeaks(xs.grp)
#do not sort after pval
reporttab <- diffreport(xs.fp, sortpval=FALSE)

xsa        <- xsAnnotate(xs.fp)
xsa.grp  <- groupFWHM(xsa)
peaklist  <- getPeaklist(xsa.grp)

#combine
reporttab.combine <- cbind(reporttab, peaktable[, c("isotopes", "adduct", "pcgroup")])

Carsten