kuwisdelu / Cardinal

Mass spectrometry imaging toolbox
http://www.cardinalmsi.org
36 stars 14 forks source link

mass.range specified but readImzML/readMSIData returns MSI data with full range of m/z #44

Closed QQhuan closed 2 months ago

QQhuan commented 2 months ago

some of code are as follows:

`library(Cardinal) options(scipen = 999)

min_mz <- 800 max_mz <- 3000 desired_resolution <- 0.01083 folder_path <- "E:\mass_spectrum_data\CRC-PXD019662-20240607\TMA5B-alltumours-nonormalization.imzML"

msi <- readImzML(path, memory = FALSE, verbose = TRUE, mass.range = c(min_mz, max_mz)) plot(msi) print(msi)`

kuwisdelu commented 2 months ago

Is the dataset in "continuous" imzML format?

If so, that is currently the intended behavior.

The mass.range argument is only used when reading "processed" imzML so the mass range does not need to be calculated from the data. It is ignored for "continuous" imzML.

QQhuan commented 2 months ago

yes, it is a "continuous" imzML. Thank u for your attention!