Flow lymphocyte subpopulation detection automatic classification method based on machine learning
Through the automatic classification method based on machine learning, the problem of time-consuming and prone to errors in traditional flow cytometry analysis is solved, and the lymphocyte ratio is quickly and accurately calculated, which improves the efficiency of clinical diagnosis and treatment.
Patent Information
- Application Number
- CN202411670804.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-03-14
AI Technical Summary
In traditional flow cytometry analysis, manual scatter plot classification requires relying on the experience and subjective judgment of the operator, which makes it time-consuming and easy to cause artificial errors. As the detection parameters increase, manual analysis of data in multiple dimensions becomes complicated, and subtle but important changes are easily ignored.
The automatic classification method of flow lymphocyte subpopulations detection based on machine learning is adopted. By collecting cell characteristics of blood samples, a two-dimensional scatter plot is generated, the cell population is marked, the training set, verification set and test set are divided, the cell data is standardized, and the support vector machine model is used for training, the classification model is constructed, and the hyperparameters are tuned through grid search and ten-fold cross-validation to achieve automatic classification.
It improves the data processing speed, enhances the reliability and consistency of classification results, and can quickly and accurately calculate the proportion of various lymphocytes in the sample, assist clinicians to evaluate the immune function status, explore the cause, track the disease course, and optimize the treatment plan.
Smart Images

