MassBank / RMassBank

Playground for experiments on the official http://bioconductor.org/packages/devel/bioc/html/RMassBank.html
Other
12 stars 15 forks source link

Resolve `bpstopOnError` issue in RMassBankXCMS.Rmd #355

Open meowcat opened 3 months ago

meowcat commented 3 months ago
Quitting from lines 138-142 [unnamed-chunk-9] (RMassBankXCMS.Rmd)
Error: processing vignette 'RMassBankXCMS.Rmd' failed with diagnostics:
could not find function "bpstopOnError"

I guess this will resolve itself but I have to check

meowcat commented 3 months ago

https://master.bioconductor.org/checkResults/3.19/bioc-LATEST/RMassBank/nebbiolo1-buildsrc.html

meowcat commented 2 months ago

f603ab skips the broken XCMS vignette. The error can be reproduced with the code:

fileName <- system.file("spectra.Glucolesquerellin/Glucolesquerellin_2184_1.mzML", package="RMassBankData")
setReplicate <- xcms::xcmsSet(files=fileName, method="MS1")

R/leMsmsRaw.R#528

This seems like a very normal XCMS call to me, but something must have changed there.

sneumann commented 2 months ago

Hi Michele, thanks for the report! The call does not produce an error here, but simply empty non-data. It is supposed to return Tandem MS or MS$^n$ Mass Spectrometry precursor peaks as annotated in XML raw file,

An "xcmsSet" object with 1 samples

Time range: NA-NA seconds (NA-NA minutes)
Mass range: 0-0 m/z
Peaks: 60 (about 60 per sample)
Peak Groups: 0 
Sample classes: spectra.Glucolesquerellin 

Feature detection:
 o Peak picking performed on MS1.
Profile settings: method = bin
                  step = 0.1

Memory usage: 0.0154 MB
> peaks(xs)
      mz mzmin mzmax rt rtmin rtmax into maxo sn sample
 [1,]  0     0     0 NA    NA    NA    0    0  0      1
 [2,]  0     0     0 NA    NA    NA    0    0  0      1
 [3,]  0     0     0 NA    NA    NA    0    0  0      1
....

And seems the issue is in also mzR, which is not providing precursor mass etc:

library(mzR)
fileName <- system.file("spectra.Glucolesquerellin/Glucolesquerellin_2184_1.mzML", package="RMassBankData")
ms <- openMSfile(fileName)
> head(header(ms)[,c("acquisitionNum", "msLevel", "peaksCount", "retentionTime", "precursorScanNum", "precursorMZ")])
  acquisitionNum msLevel peaksCount retentionTime precursorScanNum precursorMZ
1            337       2         55      226.0152               NA           0
2            338       2         57      226.6848               NA           0
3            339       2         50      227.3550               NA           0

Yours, Steffen

meowcat commented 2 months ago

The build works now, though the underlying issue is unresolved (and on 3.20 Win it still fails but this is a network issue)