Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation mask not found with MCMICRO output #197

Open
saikatds-bd opened this issue Dec 21, 2024 · 2 comments
Open

Segmentation mask not found with MCMICRO output #197

saikatds-bd opened this issue Dec 21, 2024 · 2 comments

Comments

@saikatds-bd
Copy link

Hi!

First of all, thank you for developing such an amazing tool like Cylinter.
I have previously tried with the example data and it worked as expected. However, I have encountered an issue regarding the expected input files when I tried to use MCMICRO output as input for the tool. Specifically:
From MCMICRO, I performed quantification, which generated files like 1--unmicst_cellRing.csv (among others). When I try to run Cylinter, I encounter the error: segmentation outlines for sample 1 not found.
Upon debugging, I discovered this is caused by a missing file that Cylinter expects at: qc/s3seg/unmicst-1/cellRing*.tif
image

However, MCMICRO generates QC files in qc/s3seg/unmicst-1 for nucleiRing (e.g., 1-nucleiRingOutlines.ome.tif) but does not generate QC outputs for cellRing (or I could not make it). This mismatch appears to be the root of the issue.
My directory structure is here:
image

Could you advise on the best way to resolve this?

  1. Is it acceptable to rename the nucleiRing QC file (e.g., 1-nucleiRingOutlines.ome.tif) to match Cylinter's expected cellRingOutlines.ome.tif format?
  2. Even if I decide to solely use nucleiring instead of cellring for quantification in mcmicro, I think it will still through an error because the naming convention for the qc segmentation files are not the same as what Cylinter expects.
  3. Or, is there a preferred way to handle this situation to ensure compatibility?
  4. Considering the importance of checking the segmentation quality, would you recommend commenting out some lines to bypass this step, as you have mentioned here https://github.com/labsyspharm/cylinter/issues/176, and rather use some other tools to check the segmentation quality?

I have attached herewith the cylinter_config.yml file in txt in case if you want to have a look at that.
cylinter_config_trial.txt

Thank you for your time and help!

@gjbaker
Copy link
Member

gjbaker commented Dec 22, 2024

Dear @saikatds-bd,

Thank you for your interest in CyLinter and for the detailed report. I think all that is needed is to update the sampleMetadata field in your cylinter_config to read "1--unmicst_nucleiRing" instead of "1--unmicst_cellRing". This is because "1--unmicst_cellRing" does not have a corresponding segmentation outlines file in qc/s3seg. CyLinter is designed to check that all keys specified in sampleMetadata have corresponding CSV, segmentation mask, and cell outlines files. In your case, matched files are only present for nucleiRing.

Because the multi-channel TIFFs themselves are unrelated to segmentation masks and outlines, matched suffixes like nucleiRing and cellRing are not needed for those files.

From your MCMICRO output directory, it appears you are working with TMA data, as evidenced by the dearray folder. In that case, CyLinter will look for the multi-channel TIFF image there.

Try making the aforementioned change to your cylinter_config file and let me know if you run into any further issues.

All the best,
-Greg

@saikatds-bd
Copy link
Author

Hi @gjbaker,

Thanks a lot for the reply. I was a bit too hesitant about bothering you in this holiday season, and was not expecting any reply now. Thanks again!

I tried with the modified cylinter_config.yml file, but it shows the similar error.
image
And with the debugging:
image

So apparently it is still looking for a file with name "nucleiRing*.tif" as it derives the name from here:
sampleMetadata:
"1--unmicst_nucleiRing": ["1", "Tromso TMA", "TMA1", "CANCER-TRUE", 1]

Because when I manually rename the file in qc/s3seg/unmicst-1 from "1-nucleiRingOutlines.ome.tif" to "nucleiRingOutlines.ome.tif", it works.

The issue is solved now. My understanding for solving the issue is generating quantification CSVs for both the cellmask and nucleiring (the default is only for the cellmask) by editing the parameters file of MCMICRO, and renaming the qc/s3seg/unmicst file to have names such as "nucleiRingsOutlines.ome.tif".

Have a great holiday!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants