Hi,
it is possible to create an xcmsSet from a peak list,
as shown by the following minimalistic example.
But this will not allow to use Obiwarp, since Obiwarp
goes back to the raw data files, which in turn would have
to be netCDF, mzML etc.
library(xcms)
intensity <- matrix(1:32, ncol=4)
mz <- rep(1:8, ncol(intensity))
rt <- rep(8:1, ncol(intensity))
xs <- new("xcmsSet")
peaks(xs) <- cbind(mz=mz, mzmin=mz, mzmax=mz,
rt=mz, rtmin=mz, rtmax=mz,
into=as.vector(intensity), intf=as.vector(intensity),
maxo=as.vector(intensity), maxf=as.vector(intensity),
sample=rep(seq(1,ncol(intensity)), each=nrow(intensity))
)
sampnames(xs) <- 1:4
xsg <- group(xs)
xsg
If you need Obiwarp, you will need to write a new constructor
for the xcmsSource class that reads a peaklist into an xcmsRaw,
see also this thread: viewtopic.php?f=8&t=310 (http://www.metabolomics-forum.com/viewtopic.php?f=8&t=310)
and the code in https://github.com/sneumann/xcms/blob/m ... msSource.R (https://github.com/sneumann/xcms/blob/master/R/xcmsSource.R)
and the use in https://github.com/sneumann/xcms/blob/m ... /xcmsRaw.R (https://github.com/sneumann/xcms/blob/master/R/xcmsRaw.R)
Yours,
Steffen