- Open Access
Colonyzer: automated quantification of micro-organism growth characteristics on solid agar
© Lawless et al; licensee BioMed Central Ltd. 2010
Received: 20 November 2009
Accepted: 28 May 2010
Published: 28 May 2010
High-throughput screens comparing growth rates of arrays of distinct micro-organism cultures on solid agar are useful, rapid methods of quantifying genetic interactions. Growth rate is an informative phenotype which can be estimated by measuring cell densities at one or more times after inoculation. Precise estimates can be made by inoculating cultures onto agar and capturing cell density frequently by plate-scanning or photography, especially throughout the exponential growth phase, and summarising growth with a simple dynamic model (e.g. the logistic growth model). In order to parametrize such a model, a robust image analysis tool capable of capturing a wide range of cell densities from plate photographs is required.
Colonyzer is a collection of image analysis algorithms for automatic quantification of the size, granularity, colour and location of micro-organism cultures grown on solid agar. Colonyzer is uniquely sensitive to extremely low cell densities photographed after dilute liquid culture inoculation (spotting) due to image segmentation using a mixed Gaussian model for plate-wide thresholding based on pixel intensity. Colonyzer is robust to slight experimental imperfections and corrects for lighting gradients which would otherwise introduce spatial bias to cell density estimates without the need for imaging dummy plates. Colonyzer is general enough to quantify cultures growing in any rectangular array format, either growing after pinning with a dense inoculum or growing with the irregular morphology characteristic of spotted cultures. Colonyzer was developed using the open source packages: Python, RPy and the Python Imaging Library and its source code and documentation are available on SourceForge under GNU General Public License. Colonyzer is adaptable to suit specific requirements: e.g. automatic detection of cultures at irregular locations on streaked plates for robotic picking, or decreasing analysis time by disabling components such as lighting correction or colour measures.
Colonyzer can automatically quantify culture growth from large batches of captured images of microbial cultures grown during genome-wide scans over the wide range of cell densities observable after highly dilute liquid spot inoculation, as well as after more concentrated pinning inoculation. Colonyzer is open-source, allowing users to assess it, adapt it to particular research requirements and to contribute to its development.
In order to quantify data produced using this technique, we decided to develop Colonyzer, a new tool for generating several measures of culture cell density and morphology including area, integrated optical density (IOD), colour and granularity which emphasises being able to reliably detect cultures with low cell densities. These measures are appropriate for addressing a wide range of research questions and can be disabled or ignored by the user as required. Colonyzer is capable of detecting low cell densities after performing background lighting correction to allow a fair comparison between the densities of all cell cultures on a plate and implementing a Gaussian mixed model image segmentation algorithm which robustly detects the location of cultures barely visible to the human eye.
Summary of image analysis tool features.
HT Colony Analyzer
Most image analysis tools for quantifying the growth of gridded colonies do not deal well with the irregular spot morphology which results from highly dilute inoculation of liquid spots (e.g. Fig. 1A). This appears to be because tools of this kind are primarily designed to quantify final cultures with high cell densities which have been either pinned onto agar or spotted with highly concentrate inoculum. These particular inoculation techniques give rise to clearly defined, opaque, circular cultures (e.g. Fig. 1B).
We can observe the different window of opportunity for capturing changes in cell density in spotted and pinned cultures in Fig. 2. The pinned cultures grow from inoculum to carrying capacity in one day, whereas the same cultures growing from the more dilute spotting inoculum grow from inoculum to carrying capacity in over two days. Given practical limitations to the frequency of image capture, particularly overnight, spotted cultures will give more information about cell division rates than pinned cultures. Shah et al.  demonstrate the utility of the logistic population model for summarising the growth of S. cerevisiae cultures grown on agar, captured as scanned plate images, and this same approach is demonstrated in Fig. 2 using Colonyzer output. Estimated, maximum (exponential-phase) growth rates may be more directly related to the phenotype of interest than final cell density, which likely depends on competition between distinct cultures for space and nutrients and slight variation in inoculum concentrations for instance, as well as on intrinsic growth rates resulting from culture genotype. In order to take full advantage of summarising the wide range of cell density observations produced in a timecourse experiment with a dynamic model, it is important to be able to quantify very low, early, exponential-phase cell densities.
In order to detect low cell densities by photography it is necessary to correct for any lighting gradients which exist across the image after the image is captured. Even in professionally designed, purpose-built plate photographing systems (such as S&P Robotics SPImager and BM3-SC), we have found significant lighting gradients in captured images. We have found that the best strategy to overcome this is to detect any existing gradients after image capture and to compensate for them computationally. Culture IOD (the sum of pixel intensities over an area of an image which is classified as belonging to an individual culture) is an alternative to culture area as a measure of cell density. In dilute S. cerevisiae cultures, for example, at low densities, cultures are opaque and so close to the colour of the agar. As cell density increases, cultures become thicker and begin to take on a colour characteristic of the micro-organism, which is generally different to that of the agar. This colour difference provides a rough measure of culture thickness. Opacity varies in a non-linear fashion with colony thickness over some thickness range and so IOD is an imperfect surrogate for cell density, however, we have observed that lighting-corrected IOD dynamics are less noisy, and a more perfect fit to the logistic model than direct area data. Without lighting correction, the IOD of cultures which happen to be in brightly lit locations on the plate is overestimated. Overall, the observation that culture opacity changes with cell density and our ability to correct for lighting gradients which would otherwise bias density estimates suggests that lighting-corrected IOD should be a better estimator of cell density than culture area alone.
Quantification of captured timecourses of the growth of spotted culture cell densities arrayed on 384-spot format solid agar plates, from photographs while correcting for an existing lighting gradient is the most difficult scenario for an image analysis tool for quantifying culture growth. Colonyzer can perform this task, and its algorithms are also suitable for the quantification of simpler images (e.g. quantifying pinned culture size). Colonyzer is therefore general enough to be suitable for all solid agar culture density analyses.
Colonyzer is a mixture of algorithms, some of which are original, which have been integrated as a Python  script using the statistical package R  (via the Python library RPy ) with the R package rgenoud  and uses the Python Imaging Library  and Numerical Python  extensively. It is available for download under GNU general public license . Despite the fact that Colonyzer has been optimised for sensitivity, generality and robustness rather than speed, deploying these algorithms on a Linux cluster of 90 CPUs, we can reliably quantify cell density for photographs representing over 2 million cultures (photographed repeatedly in timecourse experiments) arrayed in 384-format overnight.
Having provided these estimates once for an entire batch, or on an image-by-image basis as appropriate, the user simply executes the Colonyzer script, which runs through (usually large) lists of images stored in a given directory, and generates textual output files appropriate for further analysis. No further user input is required.
Correction of spatial lighting gradient
Pseudo-empty plates are constructed by cutting culture pixels out of the plate image and filling in the remaining gaps with interpolated background agar intensities. Culture pixels are cut out using a sensitive thresholding algorithm based on morphological edge detection to segment the image into agar and culture, similar to that presented by Chen et al. , on a tile-by-tile basis. The original image is then masked, cutting out culture areas, leaving only agar behind.
First-pass local thresholding algorithm
▪ Take the original RGB image (Fig. 4A), and convert it to greyscale.
▪ Generate a gradient histogram for a user-estimated tile location. Estimate the gradient value below which 95% of the pixels in the tile lies, and threshold the gradient map for the tile at this gradient intensity (Fig. 4C).
▪ Use this binary image as a mask on the greyscale image (Fig. 4D). In this way the pixels whose intensity gradient is in the top 5% for the colonies are cut out (the edges have been masked).
▪ For each approximate rectangular tile location, as estimated from the user input, that tile is cut out of the masked image. The intensity histogram for that masked tile is constructed and the original image tile thresholded so that the darkest 33% of the masked pixels are allocated as background (Fig. 4E).
The 5% and 33% cutoff frequencies were chosen heuristically to suit the wide range of images we have analysed but essentially they are cutting out the very highest gradients, and then thresholding to exclude the darkest pixels having those high gradients. We implemented this particular method of image segmentation since it is very fast (important for high-throughput analysis) and it locally adapts its sensitivity depending on the amount of signal present. Signal in this case is the intensity of growing cultures, which depends on cell density in each tile (which can vary across tiles within a plate), but also on the light incident on a particular colony. We simply require that any signal is correctly identified as culture. Misclassification of agar pixels as culture is not important since misclassified pixels will be cut out and filled in with an approximation of agar intensity in the next step. The opposite, misclassification of culture pixels as agar, would lead to significant errors as our algorithm would later "correct" the intensity of the culture towards the background median during the gradient correction, thereby eradicating the intensity signal for these pixels. It would be trivial to adapt this method to threshold on a pixel-by-pixel basis (using user defined tile dimensions), rather then on a tile-by-tile basis as presented here, however the tile thresholding step would be ~O(x dim *y dim ) times slower.
Creation of a pseudo-empty plate
There are two slight practical problems with cutting out the culture pixels and replacing them with interpolated background pixels. Firstly, any segmentation algorithm will classify the very edges of a culture as background, since including all of the culture would likely mean classifying much background noise as culture. Secondly, depending on the image capture and lighting methods used, there can be reflective haloes surrounding cultures from reflections through the translucent agar medium and off the surface beneath the plate, as well as reflective glare from the sides of the petri dishes. Both of these phenomena imply that immediately outside the thresholded area, a strip of pixels which are of higher intensity than the true background agar intensity is often seen. To resolve this, we search from the edge of a thresholded culture area over a distance approximately equal to the radius of a typical culture (e.g. x dim /2) to find the darkest pixel in that range and use that as the edge intensity for filling in the gaps.
Pseudo-empty plate construction
▪ Strongly smooth the greyscale version of the original image. This averages out the background values and reduces the chance of extreme values being selected for interpolation.
▪ For each image row, scan horizontally identifying gap edges from the thresholded map.
▪ At each edge, search away from the gap for a distance of x dim /2 pixels and take the darkest pixel in that region. Use this as the background edge value.
▪ Step across the gap on the same row and find the edge on the other side, repeat the previous step to get a background edge value for this side of the gap.
▪ Now fill in the gap-slice by linearly interpolating between the two newly found edge values
▪ Create a new smoothed copy of the original greyscale image.
▪ Repeat this process, but this time, scan vertically (along image columns instead, and using a search distance of y dim /2)
▪ Merge the vertically-scanned and horizontally-scanned images by taking the minimum value at each pixel location. This is the pseudo-empty plate image
Scanning horizontally and then vertically, taking the minimum pixel value for the two scans is necessary since the irregular morphology of some cultures occasionally results in islands of bright pixels within a defined gap. This results in one edge being brighter than intended, affecting the interpolation. This technique reduces the chance of a given gap pixel being filled with an excessively bright intensity.
Regression towards median background intensity
From the smoothed, masked greyscale image, the user-estimated area containing growing spots is cut out and its median background pixel intensity calculated. Then, for each pixel on the pseudo-empty plate, the ratio R CORR is calculated: R CORR = I MED /I PE where I PE is the pseudo-empty pixel intensity and I MED is the median background pixel intensity for the plate. On a per-pixel basis the pixel intensity of the original image (I ORIG ) is scaled so that the new intensity is R CORR *I ORIG in order to correct the lighting gradient on the plate. For non-saturated source images the resulting corrected image maintains the signal of interest, as demonstrated in Fig. 6.
Huang and Chau  segment images by taking the mean intensities of the Gaussian components and using the average of these mixture means as their threshold. This assumes that each segment contains a roughly equal proportion of the image pixels. For this particular problem, the intersection of the two component distributions with the highest intensity is the most appropriate threshold since this is the intensity at which the probability of a pixel being assigned to either foreground or background is identical. Intensities either side of the intersection threshold are on balance of probabilities most likely to belong to culture or agar. Performing the final image segmentation with this mixed model approach allows for extremely sensitive segmentation in conditions of low growth. Clear spot signal (which has been maintained through the lighting correction algorithm) can be picked up where only agar is visible with the naked eye.
Location of colony tiles
In an ideal experiment, cultures would remain entirely within the approximately square tiles that they were intended to be inoculated into on the rectangular agar grid. Biological heterogeneity, overgrowth or slight errors in plate location or alignment during image capture necessitate improving on initial location guesses before quantifying cell density. Colonyzer fine-tunes tile location estimates by taking the corrected, thresholded image, and for each tile, minimizing (by brute-force optimization) the number of culture pixels on the tile edge by changing the tile location while keeping its size fixed. Colonyzer performs this search over a 20*20 pixel search area.
Once an exact tile location has been found, Colonyzer stores the coordinates of the top left hand corner of the tile together with its x dim and y dim , allowing users to access sub-images of individual tiles if required. Then the number of culture pixels in the thresholded image are counted and this is stored as a measure of culture area. Similarly, the number of pixels in the tile's location on the gradient map are counted as a measure of culture morphology (i.e. texture or granularity). The original image is masked with the thresholded tile and the mean colour (RGB triplet) of the culture, and mean background agar colour are calculated and stored. The lighting corrected image is masked with the thresholded tile and the sum of the culture intensities in the masked image (less the median background intensity) is used as a measure of IOD. The sum of all the pixel intensities in the tile (less the median background intensity) is calculated as another measure of cell density. All of these values are written to a tab-delimited text file, together with row and column number for subsequent analysis.
Results and Discussion
To date we have used Colonyzer to quantify sets of timecourse photographs for several thousand S. cerevisiae and S. pombe plates in 384, 768 and 1536 format (see Fig. 7 for some example images that Colonyzer can deal with), amounting to several million quantified colony tile images. We typically execute large batches of analysis jobs on a 90 node Linux Beowulf cluster, but we can also analyze genome-wide screens within 36 hours by executing 8 simultaneous analysis jobs on a relatively inexpensive 64-bit dual quad-core Intel Xeon workstation with 12 Gb of RAM. By permanently archiving the source code on SourceForge [12, 16] we hope that other groups and companies involved in high-throughput screening of micro-organism growth will use and develop this tool. Interested users, daunted by the prospect of installing many packages before trying Colonyzer, are welcome to email the corresponding author with an example image for analysis and can expect the return of Colonyzer output files to assess whether Colonyzer is useful for them.
On SourceForge we also provide a supplementary GUI tool to help users provide initial guesses for culture locations (Parametryzer), and code for summarising timecourse data with the logistic model (Logisticyzer). The latter also depends on our in-house Robot Object Database system (ROD) which will be released in the near future.
In future we are interested in improving the speed of analysis, while maintaining its sensitivity (which is its main feature), adapting Colonyzer to utilize some cloud computing services to achieve ever higher throughput, and to improve the ease with which users can install the packages required to run Colonyzer. Others may be interested in adding new functionality or disabling some Colonyzer functions to suit their particular requirements.
This paper presents Colonyzer, an image analysis tool which specialises in quantification of cell density in micro-organism cultures growing on solid agar over a wide range of culture densities from plate photographs. Growing cultures on solid agar is often cheaper and less demanding than equivalent growth in liquid medium. Similarly, photographic image capture is cheaper and faster than spectrophotometric analysis of cell density in liquid wells. Colonyzer's particular strength is its sensitivity in detecting cultures with low density. It achieves sensitivity by correcting for any lighting gradients in captured photographs, and by segmenting images, differentiating between agar and culture, using a two-component Gaussian mixed model of pixel intensity. Algorithms underlying Colonyzer quantify densities of pinned cultures and all late-growth cultures well, but we have optimised them to tackle the more difficult problem of quantifying exponential-phase dilute liquid-inoculated culture density on agar. Colonyzer is significantly more accurate when compared to other tools in this regard. Colonyzer's sensitivity opens up the possibility of quantitative modelling of the growth curves of thousands of independent cultures grown on solid agar during high-throughput screens.
Availability and requirements
Project name: Colonyzer
Project home page: http://research.ncl.ac.uk/colonyzer
Operating system(s): Platform independent.
Programming language: Python & R
Other requirements: Python Imaging Library, RPy, NumPy, rgenoud
License: GNU GPL
Any restrictions to use by non-academics: No restrictions
This work was supported by the BBSRC (grant no. BB/C008200/1) and the EPSRC. Alexander Young was funded by a BBSRC Undergraduate Vacation Bursary. Hardware support was provided by Newcastle University Bioinformatics Support Unit (BSU). James Dewar inoculated cultures and captured example images for testing.
- Addinall SG, Downey M, Yu M, Zubko MK, Dewar J, Leake A, Hallinan J, Shaw O, James K, Wilkinson DJ, Wipat A, Durocher D, Lydall D: A Genomewide Suppressor and Enhancer Analysis of cdc13–1 Reveals Varied Cellular Processes Influencing Telomere Capping in Saccharomyces cerevisiae. Genetics 2008, 180: 2251–2266. 10.1534/genetics.108.092577View ArticlePubMedPubMed CentralGoogle Scholar
- Collins SR, Schuldiner M, Krogan NJ, Weissman JS: A strategy for extracting and analyzing large-scale quantitative epistatic interaction data. Genome Biology 2006, 7: R63. 10.1186/gb-2006-7-7-r63View ArticlePubMedPubMed CentralGoogle Scholar
- Shah NA, Laws RJ, Wardman B, Zhao LP, Hartman JL IV: Accurate, precise modeling of cell proliferation kinetics from time-lapse imaging and automated image analysis of agar yeast culture arrays. BMC Systems Biology 2007, 1: 3. 10.1186/1752-0509-1-3View ArticlePubMedPubMed CentralGoogle Scholar
- S & P Robotics[http://www.sprobotics.com/]
- Lamprecht MR, Sabatini DM, Chapman AE: CellProfiler: free, versatile software for automated biological image analysis. BioTechniques 2007, 42: 71–75. 10.2144/000112257View ArticlePubMedGoogle Scholar
- Python Programming Language[http://www.python.org/]
- R Development Core Team: R: A language and environment for statistical computing.Vienna, Austria R Foundation for Statistical Computing; 2009. [http://www.R-project.org]Google Scholar
- RPy Python Library[http://rpy.sourceforge.net/]
- Mebane WR, Sekhon JS: Genetic Optimization Using Derivatives: The rgenoud Package for R. Journal of Statistical Software 2009, 13: 9.Google Scholar
- Python Imaging Library Handbook[http://effbot.org/imagingbook/]
- Oliphant TE: Python for Scientific Computing. Computing in Science & Engineering 2007, 9(3):10–20.View ArticleGoogle Scholar
- Colonyzer on SourceForge[http://colonyzer.sourceforge.net/]
- Chen B, He L, Liu P: A Morphological Edge Detector for Gray-Level Image Thresholding. In Lecture Notes in Computer Science Volume 3656/2005. Heidelberg: Springer Berlin; 2005:659–666. full_textGoogle Scholar
- Sobel I, Feldman G: A 3 × 3 Isotropic Gradient Operator for Image Processing. Stanford Artificial Project 1968.Google Scholar
- Huang Z, Chau K: A new image thresholding method based on Gaussian mixture model. Applied Mathematics and Computation 2008, 205(2):899–907. 10.1016/j.amc.2008.05.130View ArticleGoogle Scholar
This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.