BodenmillerGroup / ImcSegmentationPipeline

A pixel classification based multiplexed image segmentation pipeline
https://bodenmillergroup.github.io/ImcSegmentationPipeline/
MIT License
82 stars 35 forks source link

Error imcsegpipe.extract_mcd_file can not read panorama #106

Closed arcolombo closed 1 year ago

arcolombo commented 1 year ago

Hi so my MCD file is not able to be processed with the IMC jupyter pipeline.

1) i can view the MCD file in MCD VIewer. 2) the jupyter notebook can process the ImcSegmentationPipeline Patients1, ... ,Patient5.zip that is provided in this repository 3) The ROIs were given custom names "TMAXYZ_ROI_001_1058KO_1.txt" , "TMAXYZ_ROI_002_11234KO_1.txt", ... which does not match the below naming convention stated in the manual. so there is a string in between the ROI numbers in our data for example: "001_XYZ_1,txt", "002_XYZ_2.txt" . could this be the cause of the error?

├── {XYZ}_ROI_001_1.txt ├── {XYZ}_ROI_002_2.txt ├── {XYZ}_ROI_003_3.txt ├── {XYZ}.mcd

ERROR message

ERROR:root:Error reading panorama 2 from file TMA0811222BF.mcd: MCD file 'TMA0811222BF.mcd' corrupted: cannot read image for panorama 2

imc_acquisitions_error

Screenshot 2022-09-30 115524

jwindhager commented 1 year ago

Hi @arcolombo, thanks for giving a thorough report on this. Would you be able to give us access to the file? This would potentially help improving the quality of readimc, which is used internally by this pipeline to read MCD and TXT files.

As for your questions:

  1. i can view the MCD file in MCD VIewer.

That's great, so there is reason for hope! Could you please double-check that you're indeed seeing the "correct" acquisition, i.e., not a "copy" of a different acquisition in the same MCD file? Also, could you visually double-check that the affected acquisition in the MCD file matches the acquisition in the corresponding TXT file?

  1. The ROIs were given custom names "TMAXYZ_ROI_001_1058KO_1.txt" , "TMAXYZ_ROI_002_11234KO_1.txt", ... which does not match the below naming convention stated in the manual. so there is a string in between the ROI numbers in our data for example: "001_XYZ_1,txt", "002_XYZ_2.txt" . could this be the cause of the error?

This should not be a problem. Could you please double-check whether there is an OME-TIFF file of the affected acquisition in the acquisitions_dir? In that case, the IMC Segmentation Pipeline has successfully recovered the image data from the corresponding TXT file.

arcolombo commented 1 year ago

Hi. we resolved this issue, because the text files that were originally given to our lab were somehow corrupted. so using the MCD file, we exported the txt files from the MCDViewer, and it processed normally. i'll close this. thank you.