Skip to main content

Show Posts

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.

Messages - cpudney

3
XCMS / Re: Should findmzROI be sensitive to m/z values?
G'day,

Quote from: "Ralf"
- write a modified version of centWave that skips ROI detection and get rid of the main loop (that loops through ROIs)

If I were to supply a patch that allowed centWave to be called with an optional featlist parameter could it be incorporated into the xcms package?

Thanks,
Chris.
4
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.
5
XCMS / Re: Should findmzROI be sensitive to m/z values?
G'day,

Quote
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.

That would be ideal but I gathered from a different thread that sort of usage "is not supported by the current centWave implementation".

Is that still the case?  If not, how can I skip the ROI detection and go straight to peak detection?

We want our software to use the "official" XCMS R package, rather than hacking our own version that allows us to pass a "featlist" to findPeaks.centWave.

Thanks,
Chris.
6
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]
8
XCMS / Re: How to run findPeaks.centWave on an individual chromatog
G'day,

Thanks for your response Ralf.

Quote
build an xcmsRaw object using the data from your "chromatograms". But then you do need m/z values

Is that why the approach I used above failed - because I fudged the m/z values (all set to 136.061)?

Quote
bypass the ROI detection. Generate "featlist" (list of ROI's) using your chromatograms and feed that into centWave.

Could you provide an example of this please - I read the documentation and searched the forum but couldn't find information about passing a "featlist" to findPeaks.centWave.

Thanks,
Chris.
10
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.
11
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.