Error when loading my data

54 views
Skip to first unread message

cindy

unread,
Feb 12, 2024, 4:50:23 PMFeb 12
to Cardinal MSI Help
Hi,

I tried to load my file using:
d <- readImzML("Slide1-Pten-WT2-neg/Slide1-Pten-WT2-neg")

and I got this error:
reading imzML file: '/Users/txd/Desktop/cardinal3/Slide1-Pten-WT2-neg/Slide1-Pten-WT2-neg.imzML'
detected ibd binary type: ‘continuous’
detected representation: ‘centroid spectrum’
reading ibd file: '/Users/txd/Desktop/cardinal3/Slide1-Pten-WT2-neg/Slide1-Pten-WT2-neg.ibd'
Error in validObject(.Object) :
  invalid class “MSContinuousImagingExperiment” object: number of rows in 'featureData' must match number of rows in 'imageData'

What should I do to read the data?
Thanks!

Giulia Ricciardi

unread,
Feb 13, 2024, 6:57:49 AMFeb 13
to Cardinal MSI Help
Hi Cindy,
to load a file try using the following code:

myFile <- " C:/Users/txd/Desktop/cardinal3/Slide1-Pten-WT2-neg/Slide1-Pten-WT2-neg.imzML " 
d <- readMSIData(myFile)

In the first line, you should specify the path. You may not need the 'C:' at the beginning of the line, but that depends on how your computer wants the path to be written.

Let me know how this works out!

Best,
Giulia

cindy

unread,
Feb 13, 2024, 3:25:25 PMFeb 13
to Cardinal MSI Help
Hello Giulia,

I'm still getting the same error, which I think might not be an issue with the file path, but rather with my data.

> myFile <-"/Users/txd/Desktop/cardinal3/Slide1-Pten-WT2-neg/Slide1-Pten-WT2-neg.imzML"
> d <- readMSIData(myFile)

reading imzML file: '/Users/txd/Desktop/cardinal3/Slide1-Pten-WT2-neg/Slide1-Pten-WT2-neg.imzML'
detected ibd binary type: ‘continuous’
detected representation: ‘centroid spectrum’
reading ibd file: '/Users/txd/Desktop/cardinal3/Slide1-Pten-WT2-neg/Slide1-Pten-WT2-neg.ibd'
Error in validObject(.Object) :
  invalid class “MSContinuousImagingExperiment” object: number of rows in 'featureData' must match number of rows in 'imageData'

Giulia Ricciardi

unread,
Feb 23, 2024, 5:12:14 AMFeb 23
to Cardinal MSI Help
Hello!
I'm not sure about what could be the issue here. Maybe you can try to convert your data from 'continuous' to 'processed'.

myFile_proc <- as(myFile, "MSProcessedImagingExperiment")
myFile_proc
Reply all
Reply to author
Forward
0 new messages