1
CAMERA / Re: Possible bug when groupCorr called with xraw argument
Quote
It's now available at http://bioconductor.org/packages/2.10/b ... AMERA.html
Regards,
Chris.
This section allows you to view all Show Posts made by this member. Note that you can only see Show Posts made in areas you currently have access to.
It's now available at http://bioconductor.org/packages/2.10/b ... AMERA.html
I fixed it in 1.11.10, which should be available on the BioConductor server tomorrow.
- write a modified version of centWave that skips ROI detection and get rid of the main loop (that loops through ROIs)
> groupCorr(object=yanGI, calcIso=TRUE, xraw=xcmsRaw(file))
Start grouping after correlation.
Error in peaks(xa@xcmsSet) :
error in evaluating the argument 'object' in selecting a method for function 'peaks': Error: object 'xa' not found
# Check LC information and calcCorr was selected
if(calcCiS && object@xcmsSet@peaks[1,"rt"] != -1){
if(!is.null(xraw)) {
#Use provided xcmsRaw
maxscans <- length(xraw@scantime)
scantimes<-list();
scantimes[[1]] <- xraw@scantime
pdata <- peaks(xa@xcmsSet)
EIC <- CAMERA:::getEICs(xraw,pdata,maxscans)
However I don't understand why you want to run the ROI detection again if you have an ROI or extracted ion chromatogram already.
Why not just skip it and run the chromatographic peak detection directly on that.
require(xcms)When processing a single chromatogram, all points are given the same m/z value, in the example above it's 130.61.
xdata <- read.csv(file="chrom.csv", header=TRUE, sep=",")
rtSec <- xdata$RT
numPoints <- length(xdata$I)
xraw <- new("xcmsRaw")
xraw@tic <- xdata$I
xraw@scantime <- rtSec
xraw@scanindex <- 1:numPoints
xraw@env$mz <- rep(130.61, numPoints)
xraw@env$intensity <- xdata$I
xpeaks <- findPeaks.centWave(xraw, peakwidth=c(10,200), ppm=0, mzdiff=0, snthresh=0, integrate=1, prefilter=c(0,0), verbose=TRUE)
plot(xdata$RT, xdata$I, type='l')
for (i in 1:nrow(xpeaks)) {
lines(xdata[findInterval(xpeaks[i,'rtmin'],rtSec):findInterval(xpeaks[i,'rtmax'],rtSec), c('RT','I')], col=rainbow(16)[i], type='h')
}
prmatrix(xpeaks)
peaks <- findPeaks.centWave(raw, peakwidth=c(10,100), ppm=0, mzdiff=0)
build an xcmsRaw object using the data from your "chromatograms". But then you do need m/z values
bypass the ROI detection. Generate "featlist" (list of ROI's) using your chromatograms and feed that into centWave.
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))