G'day,
I was experimenting earlier today with using findPeaks.centWave on a single chromatogram.
The chromatogram was stored in a CSV file (RT, I) and I passed it to findPeaks.centWave thus:
require(xcms)
data <- read.csv(file="chrom.csv", header=TRUE, sep=",")
numPoints <- length(data$I)
raw <- new("xcmsRaw")
raw@tic <- data$I
raw@scantime <- data$RT
raw@scanindex <- 1:numPoints
raw@env$mz <- rep(136.061, numPoints)
raw@env$intensity <- data$I
peaks <- findPeaks.centWave(raw, peakwidth=c(0,100))
Actually, it must have been something like the above because it worked - it detected a peak in precisely the right spot - but now that I try the above again it fails to find a single ROI and so bails out.
Is the above (or something similar) the correct approach for passing a single chromatogram to findPeaks.centWave?
I've attached chrom.csv.
Thanks,
Chris.