Cardinal not reading file

61 views
Skip to first unread message

Bailey Polimer

unread,
Jun 8, 2022, 8:48:14 AM6/8/22
to Cardinal MSI Help
Hi, 

I have been trying to import msi reader data in the form of an .hdr file into R however I keep receiving the error message "Error: expected file /Users/baileypolimer/Downloads/mse.t2m does not exist". The file exists as an hdr file however the readMSIData function interprets the file as a .t2m file. My code is illustrated as follows. 
library(Cardinal)
readMSIData("/Users/baileypolimerDownloads/mse.hdr")

I have verified that the file exists on the computer at this path however am unsure as to how to follow up with this. 

Thanks, 
Bailey 

Giulia Ricciardi

unread,
Jun 8, 2022, 9:00:11 AM6/8/22
to Cardinal MSI Help
Hi,
in the code you wrote here there is a "/" missing before the word 'Downloads':

readMSIData("/Users/baileypolimerDownloads/mse.hdr")

Please check if it is written correctly in your R console as this may be the reason why you get the error message.

Best,
Giulia

Bailey Polimer

unread,
Jun 8, 2022, 1:01:13 PM6/8/22
to Cardinal MSI Help
I have tried that however I am still getting the error message. The file exists on my computer as a .hdr file however the error says .t2m does not exist. 

educh...@gmail.com

unread,
Jun 8, 2022, 4:48:29 PM6/8/22
to Cardinal MSI Help
Hi, 
Did you try to load readMSIData("/Users/baileypolimerDownloads/mse.img")?
When you load Analyze7.5 format the .img file is the file that “calls” .hdr and .t2m
Best,
Edu

Giulia Ricciardi

unread,
Jun 9, 2022, 3:33:11 AM6/9/22
to Cardinal MSI Help
Hi!
Maybe I've found something!


Try using "readAnalyze" instead of "readMSIData"

Hope this helps!

Giulia

Melanie Föll

unread,
Jun 9, 2022, 4:12:38 AM6/9/22
to Cardinal MSI Help
Hi Bailey,

in case you only have an .hdr file, this is not compatible with Cardinal. Cardinal is able to read the Analyze7.5 file format, which consists of three subfiles: hdr + t2m + img. All three files have to have the same name and be located in the same folder. Then you can read them with Cardinal using either readAnalyze("mse") or readMSIData("mse.hdr").
Best,
melanie

Bailey Polimer

unread,
Jun 9, 2022, 8:30:58 PM6/9/22
to Cardinal MSI Help
Oh ok that worked! Thank you so much! 
Reply all
Reply to author
Forward
0 new messages