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

Use H1 wells to estimate background; use this for image level QC #126

Closed
constantinpape opened this issue May 14, 2020 · 5 comments
Closed
Labels
high priority Should be done before we finalize the repo for the preprint

Comments

@constantinpape
Copy link
Contributor

@tischi and me discussed how to make use of the H1 well without serum signal now:

  • Use strongly dilated nuclei to compute a background mask on the H1 well (by inverted the dilated nuclei mask)
  • Can we use this to estimate the background to be subtracted?
  • In addition, we can use the background estimate for Image level qc to exclude very dim images:
    measure the median intensity per cell (using dilated nuclei without nucleus). If the background is smaller than some factor of the noise, we discard the image. To determine what to use for the noise estimate @tischi will look at histograms.

@imagirom: what statistics do you currently compute in the background extraction?
MAD? STD? (for the noise estimate). I still need to add this to the default table.

@constantinpape constantinpape added the high priority Should be done before we finalize the repo for the preprint label May 14, 2020
@imagirom
Copy link
Contributor

I only compute median and MAD of the background. The column names in the background tables are {channel}_median and {channel}_mad respectively.

@constantinpape
Copy link
Contributor Author

@tischi all the tables have been exported to /g/kreshuk/data/data-processed/... now.

For each folder there are the following tables:

Well and image tables:
<plate-name>_well_table.xlsx
<plate-name>_image_table.xlsx

Cell tables (for all individual channels)
<plate-name>_cell_table_<channel_name>.xlsx

Tables with infected / control classification
<plate-name>_cell_table_infected_clasification.xlsx

Tables for the dilated nuclei:
<plate-name>_cell_table_nucleus_segmentation_voronoi_<small/medium/large>_<channel_name>.xlsx

As we have discussed earlier, the important things would be to plot a cell size histogram and to look at the backgrounds. These can be found in the columns background_<channel_name>_median/mad now.

@imagirom
Copy link
Contributor

imagirom commented May 15, 2020

I have started experimenting with extracting the background from the H1 well, here are results of the IgG channel using the 10% of pixels furthest away from the nuclei for estimation. The first column is the mean of per-image medians, the second column the standard deviation of those means.
Note that some of the plates do have serum staining in the H1 well, in particular the Kinder plates K15rep1, K16rep1.
Also note that is with the second-to-latest version of the flatfield correction.

plateT1rep1_20200509_114423_754         : 1200.66,  17.88
titration_plate_20200403_154849         : 1206.22,  38.02
plateT2rep1_20200509_190719_179         : 1247.12,  33.78
plateK22rep1_20200509_094301_366        : 1319.03,  27.51
plateK12rep1_20200430_155932_313        : 1327.61,  24.55
plateK13rep1_20200430_175056_461        : 1367.06,  21.87
plateT4rep1_20200509_171215_610         : 1367.51,  96.47
plateT3rep1_20200509_152617_891         : 1371.57,  40.79
plateK17rep1_20200505_115526_825        : 1376.21,  34.49
plate1rep3_20200505_100837_821          : 1380.36,  14.32
PlateK21rep1_20200506_132517_049        : 1386.91,   7.96
plateK18rep1_20200505_134507_072        : 1400.62,  20.33
plate5rep3_20200507_113530_429          : 1428.63,  17.43
PlateK20rep1_20200506_114059_490        : 1428.77,   9.09
plateK14rep1_20200430_194338_941        : 1429.20,  20.80
plate9_2rep1_20200506_163349_413        : 1430.98,  22.39
PlateK19rep1_20200506_095722_264        : 1475.03,  45.69
plate2rep3_20200507_094942_519          : 1650.12,  35.95
plate8rep1_20200425_162127_242          : 1882.13,  83.57
plateK16rep1_20200502_154211_240        : 2116.65,  48.44
plate8rep2_20200502_182438_996          : 2161.61,  42.32
plateK15rep1_20200502_134503_016        : 2198.01,  51.02
plate6rep2_wp_20200507_131032_010       : 4372.64, 167.32

image

@constantinpape
Copy link
Contributor Author

Background estimation from the min well has been implemented in #130. We need to verify that it finds Well H1 for the plates where this is the empty well.

There is also a task for computing the dilated nuclei for the intensity measurement, but the QC itself is not implemented yet.
For this, I need to export tables once this is run through for all plates.

@constantinpape
Copy link
Contributor Author

It turns out that this was more complicated than we thought:
Getting a reliable background estimate that works for normal and empty (= images without serum) images is not trivial, because growing from the nuclei sufficiently to cover all foreground leaves no background for plates with very dense cells.
For now, we just use the information about the empty wells if available and otherwise subtract a fixed background.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high priority Should be done before we finalize the repo for the preprint
Projects
None yet
Development

No branches or pull requests

2 participants