Skip to main content

Topics

This section allows you to view all Topics made by this member. Note that you can only see Topics made in areas you currently have access to.

Topics - cpudney

1
CAMERA / Possible bug when groupCorr called with xraw argument
G'day,

When calling groupCorr with the xraw argument set I see the following error message:

Code: [Select]
> 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

Looking at the source code in fct_groupCorr.R it appears the xa has not been assigned a value.

Code: [Select]
  # 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)

Is this a bug?

Regards,
Chris.
2
XCMS / Should findmzROI be sensitive to m/z values?
G'day,

We've been using findPeaks.centWave to process individual chromatograms, see this thread.  We use this script:

Code: [Select]
require(xcms)
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)
When processing a single chromatogram, all points are given the same m/z value, in the example above it's 130.61.

However, I noticed that if you change this value you get different results.  This seems to arise from the ROI detection step, which can produce different numbers of ROI depending on the m/z value of the chromatogram.  For example, for the attached data and m/z of 136.01 it finds 12 ROIs.  If the m/z is changed to 13.061 then it finds 23 ROIs.

I don't understand why this should be; if all the m/z values of a chromatogram are identical then they should form the same set of ROIs regardless of the m/z value.

I've looked at the source code for findmzROI and I can't see any problem (but haven't the capacity to debug it).

Is the behaviour I'm observing correct?

Thanks,
Chris.

[attachment deleted by admin]
3
XCMS / How to run findPeaks.centWave on an individual chromatogram
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:

Code: [Select]
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.
4
XCMS / Can/should we use findPeaks.centWave with profile/continuous
G'day,

We are interested in using findPeaks.centWave with profile/continuous data but note that it expects centroided data.

Is this a strict requirement?  Are there parameter settings that would make it possible to use centWave with profile data?

We're keen to preserve mass accuracy.

Thanks,
Chris.