hci-unihd / antibodies-analysis-issues

Issue tracker for problems in the antibodies analysis workflow.
0 stars 0 forks source link

Infected cell detection failed - plateK12rep1_20200430_155932_313 - C02-0004 #66

Open tischi opened 4 years ago

tischi commented 4 years ago

{"plateName":"plateK12rep1_20200430_155932_313","siteName":"C02-0004","pixelLocation":[4580.848484848485,7714.909090909091,0.0],"analysisVersion":"fe4b2a54e8cc608bfd053557eacec69ecfb39923"}

@imagirom @constantinpape @metavibor

As suspected, the infected cell detection seemed to have failed in this plate. There are many cells with bright virus staining that have not been identified.

Screenshot

constantinpape commented 4 years ago

@tischi can you find out if these cells are particularly small? @imagirom has been thinking this might be one of the problems we have in the virus detection right now. I am still cleaning up some things, and then I will also work on the infected cell detection a bit.

tischi commented 4 years ago

Does not look as if the cell size is special in the K12 plate:

> df %>% group_by(plate_name) %>% summarise(median(cell_size_median_infected, na.rm=T))
# A tibble: 8 x 2
  plate_name                   `median(cell_size_median_infected, na.rm = T)`
  <chr>                                                                 <dbl>
1 20200417_132123_311                                                   1654 
2 20200417_152052_943                                                   1629 
3 20200417_203228_156                                                   1722.
4 plate6rep2_wp0507_131032_010                                          1474.
5 plate9_2rep10506_163349_413                                           1332.
6 plate9rep10430_144438_974                                             1591.
7 plateK12rep10430_155932_313                                           1608.
8 PlateK19rep10506_095722_264                                           1589.
> df %>% group_by(plate_name) %>% summarise(median(cell_size_median_control, na.rm=T))
# A tibble: 8 x 2
  plate_name                   `median(cell_size_median_control, na.rm = T)`
  <chr>                                                                <dbl>
1 20200417_132123_311                                                  1646.
2 20200417_152052_943                                                  1652.
3 20200417_203228_156                                                  1644 
4 plate6rep2_wp0507_131032_010                                         1594.
5 plate9_2rep10506_163349_413                                          1431 
6 plate9rep10430_144438_974                                            1754 
7 plateK12rep10430_155932_313                                          1708.
8 PlateK19rep10506_095722_264                                          1682 
tischi commented 4 years ago

What algorithm are you guys using right now? As discussed with @imagirom, I think measuring whether the cell is brighter in some sense than the background signal in the same image/well/plate is what I would do (after applying a tophat filter to the image to get rid of remaining flat-field imperfections).

imagirom commented 4 years ago

Current algorithm: Exactly what you proposed in https://github.com/hci-unihd/antibodies-analysis-issues/issues/17, with top-k statistic (before the last run this performed better than quantiles in grid-search) I will try the tophat filter as preprocessing.

@constantinpape @tischi I have a hypothesis about the apparently obviously missed infected cells: Could it be that they are classified as outliers? In that case they would show up as non-infected in the mask. Checking this is another reason the click-to-inspect-cell feature we discussed would be very useful.

tischi commented 4 years ago

Checking this is another reason the click-to-inspect-cell feature we discussed would be very useful.

working on it...

metavibor commented 4 years ago

can we have a mask that show outliers

constantinpape commented 4 years ago

can we have a mask that show outliers

very good point, I will add this to the image summary that we produce.

constantinpape commented 4 years ago

@constantinpape @tischi I have a hypothesis about the apparently obviously missed infected cells: Could it be that they are classified as outliers? In that case they would show up as non-infected in the mask. Checking this is another reason the click-to-inspect-cell feature we discussed would be very useful.

Ok, I will add the outlier mask in a few minutes and then recompute it for all the plates in the sandbox folder.

constantinpape commented 4 years ago

I have added the outlier mask now and I am computing it for all the plates in the sandbox folder again. I also made another small change: the cell segmentation edges are marked with value 2 in the mask images now; I think that makes it much easier to properly see the results.

@tischi @imagirom I will let you know once it's there.

tischi commented 4 years ago

Thanks @constantinpape It is working nicely, see here: https://github.com/hci-unihd/antibodies-analysis-issues/blob/master/screenshots/PlateK19rep1_20200506_095722_264-A01-0004-455974534.jpg

constantinpape commented 4 years ago

Yes, just wanted to let you know that it's all computed now