README.md 2.06 KB
Newer Older
Chris Evenhuis's avatar
Chris Evenhuis committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
# Biofilm analysis

## Summary
This script analysis the height of a biofilm and correlated changes in the biofilm height to localisations found on another channel.

## Creation of the height map

### Filtering of the biofilm channel
1. Median filter of 20px (4.14 $\mu$m)
2. Gaussian Filter of 15px (3.11 $\mu$m)
3. Threshold method `Default` in ImageJ
4. Height map built up by copy each layer by copying (with 0 transparent) to a 2D projection. 

![](media/map_3D_comp.png)

### Particle Localisation
For each imageL

1. Median filter of 2px (0.41 $\mu$m)
2. Gaussian Filter of 1px (0.20 $\mu$m)
3. Threshold method `Otsu` in ImageJ
4. Connected components labelling in 3D to identify particles
5. Centroid, Bounding box (for min and max Z), volume and mean Intensity calculated for each particle roi.  
6. Results saved to `$filename_res.csv`. 

This fails for the control as there's only background fluorescence.
Global threshold used by comparing the thresholds across the images

| file | threshold for particle |
|-----:|------------------------|
| 3hr / wild |  1277 |
|       nAg  |  1931 |
|       gent |  1916 |
| 6hr / wild |  2158 |
|       nAg  |  1646 |
|       gent |  1255 |
| Global     | **1800** |


### Particle projection to create 2D RoIs 
1. Particle connected components projected (max).  
2. Rois extracted from label image 
3. Average biofilm height (from 2D projection) calculated for each 2D RoI. 

### Summary statistics for image
The height map is split to the regions that have a particle localisation (`roi`) and the regions that do not (`back`).  
Summary statistics (mean and standard deviation) of the heigh map is analysed as follows:

*  `tot_mean`,  `tot_stdev `     : mean of the biofilm height (whole image) and it’s standard deviation
*  `back_mean`, `back_stdev`     : mean of the biofilm height for the parts that are NOT a detection on the purple channel and it’s standard deviation
*  `roi_mean`,  `roi_stdev`      : mean of the biofilm height for the parts that are a detection on the purple channel and it’s 
![](media/summary_stats_split.png)