Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2020 Jan;113(1):297-308.
doi: 10.1111/mmi.14417. Epub 2019 Nov 24.

BactMAP: An R package for integrating, analyzing and visualizing bacterial microscopy data

Affiliations

BactMAP: An R package for integrating, analyzing and visualizing bacterial microscopy data

Renske van Raaphorst et al. Mol Microbiol. 2020 Jan.

Abstract

High-throughput analyses of single-cell microscopy data are a critical tool within the field of bacterial cell biology. Several programs have been developed to specifically segment bacterial cells from phase-contrast images. Together with spot and object detection algorithms, these programs offer powerful approaches to quantify observations from microscopy data, ranging from cell-to-cell genealogy to localization and movement of proteins. Most segmentation programs contain specific post-processing and plotting options, but these options vary between programs and possibilities to optimize or alter the outputs are often limited. Therefore, we developed BactMAP (Bacterial toolbox for Microscopy Analysis & Plotting), a command-line based R package that allows researchers to transform cell segmentation and spot detection data generated by different programs into various plots. Furthermore, BactMAP makes it possible to perform custom analyses and change the layout of the output. Because BactMAP works independently of segmentation and detection programs, inputs from different sources can be compared within the same analysis pipeline. BactMAP complies with standard practice in R which enables the use of advanced statistical analysis tools, and its graphic output is compatible with ggplot2, enabling adjustable plot graphics in every operating system. User feedback will be used to create a fully automated Graphical User Interface version of BactMAP in the future. Using BactMAP, we visualize key cell cycle parameters in Bacillus subtilis and Staphylococcus aureus, and demonstrate that the DNA replication forks in Streptococcus pneumoniae dissociate and associate before splitting of the cell, after the Z-ring is formed at the new quarter positions. BactMAP is available from https://veeninglab.com/bactmap.

Keywords: Bacillus subtilis; Staphylococcus aureus; Streptococcus pneumoniae; DNA replication; Rtools; bacterial cell biology; chromosome segregation; image analysis; single cell analysis.

PubMed Disclaimer

Conflict of interest statement

The authors declare no conflict of interest.

Figures

