Closed shntnu closed 5 years ago
I'm going to compare the outputs of 2.2.1 and 2.3.1 for one Cell Painting image, and if they are the same, will merge this. Does that sound reasonable @bethac07 ?
đź‘Ť
Output from shntnu/cellprofiler:2.2.1 BR00100025-A01-1-v_2_2_1.zip
Output from cellprofiler/cellprofiler:2.3.1 BR00100025-A01-1-v2_3_1.zip
library(tidyverse)
library(magrittr)
Cells_221 <- read_csv("~/Desktop/BR00100025-A01-1-v_2_2_1/Cells.csv") %>% arrange(ImageNumber, ObjectNumber)
Cells_231 <- read_csv("~/Desktop/BR00100025-A01-1-v_2_3_1/Cells.csv") %>% arrange(ImageNumber, ObjectNumber)
Nuclei_221 <- read_csv("~/Desktop/BR00100025-A01-1-v_2_2_1/Nuclei.csv") %>% arrange(ImageNumber, ObjectNumber)
Nuclei_231 <- read_csv("~/Desktop/BR00100025-A01-1-v_2_3_1/Nuclei.csv") %>% arrange(ImageNumber, ObjectNumber)
Cytoplasm_221 <- read_csv("~/Desktop/BR00100025-A01-1-v_2_2_1/Cytoplasm.csv") %>% arrange(ImageNumber, ObjectNumber)
Cytoplasm_231 <- read_csv("~/Desktop/BR00100025-A01-1-v_2_3_1/Cytoplasm.csv") %>% arrange(ImageNumber, ObjectNumber)
Image_221 <- read_csv("~/Desktop/BR00100025-A01-1-v_2_2_1/Image.csv")
Image_231 <- read_csv("~/Desktop/BR00100025-A01-1-v_2_3_1/Image.csv")
Cells_diff <- compare::compare(Cells_221, Cells_231)
sort(names(Cells_diff$detailedResult[!Cells_diff$detailedResult]))
Cells_221 %<>% select(one_of(names(Cells_diff$detailedResult[!Cells_diff$detailedResult])))
Cells_231 %<>% select(one_of(names(Cells_diff$detailedResult[!Cells_diff$detailedResult])))
Cells_diff <- (Cells_221 - Cells_231)/Cells_221
Cells_diff %<>%
gather(variable, value)
p <-
ggplot(Cells_diff,
aes(abs(value))) +
geom_histogram() +
scale_x_log10() +
facet_wrap(~variable) +
ggtitle("Comparing v2.3.1 and v2.2.1",
subtitle = "Distribution of relative absolute diff. between readouts of v2.3.1 and v2.2.1 across 481 cells. x-axis is on a log scale.")
ggsave("cells.png", p, width = 12, height = 10)
Nuclei_diff <- compare::compare(Nuclei_221, Nuclei_231)
sort(names(Nuclei_diff$detailedResult[!Nuclei_diff$detailedResult]))
Cytoplasm_diff <- compare::compare(Cytoplasm_221, Cytoplasm_231)
sort(names(Cytoplasm_diff$detailedResult[!Cytoplasm_diff$detailedResult]))
Image_diff <- compare::compare(Image_221, Image_231)
sort(names(Image_diff$detailedResult[!Image_diff$detailedResult]))
As shown above, there's a tiny difference between v2.2.1 and v2.3.1 – Zernike outputs are slightly different. No other features differ. The diff is likely due to https://github.com/CellProfiler/CellProfiler/pull/3455 If all this looks good to you, @bethac07 , I'll go ahead and merge.
IIRC, Zernikes aren't that important, so I'm fine with it, but you being fine with it is much more important
Thanks for reviewing. Turns out many Zernike's are pretty useful, but the 1% differences don't worry me. All set!
For reference: rug plot indicates reproducibility (measured as median rep correlation) of Zernikes. Histogram is the same measure but for all Cell Painting features.
10