Creating ome.tiffs from .mcd via Jupyter Notebook

Looking for ways to analyze your dataset? Need help with a software package?
Computational image analysis of multiplexed Imaging Mass Cytometry acquisitions
Post Reply
MalteLehmann
Posts: 3
Joined: Fri Dec 20, 2019 1:29 pm

Creating ome.tiffs from .mcd via Jupyter Notebook

Post by MalteLehmann » Fri Dec 20, 2019 4:33 pm

Hey,

I recently got my first IMC data. Now I wanted to use the pipeline we were shown during the IMC workshop in Zürich this year. However, using the imctools in Jupyter Notebook I get this error:

ERROR:root:Error in STARFim_20191211_OT1_s1_p6_r1_a1_ac.ome.tiff
Traceback (most recent call last):
File "<timed exec>", line 13, in <module>
File "C:\Users\Malte\Anaconda3\envs\imctools\lib\site-packages\imctools\scripts\ometiff2analysis.py", line 38, in ometiff_2_analysis
writer = imc_img.get_image_writer(outname + '.tiff', metals=selmetals, mass=selmass)
File "C:\Users\Malte\Anaconda3\envs\imctools\lib\site-packages\imctools\io\imcacquisition.py", line 39, in get_image_writer
order = self.get_metal_indices(metals)
File "C:\Users\Malte\Anaconda3\envs\imctools\lib\site-packages\imctools\io\imcacquisitionbase.py", line 91, in get_metal_indices
return [order_dict[m] for m in metallist]
File "C:\Users\Malte\Anaconda3\envs\imctools\lib\site-packages\imctools\io\imcacquisitionbase.py", line 91, in <listcomp>
return [order_dict[m] for m in metallist]
KeyError: '191Ir'
ERROR:root:Error in STARFim_20191211_OT1_s1_p6_r1_a1_ac.ome.tiff
Traceback (most recent call last):
File "<timed exec>", line 13, in <module>
File "C:\Users\Malte\Anaconda3\envs\imctools\lib\site-packages\imctools\scripts\ometiff2analysis.py", line 38, in ometiff_2_analysis
writer = imc_img.get_image_writer(outname + '.tiff', metals=selmetals, mass=selmass)
File "C:\Users\Malte\Anaconda3\envs\imctools\lib\site-packages\imctools\io\imcacquisition.py", line 39, in get_image_writer
order = self.get_metal_indices(metals)
File "C:\Users\Malte\Anaconda3\envs\imctools\lib\site-packages\imctools\io\imcacquisitionbase.py", line 91, in get_metal_indices
return [order_dict[m] for m in metallist]
File "C:\Users\Malte\Anaconda3\envs\imctools\lib\site-packages\imctools\io\imcacquisitionbase.py", line 91, in <listcomp>
return [order_dict[m] for m in metallist]
KeyError: '143Nd'

Now if I am right, according to the guide this means I have channel in my .csv file that wasnt measured. Those channels were measured though. Even if I delete those channels from my .csv pannel I get the same error with two other channels. Can anybody give me a hint how to solve this?
User avatar
votti
Posts: 26
Joined: Mon Nov 27, 2017 12:46 pm

Re: Creating ome.tiffs from .mcd via Jupyter Notebook

Post by votti » Tue Jan 07, 2020 3:52 pm

Hi MalteLehmann,

Sorry I am seeing this only now!

The issue is that the metal format needs to be: (Metal)(Mass), e.g. Ir191, Yb171 etc. not '143Nd'.
I rewrote the documentation to make this more obvious.

Does this fix your problem?

Cheers, Vito
Post Reply