sneumann / mzR-playground

Playground area for the mzR package. The main code repository is now at https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/mzR/
http://bioconductor.org/packages/devel/bioc/html/mzR.html
5 stars 2 forks source link

No instrument info for mzData [was SEGV for show(MM14)] #5

Closed sneumann closed 13 years ago

sneumann commented 13 years ago

library(mzR) library(msdata)

cdfpath <- system.file("microtofq", package = "msdata") file <- list.files(cdfpath, pattern="MM14.mzdata",
full.names=TRUE, recursive = TRUE) aa <- openMSfile(file) show(aa)

* caught segfault * address 0x8, cause 'memory not mapped'

Traceback: 1: .External(list(name = "CppMethod__invoke_notvoid", address = <pointer: 0x19ce5d0>, dll = list(name = "Rcpp", path = "/vol/local/lib/R/site-library/Rcpp/libs/Rcpp.so", dynamicLookup = TRUE, handle = <pointer: 0x18d62b0>, info = <pointer: 0x7ff1bd1067e0>), numParameters = -1L), <pointer: 0x12d9540>, <pointer: 0x18cd990>, .pointer, ...) 2: object@Ramp$getInstrumentInfo() 3: instrumentInfo(object) 4: instrumentInfo(object) 5: show(aa) 6: show(aa)

sneumann commented 13 years ago

Ah, works with the mzML of the same file:

show(aa) Mass Spectrometry file handle. Filename: /vol/local/lib/R/site-library/msdata/microtofq/MM14.mzML Manufacturer: Unknown Model: instrument model Ionisation: electrospray ionization Analyzer: mass analyzer type Detector: detector type number scans: 112 lowMZ: 0 highMZ: 0 startMZ: 0 endMZ: 0 dStartTime: 270.334 dEndTime: 307.678

lgatto commented 13 years ago

Yes, it's a mzdata specific issue. But I don't know if it is a bug or if the underlying getInstrumentInfo C++ code that does not handle mzdata files. In the meantime (going to commit soon), I added file extension check and do not query instrument information if the file ends with mzdata.