BodenmillerGroup / steinbock

A toolkit for processing multiplexed tissue images
https://bodenmillergroup.github.io/steinbock
MIT License
49 stars 14 forks source link

Differences in segmentation results #228

Closed DomenicoSkyWalker89 closed 7 months ago

DomenicoSkyWalker89 commented 7 months ago

Dear all,

First of all I would like to thank you for sharing the code to preprocess the IMC data. I'm just starting to approach the analysis of IMC data, so I have little experience.

I used publicly available data to compare their results with my segmentation (I used the deepcell approach). Unfortunately my mask was not as good as the one posted (attached). Do you have any suggestions for me to improve the result? Did I do something wrong before?

I also attached the panel.csv used for my segmentation process.

A thousand thanks.

Best,

Domenico

mine mask: image

published: image

panel.csv

nilseling commented 7 months ago

Hi @DomenicoSkyWalker89

Could you please give us a bit more information.

  1. What data are you referring to?
  2. Which steinbock version are you using?
  3. Does the panel match the acquired channels?
  4. Does the panel match the panel of the original data?
  5. Are they using deepcell?
nilseling commented 7 months ago

Please also carefully read through the documentation. It looks like you are only specifying nuclear channels for segmentation

DomenicoSkyWalker89 commented 7 months ago

Dear @nilseling,

thanks for the fast replay.

1) I'm referring to data from this paper: https://www.nature.com/articles/s43856-022-00197-2; 2) The version of steinbock I'm using is 0.16.1; 3-4) I downloaded the panel they shared in the paper so it should match perfectly the original data; 5)No, they used their own pipeline for the segmentation;

D

nilseling commented 7 months ago

And you did not modify the panel?

DomenicoSkyWalker89 commented 7 months ago

I mean the order and number of row is the same. I selected the first and third column renaming them as 'channel' and 'name' to create my own panel to use in steinbock.

Best,

Domenico

nilseling commented 7 months ago

@jwindhager just quickly checking here that using 0 instead of 1 for the nuclear markers and 1 instead of 2 for the cytoplasmic markers doesn't make a difference, right? The important thing is that the first grouping level is nuclear and the second one is cytoplasmic.

Milad4849 commented 7 months ago

Hi @DomenicoSkyWalker89, please let us know all the steinbock commands that you used to generate the segmentations. Did you generate the TIFs from raw data or did you start from TIFs not generated by steinbock?

DomenicoSkyWalker89 commented 7 months ago

Dear @Milad4849 I started from TIFs not generated by steinbock, as they provided. The result I obtained can be due to bad training on 50x50 crops?

List of command used:

1) steinbock classify ilastik prepare --cropsize 50 --seed 123 2) steinbock apps ilastik (there i followed the https://www.ilastik.org/documentation/pixelclassification/pixelclassification.html#training-the-classifier) 3)steinbock classify ilastik run 4)steinbock segment deepcell --minmax

Best,

Domenico

nilseling commented 7 months ago

@Milad4849 I just saw that the 50 pixel crops are the default in the steinbock docs. It would be good to align this with the IMC Segmentation Pipeline. I would say that 50 pixel crops are too small for ilastik training.

nilseling commented 7 months ago

Just for the future, @DomenicoSkyWalker89 could you please let us know what the issue was?

DomenicoSkyWalker89 commented 7 months ago

Dear team,

As suggested by @Milad4849, if you are adopting segmentation using CellProfiler, 50 pixel crops are too small for ilastik training, so I simply increased to 100 pixels getting better results.

I preferred to use Deepcell for the segmentation phase which does not require a previous phase of pixel classification (correct me if I'm wrong). The problem I observed was related to the low expression of some membrane proteins that I chose for segmentation (I selected them from the excel file they provided but some showed huge background). Anyway, selecting membrane proteins with low background helped me improve segmentation (images attached). The result was not identical because I lost some cells but acceptable (I'll study and work on it).

Best,

Domenico

published:

image

mine (in blue DNA1):

image

nilseling commented 7 months ago

That's great, thanks for the info!