Skip to main content
Topic: plotPsSpectrum error (Read 1132 times) previous topic - next topic

plotPsSpectrum error

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

Re: plotPsSpectrum error

Reply #1
Hi Mike,

can you post a self-contained (cut&pastable) example ?
You can use the data from either packages faahKO or mtbls2.

Yours,
Steffen
--
IPB Halle                          Mass spectrometry & Bioinformatics
Dr. Steffen Neumann         http://www.IPB-Halle.DE
Weinberg 3 06120 Halle     Tel. +49 (0) 345 5582 - 1470
sneumann(at)IPB-Halle.DE

Re: plotPsSpectrum error

Reply #2
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

Re: plotPsSpectrum error

Reply #3
Hi,
yes I can reproduce it, and tracking it on
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
--
IPB Halle                          Mass spectrometry & Bioinformatics
Dr. Steffen Neumann         http://www.IPB-Halle.DE
Weinberg 3 06120 Halle     Tel. +49 (0) 345 5582 - 1470
sneumann(at)IPB-Halle.DE