<jupyter_start><jupyter_text>Plot SNR vs intensity  Using all dots<jupyter_code>plist = pblapply(split(dots_data2, list(dots_data2$magnification, dots_data2$image_type)),
    function(pdata) {
        p1 = ggplot(pdata, aes(x=SNR2, y=Value2)) + geom_scattermore() +
            facet_wrap(~image_type~magnification, scales="free") + theme_bw() +
            scale_x_log10() + scale_y_log10() + labs(x="SNR", y="Intensity")
    }, cl=4
)
options(repr.plot.width=12, repr.plot.height=12)
plot_grid(plotlist=plist, nrow=2)<jupyter_output>|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=43s<jupyter_text>After filtering for FWHM in [0.5; 5]<jupyter_code>ddata = dots_data2[FWHM >= .5 & FWHM <= 5]
ddata[, .N, by=c("magnification", "image_type")]
plist = pblapply(split(ddata, list(ddata$magnification, ddata$image_type)),
    function(pdata) {
        p1 = ggplot(pdata, aes(x=SNR2, y=Value2)) + geom_scattermore() +
            facet_wrap(~image_type~magnification, scales="free") + theme_bw() +
            scale_x_log10() + scale_y_log10() + labs(x="SNR", y="Intensity")
    }, cl=4
)
options(repr.plot.width=12, repr.plot.height=12)
plot_grid(plotlist=plist, nrow=2)<jupyter_output>|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=34s<jupyter_text>After filtering for FWHM in [0.5; 5] and selecting only dots in nuclei<jupyter_code>ddata = dots_data2[FWHM >= .5 & FWHM <= 5 & nid > 0]
ddata[, .N, by=c("magnification", "image_type")]
plist = pblapply(split(ddata, list(ddata$magnification, ddata$image_type)),
    function(pdata) {
        p1 = ggplot(pdata, aes(x=SNR2, y=Value2)) + geom_scattermore() +
            facet_wrap(~image_type~magnification, scales="free") + theme_bw() +
            scale_x_log10() + scale_y_log10() + labs(x="SNR", y="Intensity")
    }, cl=4
)
options(repr.plot.width=12, repr.plot.height=12)
plot_grid(plotlist=plist, nrow=2)<jupyter_output>|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=13s<jupyter_text>After filtering for FWHM in [0.5; 5] and selecting only dots in (selected) nuclei<jupyter_code>nuclear_features = fread("../../data/selected_nuclei.tsv", key=c("sid", "nid"))
ddata = dots_data2[FWHM >= .5 & FWHM <= 5 & nid > 0]
setkeyv(ddata, c("series_id", "nid"))
ddata2 = nuclear_features[ddata][!is.na(size)]
ddata2[, .N, by=c("magnification", "image_type")]
plist = pblapply(split(ddata2, list(ddata2$magnification, ddata2$image_type)),
    function(pdata) {
        p1 = ggplot(pdata, aes(x=SNR2, y=Value2)) + geom_scattermore() +
            facet_wrap(~image_type~magnification, scales="free") + theme_bw() +
            scale_x_log10() + scale_y_log10() + labs(x="SNR", y="Intensity")
    }, cl=4
)
options(repr.plot.width=12, repr.plot.height=12)
plot_grid(plotlist=plist, nrow=2)
# Resetting SNR > 200 to 200, for visualization purposes (i.e., shifting outliers)
ddata3 = copy(ddata2)
ddata3[SNR2 > 200, SNR2 := 200]
plist = pblapply(split(ddata3, list(ddata3$magnification, ddata3$image_type)),
    function(pdata) {
        p1 = ggplot(pdata, aes(x=SNR2, y=Value2)) + geom_scattermore() +
            facet_wrap(~image_type~magnification, scales="free") + theme_bw() +
            labs(x="SNR", y="Intensity")
    }, cl=4
)
options(repr.plot.width=12, repr.plot.height=12)
plot_grid(plotlist=plist, nrow=2)<jupyter_output>|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=14s<jupyter_text>Count dots after filtering for FWHM in [0.5; 5] and selecting only dots in (selected) nuclei<jupyter_code>dim(dots_data)
dim(dots_data2)
dim(ddata2)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.21125975473801561, 'fraction_numerical': 0.037346711259754736, 'mean_word_length': 5.621771217712177, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 24, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '436493', 'license': 'MIT', 'n_tokens_mistral': 1518, 'n_tokens_neox': 1362, 'n_words': 224, 'path': 'notebooks/3_assembling_and_filtering_dots/2.0_dots_feature_plot.ipynb', 'repo_name': 'ggirelli/deconwolf-smFISH-analysis', 'size': '3588'}