Hi Everyone,
Just wondering if anyone has encountered an error while trying to plot a pseudospectra. plotEICs works just fine but plotPsSpectrum does not. The codes and error are posted below. Thanks in advance
xset6 = xsAnnotate(xset5)
xset7 = groupFWHM(xset6, perfwhm = 0.6)
xset8 = groupCorr(xset7, cor_eic_th=0.75, pval=0.05, calcCiS = TRUE)
xset9 = findIsotopes(xset8)
xset10 = findAdducts(xset9, polarity="positive")
plotEICs(xset10, pspec=6, maxlabel=5)
plotPsSpectrum(xset10, pspec=6, maxlabel=5)
Error in if (!is.numeric(index) && index > length(sampnames(xs)) | index < :
missing value where TRUE/FALSE needed
Cheers,
Mike
Hi Mike,
can you post a self-contained (cut&pastable) example ?
You can use the data from either packages faahKO or mtbls2.
Yours,
Steffen
Hi Steffen,
I used the script below on the WT files in the faahKO data.
xset0 = xcmsSet(method="matchedFilter", fwhm=5, snthresh = 10, step = 0.01, steps = 1, max = 5)
xset1 = group(xset0, bw = 3, minfrac = 0.9, mzwid = 0.05)
xset2 = retcor(xset1, plottype = "mdevden")
xset3 = group(xset2, bw = 3)
xset4 = fillPeaks(xset3)
xset4 = xsAnnotate(xset3)
xset5 = groupFWHM(xset4, perfwhm = 0.6)
xset6 = groupCorr(xset5, cor_eic_th=0.75, pval=0.05, calcCiS = TRUE, cor_exp_th=0.75)
xset7 = findIsotopes(xset6)
xset8 = findAdducts(xset7, polarity="positive")
plotPsSpectrum(xset8, pspec=1, maxlabel=5)
Error in if (!is.numeric(index) && index > length(sampnames(xs)) | index < :
missing value where TRUE/FALSE needed
Cheers,
Mike
Hi,
yes I can reproduce it, and tracking it on
https://github.com/sneumann/CAMERA/issues/8 (https://github.com/sneumann/CAMERA/issues/8)
One thing is that you don't use the result of the fillPeaks(),
since you create the result from xset3 (and overwrite xset4 ...)
but that is not the core issue.
Yours,
Steffen