Can Computers count bacteria? Using macro-programming as a tool to improve speed and accuracy for...

1
Kunnen, T.H., Moodley, G.K., Robertson-Andersson, D.V. University of KwaZulu-Natal, School of Life Sciences [email protected] MACE Lab @ Can computers count bacteria? Using macro-programming as a tool to improve speed and accuracy for bacterial counts INTRODUCTION The manual counting, sizing and analysis of thousands of individual bacterial cells takes a long time (Figure 1 & 3). To reduce time and effort, and to increase accuracy and repeatability, this can be coded for using image and data analysis software macros. Macro programming is a built-in function of many available software applications and does not require extensive coding knowledge to utilize. Macros function by (i) performing a pre-programmed set of instructions repeatedly; (ii) potentially decreasing user bias and the influence of the halo effect (Figure 2) and (iii) removing single cell perspectivism by using segmentation thresholding (Figure 4). MATERIALS AND METHODS After a brief training session on Image Pro Plus v.6.2 (IPP), sixty random epifluorescent bacterial images were supplied to volunteers (referred to as users). Users manually counted and measured (length and width) each “object” that they identified as a bacterial cell while timing themselves. After a 2 - 3 day break, the same 10 randomly selected images from the original 60 images were given to the users to test their accuracy and reproducibility. Directly after this, users re-counted all images (randomly mixed) using an automated image analysis macro within IPP and again timed. Gathered data was run through separate Microsoft Excel macros for analysis. ANOVA’s were used to test for statistical differences in the data. Figure 1: Image number 36 from the pool of 60. 4) Automated count (user vs. users) Of all the tested variables, the level of segmentation used was of specific interest. User 4 showed the lowest segmentation levels with user 3 forming a subset with the next highest segmentation, followed by user 5, 2 then 1. Figure 2: Influence of the halo effect and limits of resolution at 200% magnification required to manually count bacterial cells. Figure 3: Excerpts of image 36 manually counted (A), cells = 254, time taken =15:37 sec and automatically counted (B) using segmentation threshold 67, cells =197, time taken = 00:47. Figure 4: Influence of three different segmentation thresholds (A = 27, B = 67 and C = 87) on data acquisition for automated analysis of the same image. The inserts show a reduced image of Figure 2 and the influence of the selected segmentation setting on bacterial dimensional parameters. Halo DISCUSSION AND CONCLUSION Automated macros as a tool for data gathering from bacterial images is both feasible and applicable. The large difference in time taken to assess an image greatly outweighs the possible slight loss in bacterial cell count whilst maintaining an accurate level of bacterial cell dimensions within a sample population. Average total time taken for all 60 images for manual counting vs. automated counting was 4.82 h vs. 26.66 min, respectively. No difference in cell or population number counts between all users. User 4 (who was colorblind) showed a significant difference in all the dimensional parameters (Table 1). User 4 preferentially chose a lower segmentation range (Figure 4A) to assess the cells which greatly influenced their dimensional data without affecting numbers. We conclude: Using a higher segmentation setting is more reliable, as there was no significant difference in cells counted, but dimensional data become more accurate, up to a critical segmentation point. Data gathered by users 1, 2, 3 and 5 showed no statistical difference between their manual and automated data. Time spent by automated data gathering was dramatically reduced. When estimating a bacterial population the loss or gain of cells across 10 fields of view (Massana et al. 1997) is negligible while bacterial dimensions become more accurate. ACKNOWLEDGEMENTS We thank the NRF for funding this project, the volunteers who gave up their time for counting and the members of MACE Lab for their support. We also thank Riaan Rossouw for his original assistance on IPP macros, Kendyl Le Roux for images and Theo van Zyl for his continued help on Microsoft Excel macros. PRELIMINARY RESULTS Tested parameters for ANOVA on IBM SPSS 23 included but were not limited to Summed Length and Width, Summed Bio-Volume, Cells, Population Numbers, Population Biomass, Time per Cell, Total Time and Segmentation Threshold used. All data were ranked due to assumptions being violated. Table 1: ANOVA p values for result # 3 to the left 1) Manual count (user vs. users) Summed length and width data showed that users 1, 2 and 5 were significantly different from user 3, who was also different from user 4. 2) Accuracy and repeatability count (self vs. self) For all users, there was no statistical difference between any of the tested parameters. 3) Automated count (self manual count vs. self automated count) A significant difference was found for all users for time per cell and total time taken, being much reduced during automated counting (mean times were 1085.13% and 774.20% faster, respectively). For users 1, 2, 3 and 5 there was no statistical difference for any of the data gathered from measuring cells (Table 1). User 4 showed a statistical difference for all tested variables with the exception of cells and numbers. A = 27 B = 67 C = 87 REFERENCES Massana, R., Gasol, J.M., Bjørnsen, P.K., Blackburn, N., Hagstrom, A., Hietanen, S., Hygum, B.H., Kuparinen, J. and Pedrós-Alió, C. 1997. Measurement of bacterial size via image analysis of epifluorescence preparations: description of an inexpensive system and solutions to some of the most common problems. Scienta Marina 61, 397-407. A B

Transcript of Can Computers count bacteria? Using macro-programming as a tool to improve speed and accuracy for...

