Cell type determination method, device, equipment and storage medium
By combining the gene expression data and position information of cells and using coding models to determine cell types, the problems of insufficient utilization of cell position information and inaccurate gene feature expression in the existing technology are solved, achieving higher cell type accuracy and applicability. .
Patent Information
- Application Number
- CN202210094277.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-26
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2042-01-26
AI Technical Summary
When the existing technology determines cell types, the cell location information is not fully utilized, the efficiency is low, and the gene feature expression is inaccurate, resulting in insufficient accuracy.
By combining the gene expression data and position information of cells, using coding models for training, gene coding features are generated to determine cell types, and technologies such as deep learning and convolutional neural networks are used to improve the accuracy of cell types.
The accuracy and applicability of cell types are improved, and cell types can be accurately determined while integrating the positional relationships between cells, surpassing the limitations of traditional methods.
Smart Images

Figure CN114496083B
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence, and in particular to a method, device, equipment and storage medium for determining a cell type. Background Art
[0002] In recent years, with the advancement of molecular biology and single-cell sequencing technology, more and more studies have shown that the selective expression of cell genes and the interaction between multiple cells in tissues determine the type of individual cells. For example, the spatial coordination and signal transduction of cells determine the dynamic development process of the tissue microenvironment and how embryonic cells differentiate into nerve cells, muscle cells, immune cells, and so on.
[0003] The existing method of determining cell types is often to analyze the gene expression data (transcriptome sequencing data) of cells to determine the cell type at the molecular level. Or the cell type is determined based on the gene expression data of cells and the distance between each cell. The above methods still have a lot of room for improvement in determining the accuracy of cell types.
[0004] Therefore, how to further accurately determine the cell type of cells in the group becomes an urgent problem to be solved. Summary of the invention
[0005] The embodiments of the present application provide a method, device, equipment and storage medium for determining cell types, which can improve the accuracy of determining cell types and have high applicability.
[0006] In one aspect, the present invention provides a method for determining a cell type, the method comprising:
[0007] Determine gene expression data of each target cell in the tissue sample and position information of the target cell in the tissue sample, and determine the target gene expression characteristics corresponding to the tissue sample based on the gene expression data of each target cell and the corresponding position information;
[0008] Inputting the target gene expression characteristics into a coding model to obtain the gene coding characteristics corresponding to the tissue sample, and determining the cell type of each of the target cells based on the gene coding characteristics;
[0009] The above encoding model is trained based on the following method:
[0010] Inputting the target gene expression characteristics into the initial model to obtain the initial gene coding characteristics corresponding to the tissue sample;
[0011] Based on the initial gene coding features, determining the predicted cell type of each of the target cells and the predicted gene expression distribution corresponding to each of the predicted cell types, determining the actual gene expression distribution corresponding to each of the predicted cell types, and determining a total training loss value based on the predicted gene expression distribution and the actual gene expression distribution;
[0012] The above-mentioned initial model is iteratively trained based on the above-mentioned total training loss value until the above-mentioned total training loss value meets the training end condition, the training is stopped and the initial model at the end of the training is determined as the above-mentioned encoding model.
[0013] On the other hand, an embodiment of the present application provides a cell type determination device, the device comprising:
[0014] A data processing module, used to determine the gene expression data of each target cell in the tissue sample and the position information in the tissue sample, and determine the target gene expression characteristics corresponding to the tissue sample based on the gene expression data of each target cell and the corresponding position information;
[0015] A type determination module, used to input the target gene expression characteristics into a coding model to obtain the gene coding characteristics corresponding to the tissue sample, and determine the cell type of each of the target cells based on the gene coding characteristics;
[0016] The coding model is obtained through training by a training device, and the training device is used for:
[0017] Inputting the target gene expression characteristics into the initial model to obtain the initial gene coding characteristics corresponding to the tissue sample;
[0018] Based on the initial gene coding features, determining the predicted cell type of each of the target cells and the predicted gene expression distribution corresponding to each of the predicted cell types, determining the actual gene expression distribution corresponding to each of the predicted cell types, and determining a total training loss value based on the predicted gene expression distribution and the actual gene expression distribution;
[0019] The above-mentioned initial model is iteratively trained based on the above-mentioned total training loss value until the above-mentioned total training loss value meets the training end condition, the training is stopped and the initial model at the end of the training is determined as the above-mentioned encoding model.
[0020] On the other hand, an embodiment of the present application provides an electronic device, including a processor and a memory, wherein the processor and the memory are connected to each other;
[0021] The memory is used to store computer programs;
[0022] The above-mentioned processor is configured to execute the cell type determination method provided in the embodiment of the present application when calling the above-mentioned computer program.
[0023] On the other hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the cell type determination method provided in the embodiment of the present application.
[0024] On the other hand, an embodiment of the present application provides a computer program product, which includes a computer program or computer instructions. When the above computer program or computer instructions are executed by a processor, the cell type determination method provided in the embodiment of the present application is implemented.
[0025] The target gene expression characteristics corresponding to the tissue sample determined by the embodiment of the present application may include gene expression data and positional information of the target gene, so that the gene expression characteristics of each target cell are fused with the positional information during the encoding of the target gene expression characteristics of the tissue sample by the coding model. And since the training loss in the model training process is determined based on the predicted gene expression distribution corresponding to the predicted cell type and the actual gene expression distribution, the gene coding characteristics obtained by encoding the target gene expression characteristics by the coding model obtained on this basis have higher accuracy. And then when determining the cell type of each target cell in the tissue sample based on the gene coding characteristics, the cell type of the target cell can be accurately determined in the case of the positional relationship between the fused cells, and the applicability is high. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0027] Figure 1 is a schematic diagram of the process of determining the cell type provided in the embodiment of the present application;
[0028] Figure 2 It is a schematic diagram of a scenario for determining a characteristic graph corresponding to a tissue sample provided in an embodiment of the present application;
[0029] Figure 3 is a schematic diagram of a scenario for determining a cell type provided in an embodiment of the present application;
[0030] Figure 4 It is a flowchart of the model training method provided in the embodiment of the present application;
[0031] Figure 5aIt is a schematic diagram of a scenario of model training through an embodiment of the present application;
[0032] Figure 5b is another schematic diagram of a scenario of model training provided in an embodiment of the present application;
[0033] Figure 6 is a schematic diagram of the cell type determination effect provided in the examples of the present application;
[0034] Figure 7 is a schematic diagram of the structure of a cell type determination device provided in an embodiment of the present application;
[0035] Figure 8 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. The embodiments described below with reference to the drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limitations on the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0037] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0038] The cell type determination method provided in the embodiments of the present application can be applied to the fields of biomedicine, cell research, pathological analysis, etc., and the cell type can be determined based on artificial intelligence technology. For example, based on the cell type determination method provided in the embodiments of the present application, cancer cells can be accurately identified, and then corresponding targeted drugs can be developed to improve anti-cancer treatment.
[0039] Among them, the embodiment of the present application can obtain a coding model that can be used to encode the gene expression characteristics of tissue samples based on machine learning technology training in the field of artificial intelligence, and then determine the cell type of each target cell in the tissue sample based on the encoding result of the coding model.
[0040] Among them, artificial intelligence is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.
[0041] Machine learning is a multi-disciplinary interdisciplinary subject involving probability theory, statistics, approximation theory, convex analysis, algorithmic complexity theory and other disciplines. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and learning by teaching, etc., which specialize in how computers simulate or implement human learning behavior to acquire new knowledge or skills, such as the coding model in the embodiment of this application obtained by training based on machine learning technology.
[0042] Among them, the data processing processes involved in the embodiments of the present application, such as determining gene expression data, determining cell types, etc., can be implemented based on cloud computing technology. Cloud computing refers to the delivery and use mode of IT infrastructure, which refers to obtaining required resources through the network in an on-demand and easily scalable manner. It is the product of the development and integration of traditional computer and network technologies such as grid computing, distributed computing, parallel computing, utility computing, network storage technologies, virtualization, and load balancing. With the development of the Internet, real-time data streams, and the diversification of connected devices, as well as the promotion of search services, social networks, mobile commerce, and open collaboration, cloud computing has developed rapidly. Different from previous parallel distributed computing, the emergence of cloud computing will promote revolutionary changes in the entire Internet model and enterprise management model in terms of concept.
[0043] With the continuous development of science and technology, there are mainly the following methods in the existing technology to determine cell types.
[0044] (1) Cluster analysis method for bulk datasets of single-cell spatial transcriptome sequencing combined with spatial morphological features. This method is limited by factors such as cell contour segmentation, morphological feature design, image resolution, and cell density when extracting cell spatial morphology. At the same time, the utilization rate of cell position is low and gene expression data needs to be downsampled, resulting in low accuracy in determining cell types.
[0045] (2) Single-cell spatial transcriptome cell type annotation based on spatial information embedding of graph convolutional neural network (GCN). This method only uses the distance information between cells in the process of determining cell types, and the utilization rate of cell position information is low. In addition, due to the limitations of GCN, it cannot process large-scale spatial transcriptome data.
[0046] (3) Spatial transcriptome gene expression enhancement analysis method based on Bayesian statistics. This method is mainly used to enhance large-scale spatial transcriptome data, but is not suitable for determining cell types. In addition, the computational efficiency of the calculation process based on Bayesian statistics is low.
[0047] (4) Single-cell spatial transcriptome cell type annotation based on unsupervised spatial information embedding. This method also only uses the distance information between cells in the process of determining the cell type. The utilization rate of cell position information is low, and the expression of cell gene characteristics is inaccurate, resulting in reduced accuracy in determining cell types.
[0048] In summary, in the prior art, when determining cell types, there are problems such as insufficient utilization of cell location information, low efficiency, and inaccurate expression of gene features. Based on this, the embodiments of the present application provide a cell type determination method, device, electronic device, and readable storage medium, aiming to solve some or all of the above technical problems.
[0049] See also Figure 1 , Figure 1 Schematic diagram of the process of determining the cell type provided in the embodiment of the present application. Figure 1 As shown, the cell type determination method provided in the embodiment of the present application may include the following steps:
[0050] Step S11, determining the gene expression data of each target cell in the tissue sample and the position information in the tissue sample, and determining the target gene expression characteristics corresponding to the tissue sample based on the gene expression data of each target cell and the corresponding position information.
[0051] In some feasible implementations, when determining the gene expression data of each target cell in a tissue sample, a pathological image of the tissue sample may be determined first, such as by obtaining the pathological image of the tissue sample through a tissue sectioning procedure, confocal fluorescence imaging, or the like.
[0052] Among them, the pathological image of the tissue sample can be a pathological image obtained based on any staining method, including but not limited to pathological images obtained by hematoxylin-eosin staining (H&E), ssDNA staining, 4',6-diamidino-2-phenylindole (4',6-diamidino-2-phenylindole, DAPI) staining and other methods. The specific staining method can be determined based on the actual application scenario requirements and is not limited here.
[0053] Among them, the pathological image of the tissue sample can be the imaging result at any original resolution, such as the resolution of a microscope 10x, 20x, 40x, etc., and the specific resolution can also be determined based on the actual application scenario requirements, and is not limited here.
[0054] Furthermore, all cells in the tissue sample can be determined based on the pathological image, thereby determining the number of transcripts in all cells in the tissue sample, and filtering out cells in the tissue sample whose transcript numbers are within a preset number range, and determining cells in the tissue sample whose transcript numbers are within the preset number range as target cells.
[0055] Among them, transcripts are one or more mature mRNAs that can encode proteins formed by transcription of a gene. That is, for each cell in a tissue sample, the number of transcripts in the cell is one or more mRNAs formed by the transcription of a gene.
[0056] Among them, by screening out cells in tissue samples whose transcript counts do not reach the lower limit of the preset number interval, it is possible to avoid the situation where the gene expression data of such cells determined subsequently cannot completely include the genes of such cells, and it is also possible to screen out cells with abnormal development. By screening out cells in tissue samples whose transcript counts exceed the upper limit of the preset number interval, it is possible to eliminate the situation where the number of transcripts of a certain cell increases due to premature cell rupture or cell overlap, so as to ensure the accuracy of the gene expression data of the target cells.
[0057] Furthermore, after the target cells in the tissue sample are determined, gene sequencing can be performed on each target cell to obtain initial gene expression data of each target cell, and the initial gene expression data of the target cell can be directly determined as the gene expression data of the target cell.
[0058] The gene expression data of each target cell pair may also become the transcriptome data of the target cell.
[0059] In some feasible implementations, after performing gene sequencing on each target cell to obtain initial gene expression data of each target cell, data optimization may be further performed on the initial gene expression data of the target cell to obtain the gene expression data of the target cell.
[0060] Specifically, when optimizing the initial gene expression data of each target cell, abnormal gene data in the initial gene expression data of each target cell may be removed to obtain the gene expression data of each target cell.
[0061] It should be noted that not all target cells in the tissue sample have abnormal genes. Therefore, the above process of removing abnormal gene data can only be targeted at some cells among all target cells, that is, the cells containing abnormal genes in the target cells are determined, and the abnormal gene data corresponding to the abnormal genes in the initial gene expression data of the cell are filtered out.
[0062] Among them, abnormal gene data includes but is not limited to mutant genes in cells, genes with a low probability of occurrence, or specified genes, etc., which can be determined based on the actual application scenario requirements and are not limited here.
[0063] Optionally, after obtaining the initial gene expression data of each target cell, the initial gene expression data of each target cell can be normalized to obtain the gene expression data of each target cell. By normalizing the initial gene expression data of each target cell, the differences caused by the different positions of each target cell in the tissue sample when determining the initial gene expression data, such as uneven RNA separation, inconsistent sequencing depth, etc., also known as batch effects at different spatial positions, can be eliminated, and the gene expression data of each target cell can be placed on the same data dimension, which is convenient for the subsequent application of the gene expression data of each target cell.
[0064] Optionally, after obtaining the initial gene expression data of each target cell, the initial gene expression data of each target cell may be screened to filter out abnormal gene data in each initial gene expression data, and the screened initial gene expression data may be further normalized to obtain the gene expression data of each target cell.
[0065] Alternatively, the initial gene expression data of each target cell may be normalized first, and then the abnormal gene data in the normalized initial gene expression data may be removed to obtain the gene expression data of each target cell.
[0066] It should be noted that the above process of optimizing the gene expression data of each target cell is only an example, and may also include proofreading or correcting the gene expression data of each target cell, etc. The specific process may be determined based on the actual application scenario requirements and is not limited here.
[0067] In some feasible implementations, when determining the gene expression data of each target cell in a tissue sample, all cells in the tissue sample may be first determined based on the pathological image, and all cells may be sequenced to obtain initial gene expression data of all cells.
[0068] Furthermore, the abnormal gene data in the initial gene expression data of each cell in the tissue sample can be removed to obtain the gene expression data of each cell in the tissue sample. Alternatively, the gene expression data of each cell in the tissue sample can be normalized to obtain the gene expression data of each cell in the tissue sample. Alternatively, after obtaining the initial gene expression data of all cells in the tissue sample, the initial gene expression data of each cell can be optimized based on the data optimization method and the normalization processing method of the abnormal gene data to obtain the gene expression data of each cell in the tissue sample.
[0069] Based on this, after obtaining the gene expression data of each cell in the tissue sample, the transcript quantity of each cell can be determined, and cells with transcript quantities within a preset quantity range can be determined as target cells to obtain the gene expression data of each target cell in the tissue sample.
[0070] In some feasible embodiments, after determining the pathological image of the tissue sample, the position information of each target cell in the tissue sample can be determined based on the pathological image, so that for each target cell, the target gene expression characteristics corresponding to the tissue sample can be determined based on the position information of the target cell in the tissue sample and the gene expression data corresponding to the target cell.
[0071] The target gene expression characteristics corresponding to the tissue sample include the location information of each target cell in the tissue sample and the gene expression data of each target cell.
[0072] Among them, in the embodiment of the present application, the position information of each target cell in the tissue sample can be the two-dimensional coordinate information of the target cell in the tissue sample, or can be the three-dimensional spatial information of the target cell in the tissue sample, which is not limited here.
[0073] Specifically, when determining the target gene expression characteristics corresponding to the tissue sample, the gene expression characteristics corresponding to each target cell may be determined first, wherein the gene expression characteristics corresponding to each target cell include the location information of the target cell in the tissue sample and the gene expression data of the target cell.
[0074] For each target cell, the gene expression data and position information of the target cell may be fused to obtain the gene expression characteristics of the target cell. For example, for each target cell, the gene expression data and position information of the target cell may be aligned to obtain the gene expression characteristics of the target cell, or the gene expression data and position information of the target cell may be input into a fusion model to obtain the gene expression characteristics corresponding to the target cell through the fusion model.
[0075] Alternatively, for each target cell, the gene expression data of the target cell can be regarded as a one-dimensional vector, the length of which is consistent with the number of genes in the target cell, and each vector element corresponds to a gene expression of the target cell. Furthermore, the location information of the target cell in the tissue sample can be fused with the vector to obtain the gene expression characteristics corresponding to the target cell.
[0076] For example, for each target cell, the two-dimensional coordinates of the target cell in the tissue sample can be fused with the one-dimensional vector corresponding to the gene expression data of the target cell to obtain the gene expression characteristics corresponding to the target cell. A three-dimensional matrix N*H*W is used to represent the spatial transcriptome data of the target cell. Wherein, N represents the number of genes, H and W represent the height and width, respectively, which are used to indicate the location information of the target cell in the tissue sample. Wherein, the three-dimensional matrix can also be regarded as a multi-channel graph, each channel corresponding to a gene.
[0077] Wherein, for each target cell, the gene expression characteristics corresponding to the target cell may also be referred to as the spatial transcriptome data corresponding to the cell. And the target gene expression characteristics of the tissue sample in the embodiment of the present application may be the spatial transcriptome data collected based on the existing spatial transcriptome sequencing technology, such as including but not limited to the spatial transcriptome data obtained based on multiple error-corrected fluorescence in situ hybridization technology (MERFISH), ouroboros fluorescence in situ hybridization technology (fluorescence in situhybridization, FISH) osmFISH, Slide-seq, seqFISH+, seqFISH, Visium, spatial resolution transcription amplification readout map (STARmap), high-definition spatial transcriptomics (High Definition Spatial Transcriptomics, HDST) technology, etc., which may be specifically determined based on the actual application scenario requirements, without limitation.
[0078] Furthermore, after determining the gene expression characteristics of each target cell, the target gene expression characteristics corresponding to the tissue sample can be determined based on the gene expression characteristics corresponding to each target cell and the corresponding position information. For example, the gene expression characteristics corresponding to each target cell can be integrated according to their respective positions in the tissue sample to obtain the target gene expression characteristics corresponding to the tissue sample, so that the target gene expression characteristics corresponding to the tissue sample include the gene expression characteristics corresponding to each target cell and the position information in the tissue sample.
[0079] The target gene expression feature corresponding to the tissue sample can be regarded as a feature map, each target cell corresponds to a pixel in the feature map, the feature data corresponding to each pixel is the gene expression feature corresponding to the corresponding target cell, one channel of each pixel corresponds to the gene expression data of a gene of a target cell, and the position information of each pixel represents the position information of the corresponding target cell in the tissue sample. Figure 2 , Figure 2 is a schematic diagram of a scenario for determining a characteristic graph corresponding to a tissue sample provided in an embodiment of the present application. Figure 2 As shown, for cells 1 to M, the gene expression characteristics corresponding to each cell can be determined, wherein the gene expression characteristics of each cell include the gene expression data of the cell and the corresponding position information. Further, based on the position information of cells 1 to M in the tissue sample and the gene expression characteristics corresponding to each cell, the characteristic graph corresponding to the tissue sample is determined.
[0080] Step S12: input the gene expression characteristics into the coding model to obtain the gene coding characteristics corresponding to the tissue sample, and determine the cell type of each target cell based on the gene coding characteristics.
[0081] In some feasible implementations, after determining the target gene expression features corresponding to the tissue sample, the target gene expression features corresponding to the tissue sample may be input into a coding model to obtain the gene coding features corresponding to the tissue sample.
[0082] Among them, the encoding model can be a neural network model built based on a deep convolutional network structure or a deep learning encoder, including but not limited to encoding models based on neural network structures such as EfficientNet, ResNet, DenseNet, and encoding models implemented based on variational auto-encoders (VAE). The specific model can be determined based on the actual application scenario requirements and is not limited here.
[0083] Among them, the construction method of the above-mentioned coding model is only an example, and the convolution layer in the coding model and the corresponding convolution kernel size can be determined based on the actual application scenario requirements and are not limited here.
[0084] Among them, the convolution layer in the encoding model can perform sliding window convolution operation on the target gene expression characteristics to reduce the gene expression dimension of each target cell in the output gene coding characteristics, and make the gene expression of each target cell embed the position information of the adjacent target cells in the tissue sample.
[0085] Furthermore, if Figure 3 As shown, Figure 3 Schematic diagram of a scenario for determining cell types provided in an embodiment of the present application. After obtaining the target gene expression characteristics corresponding to the tissue sample, the target gene expression characteristics can be input into the coding model to obtain the gene coding characteristics corresponding to the tissue sample. Then, each target cell can be clustered based on the target gene coding characteristics to obtain the cell type of each target cell in the tissue sample.
[0086] Optionally, after obtaining the gene coding features corresponding to the tissue sample, the gene coding features may be input into a pre-trained type prediction model, and the cell type of each target cell in the tissue sample may be obtained through the pre-trained type prediction model.
[0087] Among them, the above-mentioned pre-trained type prediction model can also be constructed based on a neural network, and the specific construction method and training method are not explained here.
[0088] In some feasible embodiments, after the cell type of each target cell in the tissue sample is determined, the target gene associated with the cell type of the target cell in each target cell may be determined.
[0089] The target gene corresponding to each target cell is one or more genes that can represent the cell type of the target cell. For example, a gene unique to the cell type of the target cell in the target cell can be determined as the target gene corresponding to the target cell.
[0090] Furthermore, for each target cell, the target cell can be marked as a cell type based on the target gene corresponding to the target cell. For example, the target gene corresponding to the target cell can be marked, so that the cell type of the corresponding target cell can be determined based on the marked gene in any target cell.
[0091] Among them, the encoding model in the embodiment of the present application is obtained by training based on the target gene expression characteristics corresponding to the tissue sample. The specific training method can be found in Figure 4 . Figure 4 Schematic diagram of the model training method provided in the embodiment of the present application. Figure 4 As shown, the model training method provided in the embodiment of the present application may include the following steps:
[0092] Step S41: input the target gene expression characteristics into the initial model to obtain the initial gene coding characteristics corresponding to the tissue sample.
[0093] In some feasible implementations, the initial model is the model before the encoding model is trained, and its model structure is the same as that of the encoding model. That is, the training parameters of the initial model are adjusted through the training process of the initial model, and the final model is the encoding model.
[0094] Specifically, when training the initial model, the target gene expression features corresponding to the tissue sample can be input into the initial model to obtain the initial gene coding features corresponding to the tissue sample. The method for determining the target gene expression features corresponding to the tissue sample can be found in Figure 1 The implementation method shown in step S11 will not be repeated here.
[0095] Step S42: Based on the initial gene coding features, determine the predicted cell type of each target cell and the predicted gene expression distribution corresponding to each predicted cell type, determine the actual gene expression distribution corresponding to each predicted cell type, and determine the total training loss value based on the predicted gene expression distribution and the actual gene expression distribution.
[0096] In some feasible embodiments, each target cell may be clustered based on the initial gene coding feature corresponding to the tissue sample, and then the cell type of each target cell corresponding to the initial gene coding feature may be determined based on the clustering result.
[0097] Alternatively, the gene coding features can be input into a pre-trained type prediction model, and the cell type of each target cell in the tissue sample can be obtained through the pre-trained type prediction model. For ease of description, the present application embodiment refers to the cell type of each target cell obtained during the initial model training process as the predicted cell type.
[0098] In the process of training the initial model, the predicted cell type of each target cell is determined based on the initial gene coding characteristics. Figure 1 The method of determining the cell type of each target cell based on the gene coding feature shown in step S21 is the same and will not be repeated here.
[0099] Furthermore, after obtaining the initial gene coding features, the gene expression data corresponding to each target (hereinafter referred to as training gene expression data for ease of description) can be determined based on the initial gene coding features after the target gene expression features are processed by the initial model.
[0100] For each predicted cell type, the training gene expression data corresponding to at least one target cell belonging to the predicted cell type may be averaged to obtain average training gene expression data corresponding to the predicted cell type.
[0101] Based on the average training gene expression data corresponding to each predicted cell type, the predicted gene expression distribution corresponding to each predicted cell type is obtained. The predicted gene expression distribution is used to represent a single cell gene expression distribution corresponding to each cell type included in the tissue sample after the target gene expression characteristics are processed by the initial model. In addition, the ranking of each predicted cell type in the predicted gene expression distribution can be determined based on the actual application scenario requirements, and is not limited here.
[0102] At the same time, at least one single-cell gene expression data corresponding to each predicted cell type can be determined from the pre-constructed single-cell gene expression data set, and for each predicted cell type, at least one single-cell gene expression data belonging to the predicted cell type can also be evaluated and processed to obtain the average gene expression data corresponding to the predicted cell type.
[0103] Similarly, based on the average gene expression data corresponding to each predicted cell type, the actual gene expression distribution corresponding to each predicted cell type is obtained. The actual gene expression distribution is used to represent a single cell gene expression distribution actually corresponding to each predicted cell type. In addition, the ranking of each predicted cell type in the predicted gene expression distribution is consistent with the ranking of each predicted cell type in the above-mentioned predicted gene expression distribution.
[0104] Further, the KL divergence between the predicted gene expression distribution and the actual gene expression distribution corresponding to each predicted cell type may be determined, and the determined KL divergence may be determined as the total training loss value in the model training process.
[0105] At this time, the total training loss value in the model training process represents the difference between the predicted gene expression distribution corresponding to each predicted cell type and the actual gene expression distribution. The larger the total training loss value, the greater the difference between the predicted gene expression distribution corresponding to each predicted cell type and the actual gene expression distribution, which further indicates that the initial gene encoding obtained by the initial model after fusing the position information of each target cell, the training gene expression data of each target cell cannot fully represent each target cell, and the initial model needs to be trained further. Conversely, the smaller the total training loss value, the smaller the difference between the predicted gene expression distribution corresponding to each predicted cell type and the actual gene expression distribution, which further indicates that the initial gene encoding obtained by the initial model after fusing the position information of each target cell, the closer the training gene expression data of each target cell is to the gene expression data of each target cell, and the model training effect is getting better and better.
[0106] Among them, the pre-constructed single-cell gene expression dataset is an existing dataset that includes gene expression data of multiple cells under multiple cell types, including but not limited to single-cell gene expression data obtained by microdissection technology, fluorescence in situ hybridization technology (fluorescence in situ hybridization, FISH) and in situ capture technology. The specific data can be determined based on the actual application scenario requirements and is not limited here.
[0107] Among them, the granularity division of the predicted cell types of the target tissue cells determined in the embodiment of the present application can be determined based on the actual application scenario requirements, such as including epithelial tissue cells, connective tissue cells, muscle tissue cells, and neural tissue cells, etc., and further classification of a certain large type of cells, such as further classification of mouse cerebral cortical cells, is not limited here.
[0108] Among them, the pre-constructed single-cell gene expression dataset can be stored in a server, a database, a cloud storage space or a blockchain, which can be determined based on the actual application scenario requirements and is not limited here. Among them, the database can be regarded as an electronic file cabinet in short - a place to store electronic files, which can be used for project cache information in this application. Blockchain is a new application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, which is a string of data blocks generated by cryptographic methods. In this application, each data block in the blockchain can store a single-cell gene expression dataset. Cloud storage is a new concept extended and developed from the concept of cloud computing. It refers to the use of cluster applications, grid technology, and distributed storage file systems. Functions such as file systems bring together a large number of different types of storage devices (storage devices are also called storage nodes) in the network through application software or application interfaces to work together to store single-cell gene expression datasets.
[0109] Based on this, when obtaining pre-constructed single-cell gene expression data, it can be obtained from the server, database, cloud storage space or blockchain according to actual needs.
[0110] In some feasible implementations, when determining the total training loss value, a first training loss value may also be determined based on the predicted gene expression distribution and the actual gene expression distribution corresponding to each predicted cell type.
[0111] At the same time, the initial gene coding features corresponding to the tissue sample are input into the decoding model, and the initial gene coding features are decoded by the decoding model to obtain the restored gene expression features corresponding to the tissue sample. Among them, the decoding model has a completely opposite neural network structure to the initial model, and adjusts its own model parameters according to the adjustment of the model parameters of the initial model during the model training process to adapt to the changes in the model parameters of the initial model, so that the initial gene coding features can be restored by performing sliding window deconvolution operations on the initial gene coding features through the deconvolution layer.
[0112] Among them, in the process of decoding the initial gene coding features based on the decoding model, the convolution features obtained by each convolution layer of the initial model in this training process are obtained through skip connection, and the deconvolution features obtained by each deconvolution are fused with the corresponding convolution features, so as to further deconvolute the fused convolution features to improve the feature recognition rate and accuracy of each deconvolution process of the decoding model.
[0113] Based on this, the second training loss value can be determined based on the target gene expression characteristics and the restored gene expression characteristics corresponding to the tissue sample, and the second training loss value characterizes the difference between the target gene expression characteristics and the restored gene expression characteristics corresponding to the tissue sample. The smaller the second training loss value, the closer the restored gene expression characteristics are to the target gene expression characteristics, which further indicates that the encoding stability and accuracy of the initial model are high. The smaller the second training loss value, the greater the difference between the restored gene expression characteristics and the target gene expression characteristics, which further indicates that the encoding stability and accuracy of the initial model need to be improved and further training is required.
[0114] Further, the total training loss value can be determined based on the first training loss value and the second training loss value. For example, the sum of the first training loss value and the second training loss value can be determined as the total training loss value, or the training weights corresponding to the first training loss value and the second training loss value can be determined respectively, and the weighted sum of the first training loss value and the second training loss value can be determined as the total training loss value, or the first training loss value and the second training loss value can be normalized, and the sum of the normalized first training loss value and the second training loss value can be determined as the total training loss value.
[0115] Among them, the above method of determining the total training loss value based on the first training loss value and the second training loss value is only an example, and can be specifically determined based on the actual application scenario requirements, and is not limited here.
[0116] Among them, when determining the second training loss value based on the target gene expression features and the restored gene expression features corresponding to the tissue sample, the cross entropy loss of the target gene expression features and the restored gene expression features can be determined, and the obtained cross entropy loss is determined as the second training loss value.
[0117] Alternatively, the feature similarity between the target gene expression feature and the restored gene expression feature corresponding to the tissue sample may be determined, and the obtained feature similarity may be determined as the second training loss value.
[0118] Alternatively, the gene expression data of each target cell can be determined based on the target gene expression characteristics, and the restored gene expression data of each target cell can be determined based on the restored gene expression characteristics, so as to determine the KL divergence of the gene expression data of each target cell and the restored gene expression data, and determine the KL divergence as the second training loss value.
[0119] The above method for determining the second training loss value is only an example, and can be determined based on the actual application scenario requirements, and is not limited here.
[0120] Step S43: iteratively train the initial model based on the total training loss value until the total training loss value meets the training end condition, stop the training and determine the initial model at the end of the training as the encoding model.
[0121] In some feasible implementations, after determining the total training loss value corresponding to training the initial model, the initial model may be iteratively trained based on the total training loss value until the training is stopped when a preset training end condition is met.
[0122] Among them, the above-mentioned training end condition can be that the total training loss value reaches convergence, or the total training loss value for a consecutive preset number of times is less than a preset threshold, or the difference between two consecutive total training loss values for a consecutive preset number of times is less than a preset threshold, etc. The specific conditions can be determined based on the actual application scenario requirements and are not limited here.
[0123] For each training, the training is stopped when the total training loss value meets the training end condition, and the initial model at the end of the training is determined as the final encoding model. If the total training loss value does not meet the training end condition during the training of the initial model, the model parameters of the initial model can be adjusted, and the adjusted model is trained again based on the above method and the total training loss value is determined, until the total training loss value meets the training end condition, the training is stopped.
[0124] like Figure 5a As shown, Figure 5aIt is a schematic diagram of a scenario of model training through an embodiment of the present application. During the initial model training process, the predicted gene expression distribution corresponding to each predicted cell type can be determined based on the predicted cell type of each target cell in the tissue sample, and the actual gene expression distribution corresponding to each predicted cell type can be determined through the constructed single-cell gene expression data set. Thus, the total training loss value can be determined based on the predicted gene expression distribution corresponding to each predicted cell type and the actual gene expression distribution, and the initial model can be iteratively trained based on the total training loss value and the target gene expression characteristics corresponding to the tissue sample until the total training loss value meets the training end condition, the training is stopped and the initial model at the time of stopping the training is determined as the final encoding model.
[0125] like Figure 5b As shown, Figure 5b It is another scene schematic diagram of the model training provided by the embodiment of the present application. In the process of training the initial model, the predicted gene expression distribution corresponding to each predicted cell type can be determined based on the predicted cell type of each target cell in the tissue sample, and the actual gene expression distribution corresponding to each predicted cell type can be determined by the constructed single-cell gene expression data set. Thus, the first training loss value can be determined based on the predicted gene expression distribution and the actual gene expression distribution corresponding to each predicted cell type. At the same time, based on the decoder corresponding to the initial model of this training process, the initial gene encoding feature corresponding to the tissue sample is decoded to obtain the restored gene expression feature corresponding to the tissue sample, thereby determining the second training loss value based on the target gene expression feature and the restored gene expression feature of the tissue sample, and then determining the total training loss value based on the first training loss value and the second training loss value, and iteratively training the initial model based on the total training loss value and the target gene expression feature corresponding to the tissue sample, until the total training loss value meets the training end condition, stop training and determine the initial model when the training is stopped as the final coding model.
[0126] The cell type determination method and coding model training method provided in the embodiments of the present application can be performed based on a training device, which can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, a cloud server providing cloud computing services, or a terminal device with data processing capabilities, without limitation. The terminal device can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a car terminal, a smart TV, etc., but is not limited thereto.
[0127] The target gene expression characteristics corresponding to the tissue sample determined by the embodiment of the present application may include gene expression data and position information of the target gene, so that the gene expression characteristics of each target cell are fused with the position information during the encoding of the target gene expression characteristics of the tissue sample by the coding model. And because the training loss in the model training process is determined based on the predicted gene expression distribution corresponding to the predicted cell type and the actual gene expression distribution, the gene coding characteristics encoded by the coding model obtained on this basis for the target gene expression characteristics have higher accuracy. And then when determining the cell type of each target cell in the tissue sample based on the gene coding characteristics, in the case of the positional relationship between the fused cells, compared with the traditional method of directly determining the cell type based on the clustering algorithm, it has higher accuracy and high applicability.
[0128] like Figure 6 As shown, Figure 6 is a schematic diagram of the cell type determination effect provided in the embodiment of the present application. Each square in the figure represents a cell in a tissue sample, and different types of squares represent different corresponding cell types. Among them, Figure 6 The diagram on the left is a diagram of the results of the traditional direct determination of cell types based on clustering algorithms. It is not difficult to find that when cell types are directly determined based on clustering algorithms, a large number of cell types may be incorrect. Figure 6 The schematic diagram on the middle right is the cell type determined based on the cell type determination method provided in the embodiment of the present application. Based on this method, cells of the same type can be more concentrated, the segmentation between cell clusters of different types can be more obvious, and the cell determination effect can be better.
[0129] See also Figure 7 , Figure 7 : is a schematic diagram of the structure of the cell type determination device provided in the embodiment of the present application. The cell type determination device provided in the embodiment of the present application includes:
[0130] A data processing module 71 is used to determine the gene expression data of each target cell in the tissue sample and the position information of each target cell in the tissue sample, and determine the target gene expression characteristics corresponding to the tissue sample based on the gene expression data of each target cell and the corresponding position information;
[0131] A type determination module 72 is used to input the target gene expression characteristics into a coding model to obtain the gene coding characteristics corresponding to the tissue sample, and determine the cell type of each of the target cells based on the gene coding characteristics;
[0132] The coding model is obtained through training by a training device, and the training device is used for:
[0133] Inputting the target gene expression characteristics into the initial model to obtain the initial gene coding characteristics corresponding to the tissue sample;
[0134] Based on the initial gene coding features, determining the predicted cell type of each of the target cells and the predicted gene expression distribution corresponding to each of the predicted cell types, determining the actual gene expression distribution corresponding to each of the predicted cell types, and determining a total training loss value based on the predicted gene expression distribution and the actual gene expression distribution;
[0135] The above-mentioned initial model is iteratively trained based on the above-mentioned total training loss value until the above-mentioned total training loss value meets the training end condition, the training is stopped and the initial model at the end of the training is determined as the above-mentioned encoding model.
[0136] In some feasible implementations, the data processing module 71 is used to:
[0137] Determine the transcript counts of all cells in the tissue sample, and identify cells whose transcript counts are within a preset range as target cells;
[0138] The initial gene expression data of each of the target cells is determined, and data optimization is performed on each of the initial gene expression data to obtain the gene expression data of each of the target cells.
[0139] In some feasible implementations, the data processing module 71 is used to:
[0140] removing abnormal gene data from the initial gene expression data of each of the target cells;
[0141] The above initial gene expression data were normalized.
[0142] In some feasible implementations, the data processing module 71 is used to:
[0143] For each of the target cells, based on the gene expression data and the corresponding position information of the target cell, determining the gene expression characteristics corresponding to the target cell;
[0144] Based on the gene expression features corresponding to the target cells, the target gene expression features corresponding to the tissue sample are determined, where the target gene expression features include the gene expression data of the target cells and the corresponding position information.
[0145] In some feasible implementations, the type determination module 72 is further configured to:
[0146] For each of the target cells, a target gene associated with the cell type of the target cell is determined, and the target cell is marked as a cell type based on the target gene.
[0147] In some feasible implementations, the above training device is used to:
[0148] Clustering each of the target cells based on the initial gene coding features to obtain a predicted cell type of each of the target cells;
[0149] Based on the initial gene coding features and each of the predicted cell types, a predicted gene expression distribution corresponding to each of the predicted cell types is determined.
[0150] In some feasible implementations, the above training device is used to:
[0151] Determining at least one single-cell gene expression data corresponding to each of the predicted cell types from a pre-constructed single-cell gene expression dataset;
[0152] For each of the predicted cell types, determining average gene expression data of at least one single-cell gene expression data corresponding to the predicted cell type;
[0153] Based on the average gene expression data corresponding to each of the predicted cell types, the actual gene expression distribution corresponding to each of the predicted cell types is determined.
[0154] In some feasible implementations, the above training device is used to:
[0155] Determining a first training loss value based on the predicted gene expression distribution and the actual gene expression distribution;
[0156] Decoding the initial gene coding features to obtain the reduced gene expression features corresponding to the tissue samples;
[0157] Determining a second training loss value based on the target gene expression features and the restored gene expression features corresponding to the tissue sample;
[0158] Based on the first training loss value and the second training loss value, a total training loss value is determined.
[0159] In a specific implementation, the above-mentioned cell type determination device can execute the above-mentioned various function modules built in it. Figure 1 For the implementation methods provided in each step, please refer to the implementation methods provided in the above steps for details, which will not be repeated here.
[0160] See also Figure 8 , Figure 8 Schematic diagram of the structure of the electronic device provided in the embodiment of the present application. Figure 8As shown, the electronic device 800 in this embodiment may include: a processor 801, a network interface 804 and a memory 805. In addition, the above-mentioned electronic device 800 may also include: a user interface 803, and at least one communication bus 802. Among them, the communication bus 802 is used to realize the connection and communication between these components. Among them, the user interface 803 may include a display screen (Display), a keyboard (Keyboard), and the user interface 803 may optionally include a standard wired interface and a wireless interface. The network interface 804 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 804 may be a high-speed RAM memory, or it may be a non-volatile memory (NVM), such as at least one disk storage. The memory 805 may optionally also be at least one storage device located away from the aforementioned processor 801. As Figure 8 As shown, the memory 805 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a device control application program.
[0161] exist Figure 8 In the electronic device 800 shown, the network interface 804 can provide a network communication function; the user interface 803 is mainly used to provide an input interface for the user; and the processor 801 can be used to call the device control application stored in the memory 805 to achieve:
[0162] Determine gene expression data of each target cell in the tissue sample and position information of the target cell in the tissue sample, and determine the target gene expression characteristics corresponding to the tissue sample based on the gene expression data of each target cell and the corresponding position information;
[0163] Inputting the target gene expression characteristics into a coding model to obtain the gene coding characteristics corresponding to the tissue sample, and determining the cell type of each of the target cells based on the gene coding characteristics;
[0164] The encoding model may be obtained by training the processor 901 in the following manner:
[0165] Inputting the target gene expression characteristics into the initial model to obtain the initial gene coding characteristics corresponding to the tissue sample;
[0166] Based on the initial gene coding features, determining the predicted cell type of each of the target cells and the predicted gene expression distribution corresponding to each of the predicted cell types, determining the actual gene expression distribution corresponding to each of the predicted cell types, and determining a total training loss value based on the predicted gene expression distribution and the actual gene expression distribution;
[0167] The above-mentioned initial model is iteratively trained based on the above-mentioned total training loss value until the above-mentioned total training loss value meets the training end condition, the training is stopped and the initial model at the end of the training is determined as the above-mentioned encoding model.
[0168] In some feasible implementations, the processor 801 is configured to:
[0169] Determine the transcript counts of all cells in the tissue sample, and identify cells whose transcript counts are within a preset range as target cells;
[0170] The initial gene expression data of each of the target cells is determined, and data optimization is performed on each of the initial gene expression data to obtain the gene expression data of each of the target cells.
[0171] In some feasible implementations, the processor 801 is configured to:
[0172] removing abnormal gene data from the initial gene expression data of each of the target cells;
[0173] The above initial gene expression data were normalized.
[0174] In some feasible implementations, the processor 801 is configured to:
[0175] For each of the target cells, based on the gene expression data and the corresponding position information of the target cell, determining the gene expression characteristics corresponding to the target cell;
[0176] Based on the gene expression features corresponding to the target cells, the target gene expression features corresponding to the tissue sample are determined, where the target gene expression features include the gene expression data of the target cells and the corresponding position information.
[0177] In some feasible implementations, the processor 801 is further configured to:
[0178] For each of the target cells, a target gene associated with the cell type of the target cell is determined, and the target cell is marked as a cell type based on the target gene.
[0179] In some feasible implementations, the processor 801 is configured to:
[0180] Clustering each of the target cells based on the initial gene coding features to obtain a predicted cell type of each of the target cells;
[0181] Based on the initial gene coding features and each of the predicted cell types, a predicted gene expression distribution corresponding to each of the predicted cell types is determined.
[0182] In some feasible implementations, the processor 801 is configured to:
[0183] Determining at least one single-cell gene expression data corresponding to each of the predicted cell types from a pre-constructed single-cell gene expression dataset;
[0184] For each of the predicted cell types, determining average gene expression data of at least one single-cell gene expression data corresponding to the predicted cell type;
[0185] Based on the average gene expression data corresponding to each of the predicted cell types, the actual gene expression distribution corresponding to each of the predicted cell types is determined.
[0186] In some feasible implementations, the processor 801 is configured to:
[0187] Determining a first training loss value based on the predicted gene expression distribution and the actual gene expression distribution;
[0188] Decoding the initial gene coding features to obtain the reduced gene expression features corresponding to the tissue samples;
[0189] Determining a second training loss value based on the target gene expression features and the restored gene expression features corresponding to the tissue sample;
[0190] Based on the first training loss value and the second training loss value, a total training loss value is determined.
[0191] It should be understood that in some feasible implementations, the processor 801 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.
[0192] In a specific implementation, the electronic device 800 can execute the above-mentioned functions through its built-in functional modules. Figure 1 and / or Figure 4 For the implementation methods provided in each step, please refer to the implementation methods provided in the above steps for details, which will not be repeated here.
[0193] The present application also provides a computer-readable storage medium, which stores a computer program and is executed by a processor to implement Figure 1 and / or Figure 4 For the methods provided in each step, please refer to the implementation methods provided in the above steps for details, which will not be repeated here.
[0194] The computer-readable storage medium may be an internal storage unit of the cell type determination device or electronic device provided in any of the aforementioned embodiments, such as a hard disk or memory of an electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., equipped on the electronic device. The computer-readable storage medium may also include a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc. Further, the computer-readable storage medium may also include both an internal storage unit of the electronic device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the electronic device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
[0195] The present invention provides a computer program product, which includes a computer program or a computer instruction. The computer program or the computer instruction is executed by a processor. Figure 1 and / or Figure 4 The methods provided in each step.
[0196] The terms "first", "second", etc. in the claims, specification and drawings of the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or electronic device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or electronic devices. Mentioning "embodiment" in this article means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present application. Displaying the phrase at various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments. The term "and / or" used in the present application specification and the attached claims refers to any combination of one or more of the items listed in association and all possible combinations, and includes these combinations.
[0197] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Professional and technical personnel may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0198] The above disclosure is only the preferred embodiment of the present application, which cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A method for determining a cell type, characterized in that: The method comprises: Determine gene expression data of each target cell in the tissue sample and position information in the tissue sample, and determine a target gene expression feature corresponding to the tissue sample based on the gene expression data of each target cell and the corresponding position information; Inputting the target gene expression feature into a coding model to obtain a gene coding feature corresponding to the tissue sample, and determining the cell type of each of the target cells based on the gene coding feature; The encoding model is trained based on the following method: Inputting the target gene expression characteristics into an initial model to obtain initial gene coding characteristics corresponding to the tissue sample; Determine, based on the initial gene encoding features, a predicted cell type of each of the target cells and a predicted gene expression distribution corresponding to each of the predicted cell types, determine an actual gene expression distribution corresponding to each of the predicted cell types, and determine a total training loss value based on the predicted gene expression distribution and the actual gene expression distribution; The initial model is iteratively trained based on the total training loss value until the total training loss value meets the training end condition, the training is stopped and the initial model at the end of the training is determined as the encoding model.
2. The method according to claim 1, characterized in that The step of determining the gene expression data of each target cell in the tissue sample comprises: Determine the transcript counts of all cells in the tissue sample, and identify cells whose transcript counts are within a preset range as target cells; The initial gene expression data of each of the target cells is determined, and data optimization is performed on each of the initial gene expression data to obtain the gene expression data of each of the target cells.
3. The method according to claim 2, characterized in that The step of optimizing the initial gene expression data comprises at least one of the following: removing abnormal gene data from the initial gene expression data of each of the target cells; Each of the initial gene expression data was normalized.
4. The method according to claim 1, characterized in that: The step of determining the target gene expression characteristics corresponding to the tissue sample based on the gene expression data and the corresponding position information of each target cell includes: For each of the target cells, determining a gene expression feature corresponding to the target cell based on the gene expression data of the target cell and the corresponding position information; Based on the gene expression features corresponding to each of the target cells, the target gene expression features corresponding to the tissue sample are determined, where the target gene expression features include the gene expression data of each of the target cells and the corresponding position information.
5. The method according to claim 1, characterized in that The method further comprises: For each of the target cells, a target gene associated with the cell type of the target cell is determined, and the target cell is marked as a cell type based on the target gene.
6. The method according to claim 1, characterized in that The step of determining the predicted cell type of each target cell and the predicted gene expression distribution corresponding to each predicted cell type based on the initial gene coding feature comprises: Clustering each of the target cells based on the initial gene coding features to obtain a predicted cell type of each of the target cells; Based on the initial gene encoding features and each of the predicted cell types, a predicted gene expression distribution corresponding to each of the predicted cell types is determined.
7. The method according to claim 1, characterized in that Determining the actual gene expression distribution corresponding to each of the predicted cell types comprises: Determining at least one single-cell gene expression data corresponding to each of the predicted cell types from a pre-constructed single-cell gene expression dataset; For each of the predicted cell types, determining average gene expression data of at least one single-cell gene expression data corresponding to the predicted cell type; Based on the average gene expression data corresponding to each of the predicted cell types, the actual gene expression distribution corresponding to each of the predicted cell types is determined.
8. The method according to claim 1, characterized in that Determining a total training loss value based on the predicted gene expression distribution and the actual gene expression distribution includes: Determining a first training loss value based on the predicted gene expression distribution and the actual gene expression distribution; Decoding the initial gene coding feature to obtain a reduced gene expression feature corresponding to the tissue sample; Determining a second training loss value based on the target gene expression features and the restored gene expression features corresponding to the tissue sample; A total training loss value is determined based on the first training loss value and the second training loss value.
9. A cell type determination device, characterized in that: The device comprises: A data processing module, used to determine the gene expression data of each target cell in the tissue sample and the position information in the tissue sample, and determine the target gene expression characteristics corresponding to the tissue sample based on the gene expression data of each target cell and the corresponding position information; A type determination module, used to input the target gene expression feature into a coding model to obtain the gene coding feature corresponding to the tissue sample, and determine the cell type of each of the target cells based on the gene coding feature; The coding model is obtained through training by a training device, and the training device is used to: Inputting the target gene expression characteristics into an initial model to obtain initial gene coding characteristics corresponding to the tissue sample; Determine, based on the initial gene encoding features, a predicted cell type of each of the target cells and a predicted gene expression distribution corresponding to each of the predicted cell types, determine an actual gene expression distribution corresponding to each of the predicted cell types, and determine a total training loss value based on the predicted gene expression distribution and the actual gene expression distribution; The initial model is iteratively trained based on the total training loss value until the total training loss value meets the training end condition, the training is stopped and the initial model at the end of the training is determined as the encoding model.
10. An electronic device, characterized in that: comprising a processor and a memory, wherein the processor and the memory are connected to each other; The memory is used to store computer programs; The processor is configured to execute the method according to any one of claims 1 to 8 when calling the computer program.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 8.
12. A computer program product, characterized in that The computer program product comprises a computer program or a computer instruction, and when the computer program or the computer instruction is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
