kuwisdelu / Cardinal

Mass spectrometry imaging toolbox
http://www.cardinalmsi.org
Artistic License 2.0
42 stars 14 forks source link

Error writing large imzML files #5

Closed kuwisdelu closed 5 years ago

kuwisdelu commented 5 years ago

From https://groups.google.com/forum/?hl=en#!topic/CardinalMSI/BcWfwrSmbdY:

Hi,

I get the following warning message in Cardinal 1.12.1 when I try to export large imzML files.

Warning message: In .make.MSContinuousImagingInfo(object, mz.type, intensity.type) : integer overflow in 'cumsum'; use 'cumsum(as.numeric(.))'

Reading the file again is not possible with the error:

Error in validObject(.Object) : invalid class “MSImageSet” object: 'mz' must be strictly increasing or decreasing Calls: readImzML ... callNextMethod -> eval -> eval -> .nextMethod -> validObject Execution halted

In Cardinal version 2.0.4 I get an error during writing:

writeImzML: Writing ibd file 'Y:\out_large.ibd' Error in if (object@offset[object@natoms] < 0) errors <- c(errors, "'offset' contains negative indices") : missing value where TRUE/FALSE needed In addition: Warning message: In .make.MSContinuousImagingInfo(object, mz.type, intensity.type) : integer overflow in 'cumsum'; use 'cumsum(as.numeric(.))'

Best,

Melanie

kuwisdelu commented 5 years ago

I think this should be fixed in >= 2.2.4