Page 1: Can Computers count bacteria? Using macro-programming as a tool to improve speed and accuracy for bacterial counts

Kunnen, T.H., Moodley, G.K., Robertson-Andersson, D.V. University of KwaZulu­Natal, School of Life Sciences

[email protected] MACE Lab @

Can computers count bacteria? Using macro-programming as a tool to

improve speed and accuracy for bacterial counts

INTRODUCTION

The manual counting, sizing and analysis of thousands of individual bacterial cells

takes a long time (Figure 1 & 3).

To reduce time and effort, and to increase accuracy and repeatability, this can be

coded for using image and data analysis software macros.

Macro programming is a built-in function of many available software applications and

does not require extensive coding knowledge to utilize.

Macros function by (i) performing a pre-programmed set of instructions repeatedly;

(ii) potentially decreasing user bias and the influence of the halo effect (Figure 2)

and (iii) removing single cell perspectivism by using segmentation thresholding

(Figure 4).

MATERIALS AND METHODS

After a brief training session on Image Pro Plus v.6.2 (IPP), sixty random epifluorescent

bacterial images were supplied to volunteers (referred to as users).

Users manually counted and measured (length and width) each “object” that they

identified as a bacterial cell while timing themselves.

After a 2 - 3 day break, the same 10 randomly selected images from the original 60

images were given to the users to test their accuracy and reproducibility.

Directly after this, users re-counted all images (randomly mixed) using an automated

image analysis macro within IPP and again timed.

Gathered data was run through separate Microsoft Excel macros for analysis.

ANOVA’s were used to test for statistical differences in the data.

Figure 1: Image number 36 from the pool of 60.

4) Automated count (user vs. users)

Of all the tested variables, the level of segmentation used was of specific interest.

User 4 showed the lowest segmentation levels with user 3 forming a subset with the next highest segmentation, followed by user 5, 2 then 1.

Figure 2: Influence of the halo effect

and limits of resolution at 200%

magnification required to manually

count bacterial cells.

Figure 3: Excerpts of image 36 manually counted (A), cells = 254, time taken =15:37 sec and automatically counted (B) using segmentation threshold 67, cells =197, time taken = 00:47.

Figure 4: Influence of three different segmentation thresholds (A = 27, B = 67 and C = 87) on data acquisition for automated analysis of the same image. The inserts show a reduced image of Figure 2 and the influence of the selected segmentation setting on bacterial dimensional parameters.

Halo

DISCUSSION AND CONCLUSION

Automated macros as a tool for data gathering from bacterial images is both

feasible and applicable.

The large difference in time taken to assess an image greatly outweighs the possible slight loss in bacterial cell count whilst maintaining an accurate level of bacterial cell dimensions within a sample population.

Average total time taken for all 60 images for manual counting vs. automated counting was 4.82 h vs. 26.66 min, respectively.

No difference in cell or population number counts between all users.

User 4 (who was colorblind) showed a significant difference in all the dimensional parameters (Table 1).

User 4 preferentially chose a lower segmentation range (Figure 4A) to assess the cells which greatly influenced their dimensional data without affecting numbers.

We conclude:

Using a higher segmentation setting is more reliable, as there was no significant difference in cells counted, but dimensional data become more accurate, up to a critical segmentation point.

Data gathered by users 1, 2, 3 and 5 showed no statistical difference between their manual and automated data.

Time spent by automated data gathering was dramatically reduced.

When estimating a bacterial population the loss or gain of cells across 10 fields of view (Massana et al. 1997) is negligible while bacterial dimensions become more accurate.

ACKNOWLEDGEMENTS

We thank the NRF for funding this project, the volunteers who gave up their time for counting and the members of MACE Lab for their support. We also thank Riaan Rossouw for his original assistance on IPP macros, Kendyl Le Roux for images and Theo van Zyl for his continued help on Microsoft Excel macros.

PRELIMINARY RESULTS

Tested parameters for ANOVA on IBM SPSS 23 included but were not limited to Summed Length and Width, Summed Bio-Volume, Cells, Population Numbers, Population Biomass, Time per Cell, Total Time and Segmentation Threshold used. All data were ranked due to assumptions being violated.

Table 1: ANOVA p values for result # 3 to the left

1) Manual count (user vs. users)

Summed length and width data showed that users 1, 2 and 5 were significantly different from user 3, who was also different from user 4.

2) Accuracy and repeatability count (self vs. self)

For all users, there was no statistical difference between any of the tested parameters.

3) Automated count (self manual count vs. self automated count)

A significant difference was found for all users for time per cell and total time taken, being much reduced during automated counting (mean times were 1085.13% and 774.20% faster, respectively).

For users 1, 2, 3 and 5 there was no statistical difference for any of the data gathered from measuring cells (Table 1).

User 4 showed a statistical difference for all tested variables with the exception of cells and numbers.

A = 27 B = 67 C = 87

REFERENCES

Massana, R., Gasol, J.M., Bjørnsen, P.K., Blackburn, N., Hagstrom, A., Hietanen, S., Hygum, B.H., Kuparinen, J. and Pedrós­Alió, C. 1997. Measurement of bacterial size via image analysis of epifluorescence preparations: description of an inexpensive system and solutions to some of the most common problems. Scienta Marina 61, 397-407.

A

B