Figure CN119625387A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of biotechnology, and in particular to an automatic classification method for flow cytometry lymphocyte subpopulation detection based on machine learning. Background Art
[0002] Lymphocytes are the core components of the human immune system, participating in cellular and humoral immune responses, mainly including T cells (CD3+), B cells (CD3-CD19+) and natural killer cells (NK cells, CD3-CD16+CD56+). Among them, T cells are further divided into helper T cells (CD3+CD4+) and killer T cells (CD3+CD8+), which respectively undertake different immune defense functions. The function of lymphocytes and their interactions are essential for maintaining the body's immune balance. Under normal circumstances, the number and proportion of each lymphocyte subset remain stable, and the normal functioning of the immune system is ensured by mutual regulation. If the immune response is too strong, autoimmune diseases may be induced; excessive immunosuppression may cause tumor cells to escape immune surveillance or chronic viral infection. Abnormal lymphocyte subset ratios are closely related to a variety of diseases, such as infectious diseases, immunodeficiency diseases and autoimmune diseases. Therefore, detecting the proportion of lymphocyte subsets can not only help clinicians gain a deeper understanding of the patient's immune status, but also provide an important basis for disease diagnosis, efficacy monitoring and prognosis evaluation. By monitoring the changes in these subpopulations, clinicians can evaluate the body's immune function status, assist in the diagnosis of diseases, explore the cause of disease, track the course of disease, and optimize treatment plans. Flow cytometry plays a vital role in the detection of TBNK cells (T cells, B cells, and natural killer cells). Flow cytometry can quickly and accurately detect the number and proportion of various lymphocyte subpopulations by labeling fluorescent antibodies with cell surface-specific antigens. Its efficient multi-parameter analysis capability can not only process a large number of samples in a short time, but also provide accurate quantitative results. Through flow cytometry, clinicians can comprehensively evaluate the patient's immune status, promptly detect abnormal changes in lymphocyte subpopulations, guide personalized treatment, and improve the diagnosis and treatment effect. At present, flow cytometry lymphocyte subpopulation project detection has been widely used in various clinical departments.
[0003] In traditional flow cytometry analysis, manual classification of scatter plots relies on the operator's experience and subjective judgment, which is not only time-consuming but also prone to human errors. The judgment criteria between different operators may differ, resulting in poor reproducibility of results. In addition, with the increase in flow cytometer detection parameters, manual analysis of data in multiple dimensions becomes more complicated, and it is easy to overlook subtle but important changes.
[0004] In summary, it is very necessary to propose an automatic classification method for flow cytometry lymphocyte subset detection based on machine learning, which can speed up data processing, improve the reliability and consistency of classification results, and calculate the proportion of various lymphocytes in samples. Summary of the invention
[0005] The purpose of the present invention is to provide an automatic classification method for flow cytometry lymphocyte subset detection based on machine learning, aiming to solve the technical problem that in traditional flow cytometric analysis, manual scatter plot classification requires relying on the operator's experience and subjective judgment, which is not only time-consuming but also prone to human errors.
[0006] To achieve the above object, the present invention adopts a flow cytometry lymphocyte subset detection automatic classification method based on machine learning, comprising the following steps:
[0007] Collect cell characteristics of multiple blood samples and generate two-dimensional scatter plots on different fluorescence channels to obtain the distribution of various cell populations in the samples;
[0008] Annotate cell populations in 2D scatter plots;
[0009] Divide the labeled data set into training set, validation set and test set;
[0010] Normalize the cell data in the scatter plot;
[0011] For each scatter plot distribution, a support vector machine model is used for training to build a classification model for identifying the target cell population;
[0012] Grid search combined with ten-fold cross validation was used to tune the hyperparameters of the support vector machine model;
[0013] The support vector machine model was used to predict new scatter plot data and unlabeled scatter plot data, and different types of cell clusters were demarcated using polygonal gates to classify cell populations.
[0014] Among them, in the step of labeling the cell population in the two-dimensional scatter plot:
[0015] Observe the position and distribution characteristics of cells in the scatter plot and identify specific cell subpopulations.
[0016] Among them, in the step of dividing the labeled data set into a training set, a validation set, and a test set:
[0017] The ratio of training set, validation set and test set is 6:1:3.
[0018] Among them, in the step of standardizing the cell data in the scatter plot:
[0019] Calculate the mean and variance of the X-axis and Y-axis coordinates of all scattered points, standardize each coordinate value, and obtain corrected data.
[0020] Among them, in the step of tuning the hyperparameters of the support vector machine model using grid search combined with ten-fold cross validation:
[0021] Hyperparameters include the penalty coefficient C and the kernel function parameter γ.
[0022] The present invention discloses an automatic classification method for flow cytometry lymphocyte subpopulation detection based on machine learning, which collects cell features of multiple blood samples, generates two-dimensional scatter plots on different fluorescence channels, and obtains the distribution of various cell populations in the samples; labels the cell populations in the two-dimensional scatter plots; divides the labeled data set into a training set, a validation set and a test set; performs standardization processing on the cell data in the scatter plots; uses a support vector machine model for training for each scatter plot distribution to construct a classification model for identifying the target cell population; uses grid search combined with ten-fold cross validation to tune the hyperparameters of the support vector machine model; uses the support vector machine model to predict new scatter plot data and unlabeled scatter plot data, and uses polygonal gates to delineate different types of cell clusters to classify the cell populations; through the above method, the proportion of various lymphocytes in the sample can be calculated, and in the calculation, the data processing speed is fast and the classification result reliability and consistency are high, which assists clinicians in evaluating the immune function status of the body, and lays a foundation for exploring the cause of the disease, tracking the course of the disease, and then optimizing the treatment plan. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 It is a flow chart of the steps of the automatic classification method of flow cytometry lymphocyte subset detection based on machine learning of the present invention.
[0025] Figure 2 is a scatter plot of the lymphocyte population of the present invention.
[0026] Figure 3 It is a scatter plot of the T cell (CD3+) population of the present invention.
[0027] Figure 4 It is a scatter plot of the helper T cell (CD3+CD4+) population of the present invention.
[0028] Figure 5It is a scatter plot of the killer T cell (CD3+CD8+) population of the present invention.
[0029] Figure 6 It is a scatter plot of the B cell (CD3-CD19+) population of the present invention.
[0030] Figure 7 It is a scatter plot of the natural killer cell (NK cell, CD3-CD16+CD56+) population of the present invention.
[0031] Figure 8 It is a schematic diagram of the classification of lymphocyte populations of the present invention.
[0032] Fig. 9 It is a schematic diagram of the classification of the T cell (CD3+) population of the present invention.
[0033] Fig.10 It is a schematic diagram of the classification of the helper T cell (CD3+CD4+) population of the present invention.
[0034] Fig.11 It is a schematic diagram of the classification of the killer T cell (CD3+CD8+) population of the present invention.
[0035] Fig.12 It is a schematic diagram of the classification of the B cell (CD3-CD19+) population of the present invention.
[0036] Fig.13 It is a schematic diagram of the classification of the natural killer cell (NK cell, CD3-CD16+CD56+) population of the present invention. DETAILED DESCRIPTION
[0037] Here, exemplary embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application.
[0038] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0039] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0040] See also Figures 1 to 13 The present invention provides a method for automatic classification of flow cytometry lymphocyte subset detection based on machine learning, comprising the following steps:
[0041] Step 1: Collect the cell characteristics of multiple blood samples and generate a two-dimensional scatter plot on different fluorescence channels to obtain the distribution of various cell populations in the samples.
[0042] In this embodiment, a flow cytometer is used to collect cell characteristics of multiple blood samples, and a two-dimensional scatter plot is generated on different fluorescence channels by the flow cytometer software to obtain the distribution of various cell populations in the sample; the scatter plot is as follows Figure 2 to Figure 7 As shown, Figure 2 is a scatter plot of the lymphocyte population, Figure 3 is a scatter plot of the T cell (CD3+) population. Figure 4 is a scatter plot of the helper T cell (CD3+CD4+) population. Figure 5 is a scatter plot of the cytotoxic T cell (CD3+CD8+) population. Figure 6 is a scatter plot of the B cell (CD3-CD19+) population. Figure 7 It is a scatter plot of the natural killer cell (NK cell, CD3-CD16+CD56+) population. The fluorescence channels include forward scattered light (FSC), side scattered light (SSC) and multiple other fluorescence signal channels; each scatter plot shows a specific distribution pattern of a target cell population. For example, the BF-710 flow cytometer, the flow cytometer data contains 7 parameters, namely pulse height (SSC-H) and pulse area (FITC-A, PE-A, PerCP-Cy5.5-A, PE-Cy7-A, APC-A, APC-Cy7-A). In each sample, the following six two-dimensional scatter plots are drawn:
[0043] (1) The X-axis channel is the PerCP-Cy5.5-A channel, and the Y-axis is the SSC-H channel;
[0044] (2) The X-axis is the FITC-A channel, and the Y-axis is the SSC-H channel;
[0045] (3) The X-axis channel is the FITC-A channel, and the Y-axis is the PE-Cy7-A channel;
[0046] (4) The X-axis channel is the FITC-A channel, and the Y-axis is the APC-Cy7-A channel;
[0047] (5) The X-axis channel is the FITC-A channel, and the Y-axis channel is the APC-A channel;
[0048] (6) The X-axis channel is the FITC-A channel, and the Y-axis channel is the PE-A channel.
[0049] These scatter plots clearly show the distribution characteristics of the cell population and provide a basis for subsequent data processing and analysis.
[0050] Step 2: Label the cell populations in the 2D scatter plot;
[0051] In this embodiment, the cell population in the two-dimensional scatter plot is manually labeled, and the position and distribution characteristics of the cells in the scatter plot, such as density, shape, size, etc., are observed; specific cell subpopulations are calibrated to ensure that the subsequent supervised machine learning model can accurately learn and classify different types of lymphocytes; because the accuracy of manual labeling depends on the experience of the operator, multiple operators cross-validate the data to reduce subjective errors. This process provides accurate label data for model training, ensuring that the model can effectively identify cell populations from the data.
[0052] Step 3: Divide the labeled dataset into training set, validation set and test set.
[0053] In this embodiment, the labeled data set is divided into training set, validation set and test set, where the ratio of training set, validation set and test set is 6:1:3; the training set is used for model construction, the validation set is used to evaluate the performance of the model during the training process, and the test set is used to evaluate the generalization ability of the model to ensure that it can still maintain efficient classification performance on new data.
[0054] Step 4: Standardize the cell data in the scatter plot;
[0055] In this embodiment, the cell data in the scatter plot is standardized to improve the training effect of the model.
[0056] The standardization process uses the Z-score method to calculate the mean and variance of the X-axis and Y-axis coordinates of all scattered points, standardize each coordinate value, and obtain corrected data to make the data in different samples comparable; the calculation steps of standardization are as follows:
[0057] Step 1: Calculate the mean of the data set:
[0058]
[0059] Wherein, μ represents the mean of all x-axis or y-axis coordinates in the current scatter plot, N represents the number of scatter points in the scatter plot, and X represents the x-axis or y-axis coordinate value of the coordinate point in the current scatter plot.
[0060] Step 2: Calculate the standard deviation of the data set:
[0061]
[0062] Where σ represents the standard deviation of all x-axis or y-axis coordinates in the current scatter plot, N represents the number of scatter points in the scatter plot, X represents the x-axis or y-axis coordinate value of the coordinate point in the current scatter plot, and μ represents the mean of all x-axis or y-axis coordinates in the current scatter plot.
[0063] Step 3: Apply the Z-score formula for standardization:
[0064]
[0065] Among them, Z represents the standardized value of all x-axis or y-axis coordinates in the current scatter plot, X represents the x-axis or y-axis coordinate value of the coordinate point in the current scatter plot, μ represents the mean of all x-axis or y-axis coordinates in the current scatter plot, and σ represents the standard deviation of all x-axis or y-axis coordinates in the current scatter plot. Through standardization, the influence of different samples due to differences in measurement conditions can be eliminated, making subsequent analysis more accurate.
[0066] Step 5: For each scatter plot distribution, use the support vector machine model for training to build a classification model for identifying the target cell population.
[0067] In this embodiment, the support vector machine separates data points of different categories by finding a hyperplane and maximizing the interval between the support vector and the hyperplane. Due to the nonlinear boundary of the cell population, a Gaussian kernel (RBF kernel) function is introduced to map the data to a high-dimensional space so that linearly inseparable data can be separated by a hyperplane in the high-dimensional space. The Gaussian kernel function is defined as:
[0068] K(x i ,x j ) = exp(-γ||x i -x j || 2 );
[0069] Among them, x i and x j is the sample input in the training data, γ is the width parameter of the Gaussian distribution, which controls the nonlinearity of the kernel function.
[0070] At the same time, the support vector machine model constructs an optimization problem to find the optimal classification hyperplane. The goal of this optimization problem is to minimize the loss function while maximizing the interval between the hyperplane and the support vector. The loss function of the support vector machine can be expressed as:
[0071]
[0072] Among them, α i is the Lagrange multiplier, indicating the importance of the support vector. b is the bias term, defining the position of the hyperplane. K(x i ,x j ) is the kernel function used to map the input data points to a high-dimensional space. i and x j is the sample input in the training data. The loss function can be expressed as a constrained optimization problem, where the Lagrange multiplier α i is used to find the optimal solution. During the optimization process, the support vector machine learns the importance of each support vector, that is, determines α i Value. Through the above formula, the model can classify new data samples and determine which cell population they belong to.
[0073] Step 6: Use grid search combined with ten-fold cross validation to tune the hyperparameters of the support vector machine model; the hyperparameters include the penalty coefficient C and the kernel function parameter γ.
[0074] In this implementation, grid search combined with ten-fold cross validation is used to tune the hyperparameters of the support vector machine model to improve its generalization ability and prediction accuracy; the hyperparameters include the penalty coefficient C and the kernel function parameter γ; the penalty coefficient C affects the model's tolerance to classification errors, thereby affecting the generalization performance; the γ parameter controls the width of the Gaussian kernel and affects the model's fit to the data points. Through cross validation, the optimal parameter combination is selected to ensure that the model can maintain efficient performance under different conditions. The specific steps are as follows:
[0075] Step 1: Define the penalty coefficient C and kernel function parameter γ of the support vector machine model as hyperparameters that need to be optimized. The C parameter determines the penalty for classification errors. A larger C value will try to classify each data point correctly, but may lead to overfitting; a smaller C value allows some classification errors, making the model more generalized. For the support vector machine model using a Gaussian kernel (RBF kernel), the γ parameter controls the width of the Gaussian distribution, that is, it affects the degree of fit of the model to the data points. A larger γ value will reduce the range of influence of the model on each data point, resulting in a complex decision boundary; a smaller γ value will make the decision boundary smoother.
[0076] Step 2: Form a parameter grid by setting multiple candidate values, and use the exhaustive method of different combinations for search. For example, C∈[0.1,1,10,100], γ∈[0.001,0.01,0.1,1], 4 C values and 4 γ values are combined to form 16 different parameter combinations. Each combination will be evaluated through model training and verification.
[0077] Step 3: Evaluate the performance of each hyperparameter combination through ten-fold cross validation. The steps of cross validation are as follows:
[0078] (1) Randomly divide the data set into 10 equal parts (folds);
[0079] (2) Each time, one of the folds is selected as the validation set, and the remaining 9 folds are used as the training set to train the support vector machine model;
[0080] (3) Repeat 10 times, with each fold used as a validation set, and record the performance of each validation;
[0081] (4) Finally, take the average of the 10 verification results as the final evaluation score of the parameter combination.
[0082] Step 4: Compare the evaluation scores of all parameter combinations and take the combination with the highest value as the hyperparameter of the support vector machine model.
[0083] Step 7: Use the support vector machine model to predict the new scatter plot data and unlabeled scatter plot data, and use polygonal gates to delineate different types of cell clusters to classify cell populations.
[0084] In this embodiment, the support vector machine model is used to predict new scatter plot data and unlabeled scatter plot data, and different types of cell clusters are demarcated using polygonal gates to classify cell populations. The specific steps are as follows:
[0085] Each cell in the scatter plot data of each distribution type is classified and labeled by the trained SVM model. A two-dimensional scatter plot is drawn based on the model prediction results. In the figure, each data point represents a cell and is identified according to the cluster group to which it belongs. In order to clearly display different types of cell populations, they are circled with different polygon gates for partitioning. Figure 8 to Figure 13 Schematic diagram of automatic classification of cell populations, where Figure 8 The scope is the lymphocyte population, Fig. 9 The scope is T cell (CD3+) population, Fig.10 The scope is the helper T cell (CD3+CD4+) population. Fig.11 The scope is the cytotoxic T cell (CD3+CD8+) population. Fig.12 The scope is B cell (CD3-CD19+) population, Fig.13 The scope is the natural killer cell (NK cell, CD3-CD16+CD56+) population. After the classification is completed, the proportion of the number of cells in these populations to the total number of sample cells is calculated to obtain the detection results of each lymphocyte subset.
[0086] In the present invention, the cell characteristics of multiple blood samples are first collected, and a two-dimensional scatter plot is generated on different fluorescence channels to obtain the distribution of various cell populations in the sample. Then the cell population in the two-dimensional scatter plot is annotated; the annotated data set is divided into a training set, a validation set and a test set. Then the cell data in the scatter plot is standardized. Then, for each scatter plot distribution, a support vector machine model is used for training to construct a classification model for identifying the target cell population. Then, a grid search combined with ten-fold cross validation is used to tune the hyperparameters of the support vector machine model. Finally, the support vector machine model is used to predict the new scatter plot data and the unlabeled scatter plot data, and different types of cell clusters are demarcated by polygonal gates to classify the cell population. In the above manner, the proportion of various lymphocytes in the sample can be calculated, and in the calculation, the data processing speed is fast, the classification results are reliable and consistent, and the clinician is assisted in evaluating the immune function status of the body, which lays the foundation for exploring the cause of the disease, tracking the course of the disease, and optimizing the treatment plan.
[0087] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the contents disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.
[0088] It should be understood that the present application is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof.
Claims
1. A method for automatic classification of flow cytometry lymphocyte subsets based on machine learning, characterized in that: The steps include: Collect cell characteristics of multiple blood samples and generate two-dimensional scatter plots on different fluorescence channels to obtain the distribution of various cell populations in the samples; Annotate cell populations in 2D scatter plots; Divide the labeled data set into training set, validation set and test set; Normalize the cell data in the scatter plot; For each scatter plot distribution, a support vector machine model is used for training to build a classification model for identifying the target cell population; Grid search combined with ten-fold cross validation was used to tune the hyperparameters of the support vector machine model; The support vector machine model was used to predict new scatter plot data and unlabeled scatter plot data, and different types of cell clusters were demarcated using polygonal gates to classify cell populations.
2. The automatic classification method for flow cytometry lymphocyte subpopulation detection based on machine learning as claimed in claim 1, characterized in that: In the step of labeling cell populations in a 2D scatter plot: Observe the position and distribution characteristics of cells in the scatter plot and identify specific cell subpopulations.
3. The automatic classification method for flow cytometry lymphocyte subpopulation detection based on machine learning as claimed in claim 1, characterized in that: In the step of dividing the labeled dataset into training set, validation set and test set: The ratio of training set, validation set and test set is 6:1:
3.
4. The automatic classification method for flow cytometry lymphocyte subset detection based on machine learning as claimed in claim 1, characterized in that: In the step of normalizing the cell data in the scatter plot: Calculate the mean and variance of the X-axis and Y-axis coordinates of all scattered points, standardize each coordinate value, and obtain corrected data.
5. The automatic classification method for flow cytometry lymphocyte subpopulation detection based on machine learning as claimed in claim 1, characterized in that: In the steps of tuning the hyperparameters of the support vector machine model using grid search combined with ten-fold cross validation: Hyperparameters include the penalty coefficient C and the kernel function parameter γ.
Citation Information
Cited By
Flow type immune cell intelligent analysis system based on machine learning
CN121528322A