Abstract
The motility of macrophages in response to microenvironment stimuli is a hallmark of innate immunity, where macrophages play pro-inflammatory or pro-reparatory roles depending on their activation status during wound healing. Cell size and shape have been informative in defining macrophage subtypes. Studies show pro and anti-inflammatory macrophages exhibit distinct migratory behaviors, in vitro, in 3D and in vivo but this link has not been rigorously studied. We apply both morphology and motility-based image processing approaches to analyze live cell images consisting of macrophage phenotypes. Macrophage subtypes are differentiated from primary murine bone marrow derived macrophages using a potent lipopolysaccharide (LPS) or cytokine interleukin-4 (IL-4). We show that morphology is tightly linked to motility, which leads to our hypothesis that motility analysis could be used alone or in conjunction with morphological features for improved prediction of macrophage subtypes. We train a support vector machine (SVM) classifier to predict macrophage subtypes based on morphology alone, motility alone, and both morphology and motility combined. We show that motility has comparable predictive capabilities as morphology. However, using both measures can enhance predictive capabilities. While motility and morphological features can be individually ambiguous identifiers, together they provide significantly improved prediction accuracies (75%) from a training dataset of 1000 cells tracked over time using only phase contrast time-lapse microscopy. Thus, the approach combining cell motility and cell morphology information can lead to methods that accurately assess functionally diverse macrophage phenotypes quickly and efficiently. This can support the development of cost efficient and high through-put methods for screening biochemicals targeting macrophage polarization.
Introduction
Macrophages reside in or are recruited to all tissues in the body. They play an important role in tissue hemostasis and are an essential part of the human defense system. In wound healing, they are among the first cell types to traffic to the wound. They form an immune defense line, promote, and resolve inflammation, remove dead cells, and cell debris, and support cell proliferation and tissue restructure [1, 2]. There exists a continuum of macrophage functions [3, 4], which have been historically binned into two categories with primarily pro-inflammatory and anti-inflammatory functions, respectively. The two major groups of macrophages that display different functional phenotypes present in the wound bed are referred to as classically activated (pro-inflammatory) and alternatively activated (anti-inflammatory) macrophages. During the inflammation phase, several mediators such as bacterial products like lipopolysaccharide (LPS) and inflammatory cytokines like interferon (IFN)-γ can stimulate macrophages to differentiate into pro-inflammatory status [5, 6]. Pro-inflammatory macrophages exhibit antimicrobial properties through the release of inflammatory mediators inducing tumor necrosis factor (TNF)-α, IL-1β, nitric oxide (NO) and interleukin (IL)-6 [7]. Prolonged persistence of pro-inflammatory macrophages without transitioning to anti-inflammatory phenotypes, however, is rather detrimental to wound tissues, which will likely stall, or delay wound healing [8, 9]. On the other hand, macrophages activated by IL-4 and IL-13 develop into so-called alternatively activated macrophages (anti-inflammatory) that suppress inflammatory reactions and adaptive immune responses and play a reparative role during the proliferation and maturation phases [10]. However, like pro-inflammatory macrophages, if anti-inflammatory macrophages persist for too long hypertrophic scars and keloids develop due to excessive collagen production [11, 12].
The involvement of macrophage phenotypes in the wound healing process indicates that detecting macrophage status could be diagnostically useful. However, advances in the field have been hampered, largely due to lack of definitive and optimal biomarkers for macrophage phenotypes. Traditionally, characterization of pro and anti-inflammatory subtypes is carried out by quantification of multiple cell surface markers, transcription factors and cytokine profiles. These approaches are time-consuming, require large numbers of cells/tissues and are resource intensive. Difficulty detecting pro and anti-inflammatory macrophage phenotypes in vivo is compounded by similar problems in in vitro-derived macrophages. For example, Arginase-1, which is considered a classic marker for anti-inflammatory macrophages, is also upregulated in pro-inflammatory macrophages [13, 14] and protein expression of Arginase-1 or CD206 is too low for reliable flow cytometry detection [4, 5, 11, 15]. In conclusion, a more robust discriminating system is critically needed to improve the detection and understanding of macrophage phenotypes and their relation to their function.
Because of these distinct roles, macrophages undergo a precisely regulated dynamic transition in their functionalities in time and space. The ability to precisely regulate macrophage distribution, migration, and function polarization (i.e., pro vs. anti-inflammatory macrophages) that spatial-temporally corresponds to wound status offers a powerful approach to regulate wound healing. The immune response involves temporal tracking of the migration of different immune cell types in the wound. When tracking wound healing, we can use morphology and motility to track different cell types and train an algorithm to look for patterns in cellular responses characterized by identifiers, such as location (e.g., near blood vessels) or nearest cell type neighbors.
Macrophages undergo morphological changes when undergoing a change in phenotype [2]. Studies have shown that cell shape can help control macrophages—for instance, elongating them promotes behavior that enhances healing [1]. While cell size and shape have been used to characterize macrophage subtypes, how motility properties are contributing to such quantifications are not well studied, despite pro and anti-inflammatory macrophages exhibiting distinct migratory behaviors.
Machine learning methods have been successfully applied to automate the classification of different cell types from microscopy images [16, 17] and are viewed as a promising approach to high-through put screening. However, these methods are sensitive to the size of the data set, quality of the images, and sometimes facilitated by fluorescent dyes or reporters [18]. Previous work towards classifying macrophage subtype using machine learning leverages fluorescent dyes [19, 20]. Being able to identify cell types from phase contrast microscopy would simplify and accelerate macrophage classification. Furthermore, being able to identify cells based on their motility parameters can eliminate the need for high-quality imaging and result in methods robust to blurred images. We suspect that cell motility like cell morphology is linked to function. Cell tracking can be achieved with image processing techniques in real-time [21]. Motility patterns can be extracted from cell trajectories and machine learning used to classify cells based on their dynamic behavior. Finally, combining cell motility and morphological features can help elucidate the link between cell migratory behavior, morphology, and cellular phenotype.
Here we apply machine learning methods to classify macrophage subtypes and show a tight relationship between cell morphology and its motile behavior. We begin by first validating that our derived macrophage subtypes do present distinct morphological characteristics as has been shown in previous work. Morphological analysis of the label-free collective dataset suggests macrophage shapes are described by three principal shape modes. Clustering analysis is applied to identify the cells belonging to each of these three morphological groupings. Comparison with the labeled data confirms a correlation between macrophage subtype and morphology. Next, we show that independent of cell labels, there is a strong relationship between morphology and motile behavior. Motility features are computed within each cluster showing that distinct morphological features map to distinct cell motility parameters. We then apply discriminant analysis to confirm that this implies a relationship between the labeled cells with respective phenotypes and motility parameters, thereby, supporting the hypothesis that we can predict macrophage subtypes from motility behavior alone. Finally, to predict macrophage subtypes with machine learning, we propose a SVM classification model. We build multiple predictive models using morphological and motility parameters alone and in combination to predict the macrophage subtypes. A high-level schematic of the analysis carried out in this work is shown in Fig 1. We demonstrate predictions using motility are comparable to those using morphology and are equally good for the same subtype. This suggests that while they are tightly linked, they may in fact provide complementary information. We show that a combined use of motility and morphology shows an increased prediction accuracy in identifying macrophage subtypes. Hence, by combining both cell motility and morphological information we show that we can reliably detect non-activated naïve macrophages, or macrophages activated by either lipopolysaccharide (LPS) or interleukin 4 (IL-4) exposure at single-cell level.
Materials and methods
Isolation and culture of bone marrow-derived macrophages
The mouse strains used in this study were of the C57BL/6 background, and both male and female mice were included in the experiments. Mice were procured from Jackson Labs and housed under a strict 12-hour light cycle with a regular chow diet in a specific pathogen-free facility at the University of California (UC), Davis. This study was conducted in strict accordance with the recommendations outlined in the Guide for the Care and Use of Laboratory Animals of the National Institutes of Health. The protocol was reviewed and approved by the Committee on the Ethics of Animal Care and Use at the University of California, Davis (Protocol #21531). An Institutional Review Board (IRB) review is not required for this study as no human tissue or data were involved. Bone marrow-derived macrophages (BMDMs) were generated using standard procedures as previously described [22]. Mice were euthanized using a CO2 chamber and then subjected to cervical dislocation to ensure minimal suffering. The femurs were aseptically dissected, and the bone marrow was flushed with cold Dulbecco’s phosphate-buffered saline without calcium and magnesium (DPBS). Given the endpoint nature of these experiments, no anesthesia or analgesia was applied. Bone marrow from 3–6 mice was pooled per batch to account for biological variability. The harvested bone marrow cells were cultured in DMEM (Invitrogen) supplemented with 10% Fetal Bovine Serum (Invitrogen), 1× Antibiotic-Antimycotic solution (Invitrogen), and 20% L-929 conditioned medium for six days, with an additional feeding on day 3, followed by a one-day culture without the conditioned medium. Adherent macrophages were harvested by gently scraping with a “policeman” cell scraper and used in subsequent experiments as needed. Cell viability was determined using trypan blue staining and counting. This study utilized at least four batches of BMDMs, derived from a total of 20 mice of mixed gender, generated at different times.
Activation of bone marrow-derived macrophages
In each experiment, bone marrow-derived macrophages (BMDMs) were seeded into six tissue culture-treated well plates at varying densities and cultured in RPMI-1640 medium (Invitrogen) supplemented with 10% Fetal Bovine Serum (FBS) (Invitrogen) and 1× Antibiotic-Antimycotic solution (Invitrogen) overnight. For M1 activation, 100 ng/ml lipopolysaccharide (LPS) (Sigma, Cat number: L6143) was added to the culture medium, while for M2 activation, 20 ng/ml recombinant mouse interleukin-4 (IL-4) (R&D Systems, Cat number: 404-ML) was used [23]. Two days post-stimulation, activated M1 and M2 macrophages were employed for morphological and motility characterizations as well as functional studies. Macrophages that did not receive any stimulation served as M0 controls.
Time-lapse recording
In each experiment, freshly differentiated macrophages were seeded in 24-well tissue culture-treated plates, cultured, and activated following the procedures described above. Forty-eight hours after stimulation, cells were monitored using a Carl Zeiss Observer Z1 inverted microscope outfitted with a motorized stage and an incubation chamber (37°C and 5% CO2). Time-lapse contrast images were captured using the MetaMorph program (Molecular Devices) with a Retiga R6 (QImaging) scientific CCD camera (6 million, 4.54 μm pixels). Typically, in each experiment, four fields of each condition were selected from different wells under a long-distance 20× objective lens. Images were taken at 5-minute intervals for up to 3 hours unless stated otherwise. We note that in some experiments, certain wells were designated for control purposes or other specific experimental requirements, and thus, they were excluded from the imaging process. In practice, to ensure the quality of our data, we exclude out-of-focus images, retaining only the most suitable ones for subsequent morphological analysis.
Cell segmentation and tracking
The input images are segmented and tracked in a semi-autonomous fashion using the Baxter Algorithms software package [24, 25] written in Matlab. This program segments the cells and tracks them throughout each frame. It computes the 2D coordinates of a cell in each frame along with its region properties.
Computing speed and persistence
The speed and persistence are computed at each using the following formula: The speed of a cell from trajectory points (x1, y1) to (xn, yn) where n is the total length of time frames, could be any point from 2 to last time frame point, d is the total distance travelled, t is the time travelled given by:
(1) |
Persistence is a measure to quantify the length of a cell’s path along its entire time to know if a cell has remained closer to its initial time frame trajectory point or if it has moved farther away. It is defined as the ratio of the shortest distance traveled p between the initial point (x1, y1) and the nth time frame point (xn, yn) to the total distance traveled by the cell d given by:
(2) |
Results
Generation and polarization of primary murine macrophages
Bone marrow-derived macrophages (BMDMs) are primary macrophages that are differentiated from bone marrow cells [26, 27]. Murine BMDMs present an excellent model and are widely used as prototypical macrophages for investigation of mammalian macrophage functions in vitro. We isolate bone marrow from freshly cut femur bones of C57/BL6 mice. Four batches of bone marrow-derived macrophages were generated, each batch consisting of a mixture of bone marrow from 3–6 mice. In total, bone marrow from 20 mice was used for these experiments. In each experiment we grow bone marrow cells in the presence of murine macrophage colony-stimulating factor (M-CSF), as provided by supplementary L929-conditioned medium [28]. Within 6 days, the bone marrow monocyte progenitors proliferate and differentiate into a homogenous population of mature macrophages (M0). Subsequently, naïve M0 macrophages are further polarized into pro-inflammatory or anti-inflammatory macrophages by addition of bacterial lipopolysaccharide (LPS) or murine interleukin 4 (IL-4), respectively [23] (S1A Fig). To simplify notation in the manuscript, we refer to pro-inflammatory macrophages as M1 and anti-inflammatory macrophages as M2. See the methods for details on the protocols used to differentiate macrophages into their respective phenotypes and the supplementary information for results of validation assays confirming three distinct phenotypes based on the literature. Validation assays include phagocytic capacity and quantitative PCR to determine the relative mRNA expression of a panel of selected target genes and transcription factors (see S2 Table for target genes and primers used in q-PCR).
Generation of time-series data capturing spontaneous cell migratory patterns
Using time-lapse microscopy, we generate multiple sets of M0, M1, and M2 images, named after their most representative macrophage subtypes, taken at 5-minute intervals for up to 3 hours (S2 Fig). These are the phase contrast images without ground truths or cell labels except the image names based on culturing conditions. Although the macrophages are traditionally binned into three subtypes, they exist on a continuous spectrum, i.e., some cells may be “in-between” identified subtypes, hence we note that the parent images may contain cells of the other morphological subtypes with respect to their labels. In the current analysis, we look mainly for the dominant representations. Cell segmentation and tracking details can be found in the methods section. After cell segmentation and tracking, we select the cells that remain in the image dataset’s time-lapse for at least 1 hour. This action allows us to eliminate cells that exit the image area within less than 1 hour of their lifespan along the time series. For the characterization of cell subtypes, we compute cell morphology parameters using the first-time step and determine motility parameters based on time-lapse data. Following this, our time-lapse image datasets resulted in the identification of a total of 1018 distinct cells. These cells comprised 251 cells from M0 images, 369 cells from M1 images, and 398 cells from M2 images.
Three principal shape modes characterize observed macrophage morphologies
We extracted and aligned [29] label-free phase contrast images of a mixed population of live macrophages. To identify the existing principal shape modes, we consider each cell in every frame of the time-lapse datasets as individual data points (n = 2329 cells). We obtain the shape information for M0 (n = 965 cells), M1 (n = 698 cells) and M2 (n = 666 cells) (S3B Fig). These shape modes provide a meaningful and concise quantitative description of macrophage morphology, providing significant insights that may underly macrophage phenotypes and functionalities depending on their activation status.
Morphological characterization of macrophage phenotypes
Macrophages are multifaceted, which is determined by the surrounding microenvironment, as well as multifunctional depending on their activation status, which assumes a variety of cell shapes. BMDMs when cultured in vitro and stimulated with cytokines to induce M1 or M2 polarization, displayed markedly different cell morphologies [30]. While unstimulated M0 macrophages show a round or slightly stretching appearance, addition of LPS, which stimulate M1 polarization, cause cell spreading with multiple protrusions within just 24 h of stimulation. In contrast, addition of IL-4, which stimulate M2 polarization, led to cell elongation (S4A Fig). Quantitative analysis using Celltool [31] confirmed these three orthogonal modes of shape variability, which account for 86% of the total variation in shapes observed (see Supplementary information). The existence of only a few meaningful modes in combined macrophage populations implies that the phase space which macrophages reside is in a relatively limited subregion of the space of all possible shapes. In the literature, researchers have used various metrics to describe cell shape [31, 32]. There are several cell shape metrics like the cell area, perimeter length, convex area, major/minor- axis length, and many other. The best choice of metrics depends on the class of cell shapes that are found in the dataset. Here we aim to characterize and quantify the three primary shape modes identified above —circular (mode 1), “with protrusions” shape (mode 2), and elongated (mode 3) through clearly defined morphological parameters. Different combinations and number of parameters were explored. We utilized the following three parameters to characterize the morphological features of macrophage phenotypes, particularly given their uneven boundaries: compactness—to identify the complex and irregular boundaries of the cells; eccentricity—to quantify cell elongation; and solidity—to determine cell density. The combination of compactness, eccentricity, and solidity provided valuable and independent information to describe and differentiate the three primary shape modes identified within the combined macrophage populations.
In S4 Fig, we present examples of shape parameter values for the three major cell shapes, showcasing low, medium, and high parameter values for each shape. These parameter values effectively differentiate between the three primary shape modes and demonstrate the sufficiency of their combination for shape identification. Fig 2 describes and defines these parameters calculated based on the number of pixels in a cell, its boundaries, the distances between them, and the cell trajectories. For the morphological characterization of macrophage subtypes, we take the unsupervised learning approach where the cells are not labeled as M0, M1, and M2 from their image names. We perform k-means clustering [33] with an optimal k value of 4 derived using silhouette score [34] on the three morphological parameters compactness, eccentricity, and solidity to understand the shape of the macrophages. The silhouette coefficient score plot and the silhouette plots for various k-values are shown in (S5 Fig). Fig 3A shows the cluster assignment for the cells within the three-dimensional space of their morphological parameters’ compactness, eccentricity, and solidity. The identified 1018 cells from parent images M0, M1 and M2 are distributed into four clusters. The following observations are made about each cluster where the data points are represented as swarm plots [35, 36] (Fig 3B–3D):
Cluster 0: The cluster of cells with the lowest eccentricity values, highest compactness values, and highest solidity values indicates that the cells in this group are mostly circular, have smooth boundaries with little or no irregular boundaries, and are dense (regular boundaries without any visible holes within the cell structure). S4C Fig shows an example cell from this cluster, along with their corresponding eccentricity, solidity, and compactness values.
Cluster 1: The cluster of cells with the lowest eccentricity values, lowest compactness values, and lowest solidity values suggests that the cells in this group are closer to being circular in shape, have highly irregular boundaries, and lack density, potentially due to their irregular boundaries or the presence of holes within the cell. S4B Fig shows an example cell from this cluster, along with their corresponding eccentricity, solidity, and compactness values.
Cluster 2: The cluster of cells with higher eccentricity values, above-average compactness values, and higher solidity values suggests that the cells in this group are closer to being elliptical in shape, have relatively smoother boundaries, and are dense (regular boundaries without any visible holes within the cell structure). S4A Fig shows an example cell from this cluster, along with their corresponding eccentricity, solidity, and compactness values.
Cluster 3: The cluster of cells with higher eccentricity values, lowest compactness values, and solidity values ranging from least to average suggests that the cells in this group are elliptical in shape, have highly irregular boundaries, and are not densely packed. In S7 Fig, we present examples of cells from each cluster. Cluster 3 contains 333 cells, with 28% from M0, 41% from M1, and 31% from M2 images. Our analysis revealed that this cluster includes indifferent groupings, cell overlapping, or transitional cells. The shape of these cells does not align with any of the primary modes identified in the principal component analysis.
From the above observations, we can describe cells in Cluster 0 as circular cells, cells in Cluster 1 as the cells with protrusions, and cells in Cluster 2 as the elongated cells.
Motility patterns can be used to differentiate cell morphology-based groups
We would like to show that the chosen displacement metrics of speed and persistence can be used to differentiate cell groups based on morphology. To do this we apply discriminant analysis, a multivariate technique, to separate two morphology-based groups based on measured speed and persistence. This helps to identify the contribution of each variable in separating the groups. Here, we show that a cell’s morphological features are in fact linked closely to its motile behavior. This relationship exists independent of the macrophage subtype. For this we leverage each of the unique cells identified above in clusters and quantify their corresponding motility patterns. To investigate this relationship, we identify a minimum set of motility parameters that capture the set of observed migratory behavioral patterns. We compute speed and persistence (a measure to find how far a cell has moved from its initial time step) for all the cells in clusters 0–2 (Fig 4A).
We use the Gaussian process regressor (GPR) model [32, 37] to plot the speed and persistence of the cells. The GPR model utilizes a Gaussian process to model the distribution of the data and predict outcomes based on the observed data points. In Fig 4, each cluster’s results are depicted using a distinct color. The GPR model’s mean is represented by a solid line, while the average value computed from the data at each time point is indicated by dashed lines. Additionally, the band in the plot represents a 95% confidence interval. Fig 4A indicates that the speed of cells in Cluster 1 (protruded cells) is the highest, followed by the speed of cells in Cluster 2 (elongated cells), and the lowest speed is observed for cells in Cluster 0 (circular cells). Fig 4B displays that the cells in Cluster 2 exhibit the highest persistence, followed by Cluster 0, with the lowest persistence observed for the cells in Cluster 1. Combining the motility parameters analysis with morphological clustering analysis, we observe that circular cells move slower and stay close to their initial time frame position; protruded cells move faster but still stay close to their initial time frame position; whereas elongated cells move slower but reach farther away from their initial time frame position. For Cluster 3 cells, which exhibited indifferent cell groupings or overlapping cells, we can observe that their speed falls between Cluster 1 and the remaining clusters. Also, these cells display a high persistence level, as observed in Cluster 2 cells.
To better visualize and quantify the relationship between cell morphology and motility we perform quadratic discriminant analysis on the motility parameters speed and persistence for the clusters from the morphological clustering analysis. This analysis provides a binary classification based on two input features (i.e., speed and persistence). With this method we can determine to what extent we can predict the cells cluster of origin (e.g., predict morphological characteristics) based on its computed speed and persistence (Fig 4, showing the results for various pairs of classification labels). We perform 5-fold cross-validation and calculate the mean accuracy. Classification accuracy percentages confirm that the Cluster 1 (protruded cells) can be distinguished from the Cluster 0 (circular cells) and Cluster 2 (elongated cells) combined or independently using the speed and persistence motility parameters (Fig 4C, 4D and 4F). However, the classification accuracy percentage between Cluster 0 (circular cells) and Cluster 2 (elongated cells) is comparatively lower around 61% (Fig 4E). The ability to predict morphological features based on cell motility imply a strong relationship between the two.
Motility characterization can be used to predict macrophage subtypes
We have shown that macrophage subtypes can be predominantly characterized by specific combinations of morphological features. Additionally, we have shown evidence to suggest that there is a relationship between motile behavior and morphology. Thus, we expect that macrophage subtypes should exhibit distinct motile behavior. To demonstrate that motility can be used as a substitute for morphological features, we quantify motile behavior for each cell from the cell tracking results by computing speed and persistence for each macrophage subtype given by the parent image label and taking a supervised learning approach. Based on this motility parameter analysis given in (S6A and S6B Fig), we find that M0 cells move slower and stay close to their initial time frame position; M1 cells move faster and but still stay close to their initial time frame position; whereas M2 cells move slower and reach farther away from their initial time frame position. These motility observations can act as an independent model in the identification of the macrophage subtypes without analyzing the morphology of the cells. Quadratic discriminant analysis is also performed (S6C–S6F Fig) to quantify the motility of the cells in M0, M1 and M2 images. We note that the mean accuracies are the same or worse when compared to those using cluster labels due to the heterogeneity observed for each parent label based on cell culturing protocols. Recall that the three orthogonal modes of shape variability account for 86% of the total variation in shapes observed. Furthermore, approximately 30% of the cells were placed into Cluster 3, which included cells with mixed or ambiguous features. Thus, a classification accuracy of around 70% should be considered formidable when using only morphology. Below we investigate accuracies achieved with motility information alone and combined information, respectively.
Increased prediction accuracy of macrophage subtype is obtained using both morphological and motility features
We note that in the previous analysis some macrophage subtypes are more easily distinguished by motility parameters and others by morphological features. Thus, we expect that combining both morphological and motile behavior can improve our ability to classify macrophage subtypes. The advantage of this would be an ability to classify macrophage subtypes using only phase contrast images. Additionally, we present a generalizable machine learning model to properly compare predictive capabilities based on both motility and morphology independently and combined. We compute eccentricity, compactness, and cell size to observe morphological features, and convex hull area of cell trajectory, speed, and persistence to extract motility features for all cells in M0, M1, and M2 images (Fig 5). For our machine learning classifier, we consider a support vector machine (SVM) [38] model, which can deliver high precision and accuracy regardless of the number of attributes and data instances [35]. We have 1018 cells from all the image sets where 251 are from M0 images, 369 from M1 images and 398 from M2 images. We shuffle the data and use stratified 5-fold cross-validation. During each iteration, the dataset was divided into approximately [200, 296, 318] cells for M0, M1, and M2 classes in training and [73, 80, 55] cells for M0, M1, and M2 classes in testing sets. We now use Synthetic Minority Oversampling Technique (SMOTE) [36] to balance the minority classes M0 and M1. The final training dataset has 954 datapoints, with 318 datapoints from each of the M0, M1, and M2 image classes. We fit the training data using SVM classifier -radial basis function (RBF) kernel and predict the output on the test data where the output of the model is the macrophage subtype given by the parent image label. Fig 5A shows the schematic of the machine learning model with the features, input labels and the expected output. To demonstrate that the combination of morphology and motility enhances the classifier prediction, we develop three models. The first model is trained using only morphological features (eccentricity, compactness, cell size) as inputs. The second model is trained using only motility features (convex hull area of cell trajectory, speed, persistence) as inputs. The third model is trained using both morphological and motility features as inputs. The results are shown in Fig 5B–5D, where the prediction accuracy of the model on test data is plotted in a confusion matrix, where rows represent the actual labels and columns represent the predicted labels. The morphology trained model showed that the prediction accuracies for M0, M1 and M2 labelled cells are 52%, 69% and 70% respectively (Fig 5B). While the motility trained model had the prediction accuracies for M0 (48%) and M1 (68%), M2 cells (71%) (Fig 5C). Strikingly, the combined morphology and motility trained model significantly improved prediction accuracies for all the M0, M1 and M2 cells to 60%, 72% and 74% respectively (Fig 5D). Hence, by using the combined morphological and motility parameters we can predict the macrophage subtypes with an improved accuracy compared to the models which use either morphology or motility alone (S1 Table). For reference, when analyzing individual biomarkers in flow cytometry, we note that achieving a prediction accuracy of 74% is considered high, owing to variability in biomarker expression influenced by experimental context [39]. Thus, the prediction accuracies obtained are meaningful within a biological context and support the claim that there exists a relationship between cell motility, cell morphology, and macrophage subtypes.
Discussion
It is well known that macrophages cannot be cleanly grouped into their subtypes, and in fact, various intermediate subtypes exist, yet their artificial classification is important to understanding gene regulatory pathways involved in the various functions carried out by the full spectrum of macrophage phenotypes [40]. Such understandings can help establish ways to target and control their activity to improve health outcomes in applications such as wound healing.
Image-based methods provide a fast and efficient way to classify macrophage subtypes. Previous work has focused on machine learning methods for predicting macrophage subtypes based on morphology [19, 30]. Machine learning effectively substitutes the manual classification of cell phenotype by researchers and clinical practitioners and offloads the decision-making to an algorithm. The reasons automated image processing, segmentation, and analysis have found such interest are that they offer huge possibilities to free up researchers’ time and to ensure consistent interpretation of results free from any human bias. Prediction methods that rely on cell morphology require high-quality images to be able to accurately segment cells and characterize their morphology. In this work, we show that spontaneous cell motility patterns can also serve as unique signatures for macrophage subtypes. Furthermore, an impressive amount of cell tracking algorithms [41], benchmark techniques [42, 43] and software [13–15, 44, 45] have been developed and made available to the scientific community which are more ubiquitous and robust to blurry images. However, we note that it can be a complex task to extract the morphology of a cell if it were to be suspended rather than spontaneously moving on a substrate. We also recognize that the motility can be affected by the substrate itself [46]. This means that changing the substrate may require new characterization for predictions. However, this may imply that the different cell types move differently in different environments. We know the extracellular matrix changes over time in wound healing, which allows different cell types to carry out their work.
Independently, motility and morphological features can provide ambiguous discriminant information depending on the macrophage subtype. For example, the prediction accuracies derived from motility-based information closely match those obtained through morphology-based predictions. Thus, combining both cell motility and morphological information can reliably and independently detect non-activated naïve macrophages, or macrophages activated by either lipopolysaccharide (LPS) or interleukin 4 (IL-4) exposure at single-cell level. Furthermore, the numerous metrics applied to characterize the morphology and migration patterns are simplified representations (e.g. information is lost). One may consider exploring ML methods to extract patterns with nuanced information from the raw data.
We note that the images used for analysis required that cell densities remain low. We noted that some of the cells in cluster 3 could likely be clusters of cells that are identified as a single cell due to the segmentation regions formed when the cells are very close to each other. Further improvement of the segmentation algorithm to correctly identify the high-density cell regions and post-processing methods to remove the cells for analysis beyond a particular cell area, might lead some of these cells to get distributed in the above three clusters. Additionally, Cluster 3 also seemed to include cells that had combined features from two or more of the remaining clusters. Thus, Cluster 3 may include macrophages that are in a transient state between subtypes or may represent an ambiguous state not yet explored. The methods in this paper could potentially be used to further understand the full spectrum of macrophages and track potential shifts in macrophage subtypes over time. Furthermore, a future adaptation of this method can be used in bioengineering applications to characterize and quickly screen genetic variants such as in engineered CAR-Macrophages [47].
Conclusion
In this paper, we present that using image processing techniques, we can characterize cell behavior and migratory patterns that can be fed into our machine-learning model to predict macrophage subtypes. While we recognize that other methods such as flow-cytometry can offer improved accuracy in macrophage classification [39], our method has the advantage of being non-invasive. It does not require cell fixation or labeling, preserving cell viability for further functional assays. Additionally, this approach allows for real-time analysis. The ability to assess macrophage polarization through dynamic migration and morphology changes offers insights into the real-time behavior of cells in response to various stimuli. Our method also has the potential for high-throughput screening. Once fully optimized, it could facilitate high-throughput screening of biochemical effects on macrophage polarization, providing a valuable tool for both basic research and drug discovery. Analysis of these dynamics without any external cues given like electrical guidance and staining would give us insights that are critical to quantifying macrophage recruitment and activation in vivo. In future work, this analysis could also be applied to the images in galvanotaxis to observe the dynamics of the cell behavior with and without electric fields. Furthermore, a direct comparison between fixed tissue analysis and flow cytometry, could enhance understanding of the potential applications of our approach. While this comparison was not conducted in the current study due to its exploratory nature and focus on developing the machine learning model, this is a potential direction for future research. Finally, this method can be adapted to serve other cell types and applications but may require identifying more suitable morphological and displacement metrics where applicable.
Supporting information
Data Availability
The complete dataset is available at https://datadryad.org/stash/share/vrQi68_C27sbdkP2uAXUE8kvy_BxlYkRImI5f6_9WY 0 with a metadata file accompanying the dataset. The source code required to reproduce the findings of this study has been uploaded to the following GitHub repository: https://github.com/Gomez-Lab/CellAnalysis.
Funding Statement
This research is sponsored by the DARPA Biotechnologies Office (DARPA/BTO) and was accomplished under Cooperative Agreement Number DC20AC00003. Parts of the experiments in the Zhao lab were supported by 5R21AI156409, AFOSR MURI grant FA9550-16-1-0052, and DURIP FA9550-22-1-0149. The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.
References
- 1. Wynn TA, Vannella KM. Macrophages in Tissue Repair, Regeneration, and Fibrosis. Immunity. 2016;44:450–462. doi: 10.1016/j.immuni.2016.02.015 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 2. Krzyszczyk P, Schloss R, Palmer A, Berthiaume F. The Role of Macrophages in Acute and Chronic Wound Healing and Interventions to Promote Pro-wound Healing Phenotypes. Frontiers in Physiology. 2018;9:419. doi: 10.3389/fphys.2018.00419 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 3. Martinez FO, Gordon S. The M1 and M2 paradigm of macrophage activation: time for reassessment. F1000Prime Reports. 2014;6:13. doi: 10.12703/P6-13 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 4. Atri C, Guerfali FZ, Laouini D. Role of Human Macrophage Polarization in Inflammation during Infectious Diseases. International Journal of Molecular Sciences. 2018;19. doi: 10.3390/ijms19061801 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 5. Mosser DM, Edwards JP. Exploring the full spectrum of macrophage activation. Nature Reviews Immunology. 2008;8:958–969. doi: 10.1038/nri2448 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 6. Gordon S. Alternative activation of macrophages. Nature Reviews Immunology. 2003;3:23–35. doi: 10.1038/nri978 [DOI] [PubMed] [Google Scholar]
- 7. Murray PJ, Wynn TA. Protective and pathogenic functions of macrophage subsets. Nature Reviews Immunology. 2011;11:723–737. doi: 10.1038/nri3073 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 8. Zhao R, Liang H, Clarke E, Jackson C, Xue M. Inflammation in Chronic Wounds. International Journal of Molecular Sciences. 2016;17. doi: 10.3390/ijms17122085 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9. Hesketh M, Sahin KB, West ZE, Murray RZ. Macrophage Phenotypes Regulate Scar Formation and Chronic Wound Healing. International Journal of Molecular Sciences. 2017;18. doi: 10.3390/ijms18071545 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 10. Gordon S, Martinez FO. Alternative activation of macrophages: mechanism and functions. Immunity. 2010;32:593–604. doi: 10.1016/j.immuni.2010.05.007 [DOI] [PubMed] [Google Scholar]
- 11. Sindrilaru A, Scharffetter-Kochanek K. Disclosure of the Culprits: Macrophages-Versatile Regulators of Wound Healing. Advances in Wound Care. 2013;2:357–368. doi: 10.1089/wound.2012.0407 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 12. Vannella KM, Wynn TA. Mechanisms of Organ Injury and Repair by Macrophages. Annual Review of Physiology. 2017;79:593–617. doi: 10.1146/annurev-physiol-022516-034356 [DOI] [PubMed] [Google Scholar]
- 13. De Chaumont F, Dallongeville S, Chenouard N, Herve N, Pop S, Provoost T, et al. Icy: an open bioimage informatics platform for extended reproducible research. Nature methods. 2012;9(7):690–696. doi: 10.1038/nmeth.2075 [DOI] [PubMed] [Google Scholar]
- 14. Carpenter AE, Jones TR, Lamprecht MR, Clarke C, Kang IH, Friman O, et al. CellProfiler: image analysis software for identifying and quantifying cell phenotypes. Genome biology. 2006;7:1–11. doi: 10.1186/gb-2006-7-10-r100 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 15. Chalfoun J, Majurski M, Dima A, Halter M, Bhadriraju K, Brady M. Lineage mapper: A versatile cell and particle tracker. Scientific reports. 2016;6(1):36984. doi: 10.1038/srep36984 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 16. Meng N, Lam EY, Tsia KK, So HKH. Large-Scale Multi-Class Image-Based Cell Classification With Deep Learning. IEEE Journal of Biomedical and Health Informatics. 2019;23:2091–2098. doi: 10.1109/JBHI.2018.2878878 [DOI] [PubMed] [Google Scholar]
- 17. Gu Y, Zhang AC, Han Y, Li J, Chen C, Lo YH. Machine learning based real-time image-guided cell sorting and classification. Cytometry Part A. 2019;95(5):499–509. doi: 10.1002/cyto.a.23764 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 18. Shifat-E-Rabbi M, Yin XW, Fitzgerald CE, Rohde GK. Cell Image Classification: A Comparative Overview. Cytometry Part A. 2020;97:347–362. doi: 10.1002/cyto.a.23984 [DOI] [PubMed] [Google Scholar]
- 19. Rostam HM, Reynolds PM, Alexander MR, Gadegaard N, Ghaemmaghami AM. Image based Machine Learning for identification of macrophage subsets. Scientific Reports. 2017;7:3521. doi: 10.1038/s41598-017-03780-z [DOI] [PMC free article] [PubMed] [Google Scholar]
- 20. Pavillon N, Hobro AJ, Akira S, Smith NI. Noninvasive detection of macrophage activation with single-cell resolution through machine learning. Proceedings of the National Academy of Sciences of the United States of America. 2018;115:E2676–E2685. doi: 10.1073/pnas.1711872115 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 21. Emami N, Sedaei Z, Ferdousi R. Computerized cell tracking: Current methods, tools and challenges. Visual Informatics. 2021;5:1–13. doi: 10.1016/j.visinf.2020.11.003 [DOI] [Google Scholar]
- 22. Zhang X, Goncalves R, Mosser DM. The isolation and characterization of murine macrophages. Current Protocols in Immunology. 2008;Chapter 14:Unit 14 11. doi: 10.1002/0471142735.im1401s83 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 23. Ying W, Cheruku PS, Bazer FW, Safe SH, Zhou B. Investigation of macrophage polarization using bone marrow derived macrophages. Journal of Visualized Experiments. 2013. doi: 10.3791/50323 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 24. Magnusson KE, Jalden J, Gilbert PM, Blau HM. Global linking of cell tracks using the Viterbi algorithm. IEEE Transactions on Medical Imaging. 2015;34:911–929. doi: 10.1109/TMI.2014.2370951 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 25.Magnusson KEG. Segmentation and tracking of cells and particles in time-lapse microscopy. PhD dissertation, KTH Royal Institute of Technology. 2016;.
- 26. Weischenfeldt J, Porse B. Bone Marrow-Derived Macrophages (BMM): Isolation and Applications. Cold Spring Harbor Protocols. 2008;2008:pdb.prot5080. doi: 10.1101/pdb.prot5080 [DOI] [PubMed] [Google Scholar]
- 27. Marim FM, Silveira TN, Lima DS, Zamboni DS. A method for generation of bone marrow-derived macrophages from cryopreserved mouse bone marrow cells. PLoS One. 2010;5:e15263. doi: 10.1371/journal.pone.0015263 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 28. Englen MD, Valdez YE, Lehnert NM, Lehnert BE. Granulocyte/macrophage colony-stimulating factor is expressed and secreted in cultures of murine L929 cells. Journal of Immunological Methods. 1995;184:281–283. doi: 10.1016/0022-1759(95)00136-X [DOI] [PubMed] [Google Scholar]
- 29. Sun Y, Do H, Gao J, Zhao R, Zhao M, Mogilner A. Keratocyte fragments and cells utilize competing pathways to move in opposite directions in an electric field. Current Biology. 2013;23(7):569–574. doi: 10.1016/j.cub.2013.02.026 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 30. McWhorter FY, Wang T, Nguyen P, Chung T, Liu WF. Modulation of macrophage phenotype by cell shape. Proceedings of the National Academy of Sciences of the United States of America. 2013;110:17253–17258. doi: 10.1073/pnas.1308887110 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 31. Pincus Z, Theriot JA. Comparison of quantitative methods for cell-shape analysis. Journal of Microscopy. 2007;227:140–156. doi: 10.1111/j.1365-2818.2007.01799.x [DOI] [PubMed] [Google Scholar]
- 32.Williams CK, Rasmussen CE. Gaussian processes for machine learning. vol. 2. MIT press Cambridge, MA; 2006.
- 33.Sammut C. Encyclopedia of Machine Learning. Springer; 2010.
- 34. Rousseeuw PJ. Silhouettes: A graphical aid to the interpretation and validation of cluster analysis. Computational and Applied Mathematics. 1987;20:53–65. doi: 10.1016/0377-0427(87)90125-7 [DOI] [Google Scholar]
- 35. Osisanwo F, Akinsola J, Awodele O, Hinmikaiye J, Olakanmi O, Akinjobi J, et al. Supervised machine learning algorithms: classification and comparison. International Journal of Computer Trends and Technology (IJCTT). 2017;48(3):128–138. doi: 10.14445/22312803/IJCTT-V48P126 [DOI] [Google Scholar]
- 36. Chawla NV, Bowyer KW, Hall LO, Kegelmeyer WP. SMOTE: synthetic minority over-sampling technique. Journal of artificial intelligence research. 2002;16:321–357. doi: 10.1613/jair.953 [DOI] [Google Scholar]
- 37. Pedregosa F, Varoquaux G, Gramfort A, Michel V, Thirion B, Grisel O, et al. Scikit-learn: Machine Learning in Python. Journal of Machine Learning Re-search, 12. 2011;. [Google Scholar]
- 38. Cortes C, Vapnik V. Support-vector networks. Machine learning. 1995;20:273–297. doi: 10.1007/BF00994018 [DOI] [Google Scholar]
- 39. Liu L, Stokes JV, Tan W, Pruett SB. An optimized flow cytometry panel for classifying macrophage polarization. Journal of Immunological Methods. 2022;511:113378. doi: 10.1016/j.jim.2022.113378 [DOI] [PubMed] [Google Scholar]
- 40. Shapouri-Moghaddam A, Mohammadian S, Vazini H, Taghadosi M, Esmaeili SA, Mardani F, et al. Macrophage plasticity, polarization, and function in health and disease. Journal of Cellular Physiology. 2018;233(9):6425–6440. doi: 10.1002/jcp.26429 [DOI] [PubMed] [Google Scholar]
- 41. Ulman V, Maska M, Magnusson KE, Ronneberger O, Haubold C, Harder N, et al. An objective comparison of cell-tracking algorithms. Nature methods. 2017;14(12):1141–1152. doi: 10.1038/nmeth.4473 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 42. Matula P, Maska M, Sorokin DV, Matula P, Ortiz-de Solorzano C, Kozubek M. Cell tracking accuracy measurement based on comparison of acyclic oriented graphs. PloS one. 2015;10(12):e0144959. doi: 10.1371/journal.pone.0144959 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 43. Maska M, Ulman V, Svoboda D, Matula P, Matula P, Ederra C, et al. A benchmark for comparison of cell tracking algorithms. Bioinformatics. 2014;30(11):1609–1617. doi: 10.1093/bioinformatics/btu080 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 44. Hilsenbeck O, Schwarzfischer M, Skylaki S, Schauberger B, Hoppe PS, Loeffler D, et al. Software tools for single-cell tracking and quantification of cellular and molecular properties. Nature biotechnology. 2016;34(7):703–706. doi: 10.1038/nbt.3626 [DOI] [PubMed] [Google Scholar]
- 45. Tinevez JY, Perry N, Schindelin J, Hoopes GM, Reynolds GD, Laplantine E, et al. TrackMate: An open and extensible platform for single-particle tracking. Methods. 2017;115:80–90. doi: 10.1016/j.ymeth.2016.09.016 [DOI] [PubMed] [Google Scholar]
- 46. Barnhart EL, Lee KC, Keren K, Mogilner A, Theriot JA. An adhesion-dependent switch between mechanisms that determine motile cell shape. PLoS Biology. 2011;9:e1001059. doi: 10.1371/journal.pbio.1001059 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 47. Sloas C, Gill S, Klichinsky M. Engineered CAR-Macrophages as Adoptive Immunotherapies for Solid Tumors. Frontiers in Immunology. 2021;12:783305. doi: 10.3389/fimmu.2021.783305 [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Data Availability Statement
The complete dataset is available at https://datadryad.org/stash/share/vrQi68_C27sbdkP2uAXUE8kvy_BxlYkRImI5f6_9WY 0 with a metadata file accompanying the dataset. The source code required to reproduce the findings of this study has been uploaded to the following GitHub repository: https://github.com/Gomez-Lab/CellAnalysis.