> 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.
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).
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?