Figure 1
Figure 1
Visualization and analysis of microscopy data using BactMAP [Colour figure can be viewed at https://www.wileyonlinelibrary.com]
Figure 2
Figure 2
Overview of BactMAP's plotting functions. Intracellular (raw) fluorescence. plotRaw() and bactKymo() are both useful visualization tools that use cell outlines and the original image in TIFF format. plotRaw() shows the original microscopy pictures with the cellular outlines and/or the localization data. bactKymo() makes kymographs and demographs of single cells and cell groups. Subcellular localization. For plotting of subcellular fluorescent spot localizations createPlotList() is used. This function returns a list of demographs, histograms an projections. For larger fluorescent objects, plotObjects() plots intracellular object shapes and localization through cell projections. When MicrobeJ or iSBatch are used to track fluorescent spots over time, plotTrack() can be used to visualize them. Moreover, plotOverlay() can be used to plot cell towers and localization over time of different fluorescent channels and/or experimental conditions. Time‐lapse analysis. percDivision() will categorize each cell based on growth speed and determine when a cell underwent a full division. plotTreeBasic() uses the package ggtree (Yu, Smith, Zhu, Guan, & Lam, 2017) to plot Oufti's or SuperSegger's genealogy information as a tree plot. To visualize single‐cell growth and fluorescence, plotCellsTime() uses cell outlines and raw microscopy images to create single‐cell towers or movies [Colour figure can be viewed at https://www.wileyonlinelibrary.com]
Figure 3
Figure 3
Overview of the functionality of five programs compatible with BactMAP. Of the five tested programs, three are MATLAB‐Based (SuperSegger, Morphometrics and Oufti) and two are ImageJ Plugins (MicrobeJ, ObjectJ). While Oufti is MATLAB‐Based, it comes as a standalone program for 64x operating systems. In addition to measuring the outlines, Oufti, MicrobeJ, Morphometrics and SuperSegger can track cells over time and provide information on growth speed and cell genealogy. Oufti, MicrobeJ, Morphometrics and ObjectJ estimate the cell length and curvature over the longitudinal axis. MicrobeJ offers a range of options for detection and counting of cell chains and clumps, while both MicrobeJ and ObjectJ offer options to detect cell features such as curvatures or invaginations as specified by the user. Finally, both SuperSegger and MicrobeJ give users the option to group cells based on user‐specified cell features. All programs offer some options for manual editing of the results. In Oufti, a user can split or join cells, delete cells and draw new cell outlines. In Morphometrics, MicrobeJ and ObjectJ, it is also possible to delete or add cells. For both Morphometrics and Oufti, it is not possible to move septa to a manually chosen subcellular location. In MicrobeJ this is possible, just as ObjectJ's ChainTracer allows users to check, add and delete detected septa manually. Also in SuperSegger, it is possible to delete cells, but it is only possible to delete or add septa on pre‐calculated positions. The right panel shows which program performs cell segmentation best on which kind of shaped cells in our experience [Colour figure can be viewed at https://www.wileyonlinelibrary.com]
Figure 4
Figure 4
BactMAP output of the segmentation and origin localization of three differently shaped bacteria. (a) For all three bacteria; a cutout of the raw image file with an overlay of the cell segmentation and detected fluorescent spots is shown. The raw images, segmentation data and spot detection data was loaded into R using BactMAP's extr.‐functions, and the overlay images where created using bactMAP::plotRaw(). (b) Cell towers showing the x,y‐projection of the origin/ParB inside the cell. The five groups are divided by cell length and contain an equal number of cells. Localizations are displayed as a heatmap; brighter color indicates more localization in this x,y position. (c) Projection of the localization of the origin/ParB on the longest axis of the cell, where all cells are ordered by cell length [Colour figure can be viewed at https://www.wileyonlinelibrary.com]
Figure 5
Figure 5
Single‐cell time‐lapse analysis of the replication fork and FtsZ in Streptococcus pneumoniae. (a) Kymographs of a single cell (strain MK396, dnaX::dnaX‐GFP‐eryR, ftsZ::ftsZ‐RFP‐kanR) imaged every 20 s for 1 hr. Cell outlines recorded with Oufti and combined with the raw image data using BactMAP. Left/right of the kymographs are movie strips of the single cell, created with BactMAP. (b) Trajectory over the length axis of the cell over time of FtsZ‐RFP bundles and DnaX‐GFP foci in the same cell as shown in (a). Foci/bundles were tracked with iSBatch. (c) x/y trajectory over time of the cell shown in (a) and (b). Outlines recorded with Oufti, tracks recorded with iSBatch. (d) The growth curves of all cells were determined and curves of non‐growing cells and cells with incomplete cell cycles were discarded. Cell parameters were binned in ten groups by % of division. Bottom: average intensity of GFP signal over the length axis of the cell per % of division. Top: density plots of x/y coordinates of recorded GFP foci per binned % of division. x/y coordinates were recorded with iSBatch, cell outlines with Oufti and the raw image files were used by BactMAP to determine the average intensity per bin. (e) Clustering results: average cellular intensity over division percentage. Mean cellular fluorescence intensity (arbitrary units) over percentage of division (pink, standard deviation in shade), with single‐cell fluorescence intensity paths shown in grey. Top‐bottom shows each cluster, the number of clusters (N) and the percentage of the total number of cells (%). (f) Average intensity profile. Average intensity of the length axis of the cell binned in 10 groups based on percentage of division for each of the three clusters (top‐bottom). (g) Single cells. Example kymographs of single‐cell members of each cluster. (h) Schematic models of the various dynamics that were observed for pneumococcal DnaX [Colour figure can be viewed at https://www.wileyonlinelibrary.com]

References

    1. Bannon, D. , Moen, E. , Borba, E. , Ho, A. , Camplisson, I. , Chang, B. , … Van Valen, D. (2018). DeepCell 2.0: Automated cloud deployment of deep learning models for large‐scale cellular image analysis [preprint]. bioRxiv. 10.1101/505032 - DOI
    1. Berg, S. , Kutra, D. , Kroeger, T. , Straehle, C. N. , Kausler, B. X. , Haubold, C. , … Kreshuk, A. (2019). ilastik: Interactive machine learning for (bio)image analysis. Nature Methods. 10.1038/s41592-019-0582-9 - DOI - PubMed
    1. Caldas, V. E. A. , Punter, C. M. , Ghodke, H. , Robinson, A. , & van Oijen, A. M. (2015). iSBatch: A batch‐processing platform for data analysis and exploration of live‐cell single‐molecule microscopy images and other hierarchical datasets. Molecular BioSystems, 11, 2699–2708. 10.1039/C5MB00321K - DOI - PubMed
    1. Cass, J. A. , Stylianidou, S. , Kuwada, N. J. , Traxler, B. , & Wiggins, P. A. (2017). Probing bacterial cell biology using image cytometry. Molecular Microbiology, 103, 818–828. 10.1111/mmi.13591 - DOI - PMC - PubMed
    1. de Jong, I. G. , Beilharz, K. , Kuipers, O. P. , & Veening, J.‐W. (2011). Live cell imaging of Bacillus subtilis and Streptococcus pneumoniae using automated time‐lapse microscopy. Journal of Visualized Experiments, 53, e3145 10.3791/3145 - DOI - PMC - PubMed

Publication types