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 - CoreyG

1
XCMS / Implementing custom retention time alignment algorithms
Hi Everyone,

We've been working on some retention time alignment algorithms, recently. The major driver for this, is that we have noticed that compounds from different classes can exhibit unique retention time drift behavior. So even though they initially elute at very close retention times, one class of compounds will begin to elute later in the chromatogram while the other class elutes earlier.

The issue we are facing, is how can we best apply these adjusted retention times to an XCMSnExp objects and still maintain all the capabilities of XCMS?

Currently, we can force the adjusted retention times into an XCMSnExp object by manually calling adjustedRtime. I know this isn't recommended practice, but is there an alternative? We don't want to use applyAdjustedRtime as we want to go back and integrate missed peaks.

For the most part, this appears to work well, except when we run fillChromPeaks. We get the following error:
Code: [Select]
> xdata<-fillChromPeaks(xdata,BPPARAM=SerialParam())
Defining peak areas for filling-in ....Error in if (idx_rt_adj > idx_pk_det) { : argument is of length zero

This appears to be produced when dropChromPeaks is called (fillChromPeaks->filterFile->chromPeaks->dropChromPeaks). Essentially, dropChromPeaks looks in processHistory to determine whether peak detection occurred before or after retention time alignment. But the retention time alignment isn't in processHistory.

I couldn't quite see how we can add entries into the processHistory. Eventually I resorted to fudging an entry to circumvent the error.
Code: [Select]
processHolder<-processHistory(xdata)
processHolder[[1]]@type<-"Retention time correction"
xdata@.processHistory<-c(processHistory(xdata),processHolder)
Is there a simpler way to accomplish this?

Would anybody care to offer some advice/suggestions for any part of this? I'm happy to have anyone's input.
Thanks!