Nucleic acid cell granularity deconvolution method and device based on deep learning

Through the deep learning-based deconvolution method of nucleic acid cells, the free nucleic acid expression profile is analyzed, and the algorithm instability problem caused by relying on cell type-specific genes in the prior art is solved, and a more stable calculation of cell type contribution scores is achieved.

CN119905146APending Publication Date: 2025-04-29SHENZHEN HUADA GENE INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311427225.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-27
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

When performing the analysis of free nucleic acid expression profiles, the prior art relies on cell type-specific genes, which leads to insolubilization of the model and is greatly affected by the output stability of the sequencing expression profile. No effective solution has been proposed.

Method used

The nucleic acid cell granularity deconvolution method based on deep learning is used to obtain the nucleic acid expression profile of the target object and input it into a deep learning model containing the pathway mask matrix and iterable update parameter set for deconvolution operation, and the N-dimensional cell type ratio of the target object is output.

Benefits of technology

This method does not rely on cell type-specific genes, improves the stability of expression profile analysis, can directly determine the source scores of each cell type in free nucleic acid, and achieves a relatively stable calculation of cell contribution scores.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119905146A_ABST
    Figure CN119905146A_ABST
Patent Text Reader

Abstract

The invention discloses a nucleic acid cell granularity deconvolution method and device based on deep learning, and relates to the field of artificial intelligence or other related technical fields, and the method comprises the steps: obtaining a nucleic acid expression profile of a target object, the nucleic acid expression profile is obtained through a preset sequencing technology, the nucleic acid expression profile is inputted to a target deep learning model, and the target deep learning model is obtained; deconvolution operation is conducted on the nucleic acid expression profile through the target deep learning model, the N-dimensional cell type proportion of the target object is output, and the cell type proportion is the cell contribution score of the corresponding cell type in the free nucleic acid. According to the method and the device, the technical problems that the analysis of the free nucleic acid expression profile depends on a cell type specific gene and the algorithm is unstable in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method and device for nucleic acid cell granularity deconvolution based on deep learning. Background Art

[0002] Free RNA refers to endogenous or exogenous RNA that exists outside cells in body fluids. It is a mixture of transcripts from multiple tissues that can reflect the health of the corresponding tissues and provide a potential window for understanding the health, phenotype, and development of various human organs. Since high-throughput sequencing technology for free RNA has only achieved breakthroughs in recent years, its research, including reported cell tracing, is relatively small. Currently, a few studies have found that in pregnancy diseases, cancers, and neurodegenerative diseases, the free RNA components of corresponding specific tissues and cells are changed, suggesting that free RNA cell tracing is valuable for non-invasive monitoring of diseases, and its application potential needs to be developed urgently.

[0003] In related technologies, when free RNA cell tracing is performed, the analysis is mostly based on cell type specificity. However, this method relies on the specific genes of each cell, resulting in an insufficiently robust model and is greatly affected by the output stability of the expression profile obtained by sequencing.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present invention provide a method and device for nucleic acid cell granularity deconvolution based on deep learning, so as to at least solve the technical problem of algorithm instability when performing free nucleic acid expression spectrum analysis in related technologies, which depends on cell type-specific genes.

[0006] According to one aspect of an embodiment of the present invention, a nucleic acid cell granularity deconvolution method based on deep learning is provided, comprising: obtaining a nucleic acid expression spectrum of a target object, wherein the nucleic acid expression spectrum is obtained by a preset sequencing technology; inputting the nucleic acid expression spectrum into a target deep learning model, and performing a deconvolution operation on the nucleic acid expression spectrum by the target deep learning model to output an N-dimensional cell type ratio of the target object, wherein the cell type ratio is the cell contribution fraction of the corresponding cell type in the free nucleic acid, and the target deep learning model comprises a pathway mask matrix and a parameter set that can be iteratively updated, and N is a positive integer greater than 1.

[0007] Optionally, the step of performing a deconvolution operation on the nucleic acid expression spectrum by the target deep learning model to output the N-dimensional cell type ratio of the target object includes: after inputting the nucleic acid expression spectrum into the target deep learning model, performing a deconvolution operation on the nucleic acid expression spectrum by the updated target deep learning model to obtain a set of proportions of each cell type, wherein, in the process of updating the target deep learning model, the initial tokens, target matrix and initialized deep neural network obtained by random initialization are processed by the gradient obtained by the loss function, and the set of proportions of each cell type is combined with the simulated nucleic acid expression spectrum to update the trainable network parameters in the initial deep neural network; and the target deep learning model is used to output the N-dimensional cell type ratio of the target object.

[0008] Optionally, when generating the target matrix, it includes: using a single-cell sequencing data set to simulate the expression spectrum of nucleic acid to obtain a simulated nucleic acid expression spectrum, wherein the simulated nucleic acid expression spectrum contains: a mixed fraction vector set of M reference cell types, a mixture expression list of all the reference cell types, and the mixture expression list records the gene expression set corresponding to each reference cell type, and M is a positive integer greater than 1; selecting a highly variable gene set from the simulated nucleic acid expression spectrum; based on the highly variable gene set and a preset pathway data set, generating the pathway mask matrix, wherein the preset pathway data set contains M pathways, and each of the pathways contains a gene set; based on the pathway mask matrix, embedding the simulated nucleic acid expression spectrum to generate a target matrix.

[0009] Optionally, the step of using a single-cell sequencing data set to simulate and generate an expression profile of nucleic acids to obtain a simulated nucleic acid expression profile includes: selecting M reference cell types from a total set of cell types; selecting a total number of cells T of each reference cell type for calculating the expression value of cells of that type; randomly generating a mixture fraction vector set F of M reference cell types, wherein the mixture fraction vector set F contains M fraction vectors, and the mixture fractions of the M reference cell types add up to 1; for each reference cell type i, determining the mixture fraction Fi of the reference cell type, the average expression vector set Ti of the total number of cells T sampled this time of the reference cell type, and calculating the mixture expression amount Fi*Ti of the cell type in free RNA; accumulating the mixture expression amounts Fi*Ti of all the cell types to obtain a mixture expression list; saving the mixture expression list and the mixture fraction vector set F in a cell analysis library to obtain the simulated nucleic acid expression profile.

[0010] Optionally, the step of selecting a highly variable gene set from the simulated nucleic acid expression spectrum includes: selecting genes whose variance is greater than a preset variance threshold according to a preset number from the gene set in the mixture expression list to obtain the highly variable gene set.

[0011] Optionally, based on the highly variable gene set and the preset pathway data set, the step of generating the pathway mask matrix comprises: obtaining a preset pathway data set, wherein each pathway in the preset pathway data set contains a gene set; for each of the pathways, calculating the overlap between the genes in the gene set of the pathway and all the highly variable genes in the highly variable gene set; selecting a pathway set whose overlap is greater than a preset overlap threshold; performing an intersection operation on the genes in the pathway set and all the genes in the highly variable gene set to obtain genes in a matrix list; constructing an all-zero matrix with the number of pathways in the pathway set as the number of rows and the number of genes in the matrix list as the number of columns, wherein each row in the all-zero matrix corresponds to a pathway; for each row in the all-zero matrix, obtaining the gene position of the gene set contained in the pathway corresponding to the row; assigning a specified value to the number 0 associated with the gene position in the all-zero matrix; and generating the pathway mask matrix after assigning values ​​to all pathways corresponding to each row in the all-zero matrix.

[0012] Optionally, based on the pathway mask matrix, the simulated nucleic acid expression spectrum is embedded to generate a target matrix, comprising: taking the intersection of the mixture expression list and the matrix list to obtain a mixed gene intersection; taking the number of rows of the pathway mask matrix as the number of replications, replicating the mixture expression list multiple times to generate a first matrix; performing dot multiplication on the first matrix and the pathway mask matrix to generate a second matrix; randomly initializing a fully connected weight matrix, wherein the size of the fully connected weight matrix is ​​the product of the number of genes in the matrix list and the number of embedding dimensions; and multiplying the second matrix by the fully connected weight matrix to obtain the target matrix.

[0013] Optionally, the iteratively updateable parameter set includes: a network structure of a deep neural network, the number of fully connected layers of the deep neural network, and a fully connected weight matrix.

[0014] Optionally, the target deep learning model is pre-trained, and when training the target deep learning model, it includes: constructing an initial deep neural network with a Transformer network as the architecture; randomly initializing a token to obtain an initial token; inputting the target matrix and the initial token into the initial deep neural network to obtain a set of proportions of each cell type, wherein each row of the target matrix is ​​defined as a token; calculating the mean square error of the numerical values ​​of the proportion set and the non-zero positions in the mixed fraction vector set in the simulated nucleic acid expression spectrum, and using the mean square error as a model loss function, wherein the model loss function is used to determine the model gradient; updating the set of iteratively updateable parameters in the initial deep neural network based on the model gradient; training the initial deep neural network using a preheating and cosine annealing decay strategy to train and generate the target deep learning model.

[0015] According to another aspect of an embodiment of the present invention, a nucleic acid cell granularity deconvolution device based on deep learning is also provided, including: an acquisition unit, used to acquire a nucleic acid expression spectrum of a target object, wherein the nucleic acid expression spectrum is acquired through a preset sequencing technology; a deconvolution unit, used to input the nucleic acid expression spectrum into a target deep learning model, and the target deep learning model performs a deconvolution operation on the nucleic acid expression spectrum to output an N-dimensional cell type ratio of the target object, wherein the cell type ratio is the cell contribution fraction of the corresponding cell type in the free nucleic acid, and the target deep learning model includes a pathway mask matrix and a parameter set that can be iteratively updated, and N is a positive integer greater than 1.

[0016] Optionally, the deconvolution unit includes: a deconvolution module, which is used to, after the nucleic acid expression spectrum is input into the target deep learning model, perform a deconvolution operation on the nucleic acid expression spectrum by the updated target deep learning model to obtain a set of proportions of each cell type, wherein in the process of updating the target deep learning model, the gradient obtained by the loss function is used to process the initial tokens obtained by random initialization, the target matrix and the initialized deep neural network, and the set of proportions of each cell type is combined with the simulated nucleic acid expression spectrum to update the trainable network parameters in the initial deep neural network; the target deep learning model is used to output the N-dimensional cell type ratio of the target object.

[0017] Optionally, when generating the target matrix, the nucleic acid cell granularity deconvolution device based on deep learning includes: a first acquisition module, used to simulate the expression spectrum of nucleic acid generated by using a single-cell sequencing data set to obtain a simulated nucleic acid expression spectrum, wherein the simulated nucleic acid expression spectrum includes: a mixed fraction vector set of M reference cell types, a mixture expression list of all the reference cell types, and the mixture expression list records the gene expression set corresponding to each reference cell type, M is a positive integer greater than 1; a first selection unit, used to select a highly variable gene set from the simulated nucleic acid expression spectrum; a second generation unit, used to generate the pathway mask matrix based on the highly variable gene set and a preset pathway data set, wherein the preset pathway data set contains M pathways, and each of the pathways contains a gene set; a third generation unit, used to embed the simulated nucleic acid expression spectrum based on the pathway mask matrix to generate a target matrix.

[0018] Optionally, the first acquisition module includes: a first selection submodule, used to select M reference cell types from the total set of cell types; a second selection submodule, used to select the total number of cells T of each reference cell type for calculating the expression value of the cells of this type; a random generation module, used to randomly generate a mixture fraction vector set F of M reference cell types, wherein the mixture fraction vector set F contains M fraction vectors, and the mixture fractions of the M reference cell types add up to 1; a first determination module, used to determine, for each reference cell type i, the mixture fraction Fi of the reference cell type, the average expression vector set Ti of the total number of cells T sampled this time of the reference cell type, and calculate the mixture expression amount Fi*Ti of the cell type in free RNA; an accumulation module, used to accumulate the mixture expression amounts Fi*Ti of all the cell types to obtain a mixture expression list; a saving module, used to save the mixture expression list and the mixture fraction vector set F in a cell analysis library to obtain the simulated nucleic acid expression spectrum.

[0019] Optionally, the first selection unit includes: a third selection submodule for selecting genes whose variance is greater than a preset variance threshold according to a preset number from the gene set in the mixture expression list to obtain the highly variable gene set.

[0020] Optionally, the second generation unit includes: a second acquisition module, used to acquire a preset pathway data set, wherein each pathway in the preset pathway data set contains a gene set; a first calculation module, used to calculate the overlap of the genes in the gene set of the pathway and all the highly variable genes in the highly variable gene set for each of the pathways; select a pathway set whose overlap is greater than a preset overlap threshold; a first intersection module, used to perform an intersection operation on the genes in the pathway set and all the genes in the highly variable gene set to obtain the genes in the matrix list; a construction module, used to construct an all-zero matrix with the number of pathways in the pathway set as the number of rows and the number of genes in the matrix list as the number of columns, wherein each row in the all-zero matrix corresponds to a pathway; a third acquisition module, used to acquire the gene position of the gene set contained in the pathway corresponding to each row in the all-zero matrix; and assign the number 0 associated with the gene position in the all-zero matrix to a specified value; a first generation module, used to generate the pathway mask matrix after assigning values ​​to all pathways corresponding to each row in the all-zero matrix.

[0021] Optionally, the third generation unit includes: a second intersection module, used to take the intersection of the mixture expression list and the matrix list to obtain a mixed gene intersection; a copy module, used to take the number of rows of the pathway mask matrix as the number of copies, and copy the mixture expression list multiple times to generate a first matrix; a second generation module, used to perform a dot product processing on the first matrix and the pathway mask matrix to generate a second matrix; a matrix initialization module, used to randomly initialize a fully connected weight matrix, wherein the size of the fully connected weight matrix is ​​the product of the number of genes in the matrix list and the number of embedded dimensions; a multiplication module, used to multiply the second matrix with the fully connected weight matrix to obtain the target matrix.

[0022] Optionally, the iteratively updateable parameter set includes: a network structure of a deep neural network, the number of fully connected layers of the deep neural network, and a fully connected weight matrix.

[0023] Optionally, the target deep learning model is pre-trained. When training the target deep learning model, the nucleic acid cell granularity deconvolution device based on deep learning includes: a construction unit, which is used to construct an initial deep neural network with a Transformer network as the architecture; an initialization unit, which is used to randomly initialize a token to obtain an initial token; a first input unit, which is used to input the target matrix and the initial token into the initial deep neural network to obtain a set of proportions of each cell type, wherein each row of the target matrix is ​​defined as a token; a first calculation unit, which is used to calculate the mean square error of the numerical values ​​of the proportion set and the non-zero positions in the mixed fraction vector set in the simulated nucleic acid expression spectrum, and use the mean square error as a model loss function, wherein the model loss function is used to determine the model gradient; a first update unit, which is used to update the iteratively updateable parameter set in the initial deep neural network based on the model gradient; a first generation unit, which is used to train the initial deep neural network using a preheating and cosine annealing decay strategy to train and generate the target deep learning model.

[0024] According to another aspect of an embodiment of the present invention, an electronic device is also provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the above-mentioned deep learning-based nucleic acid cell granularity deconvolution methods by executing the executable instructions.

[0025] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is also provided, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the deep learning-based nucleic acid cell granularity deconvolution methods described above.

[0026] In the present disclosure, a nucleic acid expression profile of a target object is obtained, wherein the nucleic acid expression profile is obtained by a preset sequencing technology, and the nucleic acid expression profile is input into a target deep learning model, and the target deep learning model performs a deconvolution operation on the nucleic acid expression profile to output an N-dimensional cell type ratio of the target object, wherein the cell type ratio is the cell contribution fraction of the corresponding cell type in the free nucleic acid, and the target deep learning model comprises a pathway mask matrix and a set of parameters that can be iteratively updated.

[0027] In the present disclosure, during the deconvolution process, pathway information is embedded into the nucleic acid expression spectrum, and the global information capture capability and over-parameterization advantages of the multi-head self-attention mechanism of the deep learning model are used. The cell deconvolution process does not rely on any cell type-specific genes, and there is no need to generate a matrix or list of cell type-specific genes. The source fraction of each cell type in the free nucleic acid can be directly determined, and the cell contribution fraction of the N-dimensional cell type in the free nucleic acid can be obtained. The expression spectrum analysis process is relatively stable, thereby solving the technical problems of relying on cell type-specific genes and unstable algorithms when performing free nucleic acid expression spectrum analysis in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0029] Figure 1 is a flowchart of an optional deep learning-based nucleic acid cell granularity deconvolution method according to an embodiment of the present invention;

[0030] Figure 2 is a schematic diagram of an optional construction of a deep learning model according to an embodiment of the present invention;

[0031] Figure 3 is a schematic diagram of an optional nucleic acid cell granularity deconvolution device based on deep learning according to an embodiment of the present invention;

[0032] Figure 4 It is a hardware structure block diagram of an electronic device (or mobile device) of a production scheduling method based on medical detection according to an embodiment of the present invention. DETAILED DESCRIPTION

[0033] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0035] To facilitate those skilled in the art to understand the present invention, some terms or nouns involved in the embodiments of the present invention are explained below:

[0036] RNA molecules mainly include protein-coding mRNA and non-coding RNA that does not encode proteins, such as long non-coding RNA (lncRNA) and micro RNA (miRNA).

[0037] Free RNA refers to endogenous or exogenous RNA that exists outside cells in body fluids. It is a mixture of transcripts derived from multiple tissues and can reflect the health status of the corresponding tissues.

[0038] Free RNA expression profile refers to the expression pattern that describes the types and quantities of free RNA. Free RNA expression profile reflects the activity and functional status of gene transcription in cells, and can be used to study cell development, disease mechanisms, and drug treatment. By comparing the differences in free RNA expression profiles between different samples, gene expression changes associated with specific diseases can be discovered, thereby providing potential biomarkers and therapeutic targets.

[0039] High-throughput sequencing of cellular RNA is a technology used to determine the type and quantity of RNA molecules in cells. It is done by transcribing RNA molecules in cells into cDNA and then performing high-throughput sequencing to obtain RNA sequence expression profiles. In the high-throughput sequencing process, the RNA in the cells is first extracted and goes through a series of processing steps, including RNA purification, transcription into cDNA, library construction, sequencing, etc. Subsequently, the cDNA is sequenced using a high-throughput sequencing platform (such as Illumina) to generate a large amount of RNA sequence information.

[0040] TSP dataset, Tabula-sapiens-portal is an open dataset that contains a large amount of human genome data, including gene sequences, gene expression data, genetic variation information, etc.

[0041] The scanpy.pp.normalize_total function is a function in the Scanpy library for performing total normalization on the AnnData object. Total normalization is a common data preprocessing step used to eliminate the influence of total differences between samples, making the comparison between samples more reliable and accurate. The function is to normalize the total number of each cell of the AnnData object to a specified target total number, for example, in the present invention, the target total number is set to 10000. The normalization process scales the expression value of each cell according to the ratio of the original total number of each cell to the target total number so that the sum of the total numbers of all cells is equal to the target total number. Total normalization is very important for single-cell RNA sequencing (scRNA-seq) data analysis, because the total expression between different cells may differ, and normalization can eliminate these differences, making the comparison between different cells more accurate.

[0042] Transformer is a deep learning model architecture based on self-attention mechanism, which includes an encoder and a decoder. The encoder converts the input sequence into a context vector, and the decoder converts the vector into an output sequence. In this embodiment, the deconvolution of the nucleic acid expression profile is achieved by Transformer, and the N-dimensional cell type ratio of the target object is output.

[0043] The present invention can calculate the source fraction of each cell type in various RNAs (especially free RNA), can be nested in system products such as early disease screening, liquid biopsy and health assessment, and can also be applied to various gene sequencing systems and cell tracing systems.

[0044] In the related technology, there are two main strategies for cell tracing: the first is to calculate the cell contribution score based on the single-cell expression spectrum by deconvolution; for example, based on the TSP single-cell data set, the CIBERSORTx tool is used to generate a characteristic expression matrix for various single cells in the human body, and then support vector regression, non-negative least squares, quadratic programming and other methods are used to solve the cell source score in the free RNA sample to be analyzed, which achieves the score of cell contribution in free RNA. The second is to calculate the tissue contribution based on the total expression of tissue-specific genes. For example, based on the tissue-specific gene set of the HPA database, the specific tissue contribution is calculated for the total expression of tissue-specific genes in free RNA.

[0045] However, both of the above methods have significant defects. For the first method, it is greatly affected by single-cell sequencing technology and free nucleic acid sequencing technology. The systematic error of sequencing has a huge impact on the results. Since it relies on the specific genes of each cell, the model is not robust enough and is greatly affected by the dropout of the expression spectrum obtained by sequencing. For the second method, the analysis results are affected by the quality of sample sequencing, and only the contribution of one type of cell can be analyzed and compared between samples. It is not possible to conduct an overall comparative analysis of the contribution of different cells in a single sample, nor can it compare the contribution of multiple cell types in a sample. However, changes in the health status of an individual may have a systematic impact on free RNA, which limits its practical application.

[0046] Both of the above-mentioned existing technical methods rely on cell type-specific genes, and it is necessary to first calculate the highly specific genes of the cell type, and the algorithms are very unstable.

[0047] In order to solve the problem of algorithm instability in the process of free RNA cell tracing, the present invention provides a nucleic acid cell granularity deconvolution method based on deep learning, preferably realizing a cell tracing architecture Deconformer of a deep learning architecture (for example, using transformer). In the present invention, the Deconformer does not rely on any specific cell type characteristics, and in the process of deconvolution, the pathway information is embedded into the expression spectrum, and the genes in the same pathway have a more consistent expression pattern. Therefore, the addition of pathway information and the over-parameterization advantage of deep learning make the deconformer of the present invention more robust. First, by referring to the single-cell dataset, the nucleic acid expression spectrum (for example, the free RNA nucleic acid expression spectrum) is simulated, and then the transformer-core deep learning model is trained on the simulated data to obtain a trained model. The model is then used to infer and predict the cell contribution score of the real expression spectrum. Thanks to the powerful global information capture ability of the multi-head self-attention mechanism of the deep learning architecture and the over-parameterization advantage of the deep neural network, the deconformer's deconvolution process does not rely on any cell type-specific genes, and there is no need to generate a matrix or list of cell type-specific genes. The source score of each cell type in the free nucleic acid can be directly determined, and the cell contribution score of the N-dimensional cell type in the free nucleic acid can be obtained. The expression spectrum analysis process is relatively stable.

[0048] The present invention is described in detail below in conjunction with various embodiments.

[0049] Embodiment 1

[0050] According to an embodiment of the present invention, an embodiment of a nucleic acid cell granularity deconvolution method based on deep learning is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown here.

[0051] Figure 1 is a flowchart of an optional deep learning-based nucleic acid cell granularity deconvolution method according to an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:

[0052] Step S102, obtaining a nucleic acid expression profile of a target object, wherein the nucleic acid expression profile is obtained by a preset sequencing technology.

[0053] It should be noted that the nucleic acid in this embodiment may include ribonucleic acid RNA, for example, it may be free RNA.

[0054] Among them, the preset sequencing technology provided in this embodiment can be RNA-Seq sequencing technology.

[0055] It should be noted that the free RNA in this embodiment refers to a multi-tissue RNA mixture existing outside the cells in the body fluid of the target subject.

[0056] The source of the nucleic acid expression profile can be obtained after receiving a cell deconvolution request and performing a mixture detection on a biological sample of a target object (type can be human / animal body, etc.), wherein the biological sample includes but is not limited to: plasma, serum or other body fluids, and these biological samples include a mixture of cellular RNA molecules from multiple tissue types. In this embodiment, these biological samples can be subjected to high-throughput sequencing to obtain a nucleic acid expression profile, and by analyzing the nucleic acid expression profile, the fractional contribution of multiple tissue types to the RNA mixture can be determined, and the cell type ratio is the cell contribution fraction of the corresponding cell type in the free nucleic acid, and the cell contribution fraction indicates the proportion of each cell type in each dimension.

[0057] The number of cell types in this embodiment can be determined according to actual conditions, for example, 60 cell types.

[0058] Step S104, input the nucleic acid expression spectrum into the target deep learning model, and the target deep learning model performs a deconvolution operation on the nucleic acid expression spectrum to output the N-dimensional cell type ratio of the target object, wherein the cell type ratio is the cell contribution fraction of the corresponding cell type in the free nucleic acid (i.e., the cell contribution fraction is used to indicate the proportion of each dimension of cell type), and the target deep learning model includes a pathway mask matrix and a set of iteratively updateable parameters, where N is a positive integer greater than 1.

[0059] In this embodiment, the data for training the target deep learning model comes from a single-cell dataset simulating a nucleic acid expression profile.

[0060] Optionally, step S104 includes: after the nucleic acid expression spectrum is input into the target deep learning model, the updated target deep learning model performs a deconvolution operation on the nucleic acid expression spectrum to obtain a set of proportions of each cell type, wherein, in the process of updating the target deep learning model, the gradient obtained by the loss function is used to process the initial tokens obtained by random initialization, the target matrix and the initialized deep neural network, and the set of proportions of each cell type is combined with the simulated nucleic acid expression spectrum to update the trainable network parameters in the initial deep neural network; the target deep learning model is used to output the N-dimensional cell type ratio of the target object.

[0061] In this embodiment, a pre-built and trained deep learning model (the parameters and network architecture of the model are fixed) can be used to input a free nucleic acid RNA expression spectrum into the model. After the model is deconvoluted, it will output an N-dimensional expression spectrum, for example, a 60-dimensional cell type expression spectrum representing the components of 60 cell types.

[0062] Through the above steps, the nucleic acid expression spectrum of the target object can be obtained, wherein the nucleic acid expression spectrum is obtained by a preset sequencing technology, the nucleic acid expression spectrum is input into the target deep learning model, the target deep learning model performs a deconvolution operation on the nucleic acid expression spectrum, and outputs the N-dimensional cell type ratio of the target object, wherein the cell type ratio is the cell contribution score of the corresponding cell type in the free nucleic acid, the cell contribution score indicates the proportion of each dimension of the cell type, and the target deep learning model includes a pathway mask matrix and a parameter set that can be updated iteratively. In this embodiment, in the process of deconvolution, the pathway information is embedded into the nucleic acid expression spectrum, and the powerful global information capture ability and over-parameterization advantage of the multi-head self-attention mechanism of the deep learning model are used. The cell deconvolution process does not rely on any cell type-specific genes, and there is no need to generate a matrix or list of cell type-specific genes. The source score of each cell type in the nucleic acid can be directly determined, and the cell contribution score of the N-dimensional cell type in the nucleic acid is obtained. The expression spectrum analysis process is relatively stable, thereby solving the technical problems of the related technology that the free nucleic acid expression spectrum is analyzed, and the algorithm is unstable and depends on cell type-specific genes.

[0063] In order to ensure that more stable and accurate results can be provided during the use of the model, the model parameters and structure of the deep learning model need to be pre-built, trained and optimized. Optionally, the target deep learning model is pre-trained, and when training the target deep learning model, it includes: building an initial deep neural network with a Transformer network as the architecture; randomly initializing a token to obtain an initial token; inputting the target matrix and the initial token into the initial deep neural network to obtain a set of percentages of each cell type, wherein each row of the target matrix is ​​defined as a token; calculating the mean square error of the numerical values ​​of the non-zero positions of the set of percentages and the set of mixed fraction vectors in the simulated nucleic acid expression spectrum, and using the mean square error as the model loss function, wherein the model loss function is used to determine the model gradient; updating the set of iteratively updateable parameters in the initial deep neural network based on the model gradient; training the initial deep neural network using a preheating and cosine annealing decay strategy to train and generate the target deep learning model.

[0064] Optionally, the set of parameters that can be iteratively updated includes: the network structure of the deep neural network, the number of fully connected layers of the deep neural network, and the fully connected weight matrix.

[0065] It should be noted that this embodiment provides a deep neural learning network based on the deconformer after improving the Transformer network. The deconformer includes a parameter mask matrix mask that does not need to be learned, and an iteratively updateable parameter embedding_matrix (here it can be a fully connected weight matrix W) that participates in learning. The data type is pytorch.nn.Parameter(), and then the deconformer includes a transformer of type pytorch.nn.Transformer(), and then the parameters are initialized. After that, the deconformer includes a fully connected layer of type nn.Linear() (this embodiment defines the fully connected layer as fracFCN, and the fully connected layer is also a parameter that needs to be iteratively updated).

[0066] Optionally, for the initial deep neural network, the Deconformer will randomly initialize a token (i.e., the initial token, defined as cls_token in this embodiment) before calculating the learning, so the number of tokens input to the transformer is the number of pathways plus 1. For example, the selected number of pathways is 5000, so the input here is 5001. After that, the two mutil-head self-attention layers in the middle of the transformer encoder will calculate the 5001 inputs and output 5001 tokens, using the initial token cls_token that has been processed by the neural network among the 5001 tokens, and pass through a fully connected layer, and then perform a normalization process (for example, using softmax for normalization) to obtain a set of percentages of each cell type (this set of percentages is defined as fd in this embodiment).

[0067] It should be noted that after obtaining the proportion set, the mean square error can be calculated between the proportion set fd and the mixed fraction vector set (defined as F in this embodiment) in the simulated nucleic acid expression spectrum, wherein this embodiment only calculates the mean square error of the non-zero position in F, and this mean square error is the loss function of the model. Using this loss function, the model will calculate the gradient, and use the gradient to update all the trainable parameters in the model (transformer (a deep neural network structure), fracFCN (fully connected layer), embedding_matrix (fully connected weight matrix W)).

[0068] After using the model gradient to update the iteratively updateable parameter set in the initial deep neural network, the initial deep neural network can be trained using the preheating and cosine annealing decay strategy. During the training process, the optimizer can be selected by itself, such as using torch.optim.Adam(), and the learning rate adjustment strategy uses the preheating and cosine annealing decay strategy.

[0069] Before training a deep neural network, a target matrix needs to be obtained. Optionally, when generating the target matrix, the following steps are included: using a single-cell sequencing data set to simulate and generate an expression spectrum of a nucleic acid to obtain a simulated nucleic acid expression spectrum (for example, a simulated free RNA expression spectrum), wherein the simulated nucleic acid expression spectrum includes: a mixed fraction vector set of M reference cell types, a mixture expression list of all reference cell types, and the mixture expression list records a gene expression set corresponding to each reference cell type, where M is a positive integer greater than 1; selecting a highly variable gene set from the simulated nucleic acid expression spectrum; generating a pathway mask matrix based on the highly variable gene set and a preset pathway data set, wherein the preset pathway data set includes M pathways, and each pathway includes a gene set; embedding the simulated nucleic acid expression spectrum based on the pathway mask matrix to generate a target matrix.

[0070] Optionally, the step of using a single-cell sequencing data set to simulate and generate an expression profile of nucleic acids to obtain a simulated nucleic acid expression profile includes: selecting M reference cell types from the total set of cell types; selecting a total number of cells T of each reference cell type for calculating the expression value of cells of that type; randomly generating a mixed fraction vector set F of M reference cell types, wherein the mixed fraction vector set F contains M fraction vectors, and the mixed fractions of the M reference cell types add up to 1; for each reference cell type i, determining the mixed fraction Fi of the reference cell type, the average expression vector set Ti of the total number of cells T sampled this time of the reference cell type, and calculating the mixed expression amount Fi*Ti of the cell type in free RNA; accumulating the mixed expression amounts Fi*Ti of all cell types to obtain a mixed expression list; saving the mixed expression list and the mixed fraction vector set F in a cell analysis library to obtain a simulated nucleic acid expression profile.

[0071] When selecting reference cell types, there are many ways, for example, you can use the TSP data set, use the TSP single-cell data set as a reference data set, and simulate free RNA. Of course, in addition to using the TSP data set, other single-cell parameter data sets can also be used to simulate free RNA. After determining the total set of cell types that can be selected, M reference cell types can be selected from the total set of cell types. For example, the number of cell types in the simulated mixture is selected, and 2 to 20 types are selected from 60 reference cell types with a uniform probability, so that 2≤N≤20.

[0072] After selecting the reference cell type, the total number of cells of each reference cell type can be selected for calculating the expression value of the cells of that type (defined as T in this embodiment). For example, the total number of cells of each cell type is selected for calculating the expression value of the cells of that type, and a value is randomly selected from 200 to 800 with uniform probability, 200≤T≤800. If the maximum number of cells in the reference data of the cell type parameter is less than 200, the maximum value is taken.

[0073] It should be noted that when randomly generating a mixed score vector set F of M reference cell types, the scores of the M reference cell types can be custom generated, for example, using the np.random.random(size=(N,)) function to generate and normalize them. After normalization, the scores of the M reference cell types are combined to 1, and the scores of other unselected reference cell types are 0. F is an M-dimensional score vector. For example, 10 cell types are selected, corresponding to a score vector of 10 elements.

[0074] After obtaining the above-mentioned mixed fraction vector set and the selected reference cell types and total number of cells, the simulated samples can be determined. In this process, the main thing completed is the average addition. For each cell type i in the F vector, Fi is the score of the reference cell type, Ti represents the average expression of the T samples of the cell type this time, and then Ti*Fi is calculated to obtain the expression level of a cell in the mixture. The aforementioned method is used to calculate the mixture expression level of all selected reference cell types, and finally the selected N mixture expression levels are added to obtain a mixture expression list (in this embodiment, the mixture expression list can be defined as s imu_exp), and the mixture expression list s imu_exp and the mixed fraction vector set F are saved in the same cell analysis library anndata. Repeat M times to obtain M simulated samples.

[0075] Optionally, the step of selecting a highly variable gene set from the simulated nucleic acid expression profile includes: selecting genes whose variance is greater than a preset variance threshold according to a preset number from the gene set in the mixture expression list to obtain the highly variable gene set.

[0076] For example, from the 20,000 genes in the mixture expression list s imu_exp, select the 10,000 genes with the largest variance.

[0077] Optionally, the step of generating a pathway mask matrix based on a highly variable gene set and a preset pathway data set includes: obtaining a preset pathway data set, wherein each pathway in the preset pathway data set contains a gene set; for each pathway, calculating the overlap between the genes in the gene set of the pathway and all the highly variable genes in the highly variable gene set; selecting a pathway set whose overlap is greater than a preset overlap threshold; performing an intersection operation on the genes in the pathway set and all the genes in the highly variable gene set to obtain genes in a matrix list; constructing an all-zero matrix with the number of pathways in the pathway set as the number of rows and the number of genes in the matrix list as the number of columns, wherein each row in the all-zero matrix corresponds to a pathway; for each row in the all-zero matrix, obtaining the gene position of the gene set contained in the pathway corresponding to the row; assigning a specified value to the number 0 associated with the gene position in the all-zero matrix; and generating a pathway mask matrix after assigning values ​​to the pathways corresponding to each row in all the all-zero matrices.

[0078] In this embodiment, before performing expression spectrum deconvolution, it is necessary to embed the expression spectrum through pathway information, so it is necessary to obtain the pathway data set in advance. When obtaining the preset pathway data set, various types of gene expression data can be used, and the gene set of interest can be selected for enrichment analysis, for example, using the C5.gobp pathway data set of the GSEA website.

[0079] For each pathway, the overlap between the gene set in the pathway and the highly variable genes in the previous step is calculated, and then the input gene is the intersection of the genes in the highly variable gene set HVG and the genes in all pathway sets to obtain a matrix list (named input_gene in this example).

[0080] Afterwards, an all-zero matrix is ​​initialized, the number of rows is the number of pathways in the selected pathway set, and the number of columns is the number of genes in the matrix list input_gene. Each row of the all-zero matrix corresponds to a pathway. For a row, the 0 at the gene position of the gene set included in the pathway is assigned a specified number (for example, the specified number can be selected by itself, for example, 1 is selected), and the others remain unchanged. In the same way, the pathway corresponding to each row of the all-zero matrix is ​​processed to obtain a pathway mask matrix (the pathway mask matrix is ​​defined as mask in this embodiment).

[0081] In this embodiment, when calculating the overlap of genes in the gene set of the pathway and all the highly variable genes in the highly variable gene set, various calculation methods can be flexibly used, such as using the Jacobi similarity strategy.

[0082] After the pathway mask matrix is ​​generated, expression profile embedding processing can be performed using the pathway mask matrix.

[0083] Optionally, based on the pathway mask matrix, the simulated nucleic acid expression spectrum is embedded to generate a target matrix, including: taking the intersection of the mixture expression list and the matrix list to obtain a mixed gene intersection; taking the number of rows of the pathway mask matrix as the number of replications, multiple replications of the mixture expression list to generate a first matrix; performing dot multiplication on the first matrix and the pathway mask matrix to generate a second matrix; randomly initializing a fully connected weight matrix, wherein the size of the fully connected weight matrix is ​​the product of the number of genes in the matrix list and the number of embedding dimensions; and multiplying the second matrix by the fully connected weight matrix to obtain a target matrix.

[0084] When the model gets a simulated sample, it contains the mixture expression list s imu_exp and the mixture score vector set F in the simulated nucleic acid expression spectrum. Take the intersection of the vector s imu_exp and the matrix list input_gene (here, the columns of s imu_exp are gene names, input_gene is a list of genes, the list contains multiple gene names, and the intersection is to retain the gene names in input_gene), copy s imu_exp row by row the number of times the mask matrix rows are copied to obtain the first matrix exp_matrix (here, it means copying s imu_exp, and the total number of copies is the number of rows of mask), then we dot product the first matrix exp_matr ix and the pathway mask matrix mask (when doing the dot product, the row and column sizes of the two matrices need to be consistent), and get a second matrix pw_exp_matr ix, and then randomly initialize a fully connected weight matrix W, the size of which is the number of input_gene * embd_d im dimension, where input_gene is the number of genes in the matrix list, embd_d im is the dimension you want to embed, and then the second matrix pw_exp_matr Multiply ix by the fully connected weight matrix W to obtain a target matrix Te with the number of pathways * the number of embedding dimensions. This target matrix Te is the matrix after the simulated sample expression and pathway information are embedded, and each row is called a token.

[0085] Optionally, in addition to using transformer to process and calculate the embedded expression spectrum, other deep learning architectures can also be used for processing and calculation.

[0086] Through the above embodiments, the construction and training of the target deep learning model are realized. After the model parameters are updated, the target deep learning model can be used to complete the analysis of various nucleic acid expression profiles and calculate the source proportion score of each cell type. These source proportion scores can be used to evaluate the health status of the target object's body tissues.

[0087] Through the real expression spectrum, the health status of the target object's body tissue can be inferred. For example, for plasma free RNA, HBV infection group and healthy individual group can be distinguished by cell tracing. In this process, the plasma free RNA expression spectrum is obtained, and then the cell origin score is calculated by the target deep learning model deconformer. Finally, the relative tissue contribution score of the liver tissue of healthy individuals and HBV infected patients is statistically tested. Cell tracing analysis of plasma free RNA can indicate tissue lesions of infectious diseases.

[0088] In addition to the above-illustrated plasma analysis effects, analysis of free RNA can also be used to assess various tissue health levels, such as cancer level, whether a particular tissue type is diseased; wherein the cancer level can refer to whether cancer exists (i.e., exists or not), cancer stage, tumor size, whether metastasis exists, the total tumor burden of the body, and / or other measures of cancer severity (e.g., cancer recurrence). The cancer level can be a numerical value or other mark, such as a symbol, letter, and color.

[0089] Compared with the prior art, the specific expression reference matrix of cell type expression is required, and the method of constructing the reference matrix has a greater impact on the deconvolution performance than the algorithm used for deconvolution. For tissues, the higher the specificity of the gene, the lower the detection rate in body fluids (such as plasma). Only using highly specific genes to construct a specific expression matrix can not obtain good results in subsequent deconvolution tasks. Secondly, there will be a large number of dropout missing values ​​in the sequencing of free RNA itself, resulting in the traditional deconvolution algorithm being not stable and robust enough. The deconformer method in this embodiment, by embedding the expression spectrum and the pathway, and the gene set in the pathway itself has a more consistent expression pattern, thereby greatly improving the stability of the dropout missing value. At the same time, the architecture of transfomer has a powerful ability to capture global information and correlation. During deconvolution, it does not rely on any feature reference matrix at all, and the algorithm is relatively stable.

[0090] The present invention is described below in conjunction with another optional embodiment. The embodiment of the present invention is divided into three major parts, one part is the generation of simulated free RNA expression profiles, another part is a neural network based on a transformer architecture for training on simulated data, and the other part is for inferring real expression profile data.

[0091] When building a deep learning model, there are two steps: Step 1: simulating free nucleic acids and Step 2: transformer core DNN.

[0092] For Step 1, the schematic content of simulating the free RNA expression spectrum requires that for various reference cell types, a mixture fraction ratio F of M cell types is combined to obtain a simulated free nucleic acid expression spectrum (also called a simulated free RNA expression spectrum).

[0093] Part I: Simulating free RNA expression profiles.

[0094] 1) Reference data preprocessing:

[0095] In this embodiment, a total of 24 tissues and 500,000 single cell expression profiles of the TSP dataset are used. For example, taking the TSP dataset as an example, only cells with 10X sequencing technology are used for this dataset, and the gene expression of each cell is normalized to 10,000 by the scanpy.pp.normalize_total(annx,target_sum=10000) function. Referring to the cell processing method of the article Cell types of origin of the cell-free transcriptome, this embodiment takes into account the detectability of free nucleic acids of eye tissues, the similarity of 157 cell types, and the number of cells of cell types. Finally, the 157 cell types are merged, and the cell types with less than 10 cells after merging are removed, and finally 60 reference cell types are selected.

[0096] 2) Simulated data (corresponding to a simulated sample):

[0097] [1]. Select the number M of cell types in the simulated mixture. The embodiment of the present invention selects 2 to 20 types of cell types from 60 reference cell types with uniform probability, so that 2≤M≤20.

[0098] [2]. Select the total number of cells (T) for each reference cell type to calculate the expression value of cells of that type. Randomly select a value from 200 to 800 with uniform probability, 200≤T≤800; if the maximum number of cells in the reference data of the cell type parameter is less than 200, take the maximum value.

[0099] [3]. Randomly generate the mixed fraction ratio F of M cell types (i.e. the mixed fraction vector set F mentioned above). The scores of M reference cell types are generated using the np.random.random(size = (N,)) function and normalized. After normalization, the scores of the M reference cell types are summed to 1, and the scores of other unselected cell types are 0. F is a 60-dimensional score vector.

[0100] [4]. Average sum. For each reference cell type i in the F vector, Fi is the score of the reference cell type, Ti represents the average expression of the T samples of the reference cell type (for example, Ti is defined here as a vector of approximately 20,000 dimensions), and then Ti*Fi is calculated to obtain the expression level of a cell in the mixture, and the mixture expression level of the selected cells is calculated using the aforementioned method. Finally, the expression level of the selected mixture is summed to obtain s imu_exp, and s imu_exp and score F are saved in the same anndata, where s imu_exp is saved in X of anndata and score F is saved in obs of anndata. In this way, the embodiment of the present invention obtains a simulated free RNA sample and saves it in the data format of anndata. Repeat M times, and the embodiment of the present invention can obtain M simulated samples.

[0101] Part II: A neural network based on the transformer architecture is used for training on simulated data.

[0102] Figure 2 is a schematic diagram of an optional deep learning model according to an embodiment of the present invention. Figure 2 As shown, it shows the content of building a deep neural network (i.e., a deconformer network) based on the Transformer architecture.

[0103] First point: Deep neural network and training of Transformer architecture

[0104] 1) Model input processing:

[0105] [1], Selection of highly variable genes (defined as HVG): From the 2w genes in s imu_exp, select the 10,000 genes with the largest variance to obtain the highly variable gene set.

[0106] [2], Generation of channel mask matrix:

[0107] The embodiment of the present invention uses the C5.gobp pathway data set from the GSEA website. For each pathway, the embodiment of the present invention calculates the overlap between the gene set in the pathway and the high-variable gene in the previous step, and the calculation method is: Cover_Rate = len(HVG∩pw_gene) / len(HVG∪pw_gene), where pw_gene is the gene set in the pathway, and then selects the n pathways with the highest overlap (for example, select 5000 pathways to generate a pathway set). Then the input gene of the embodiment of the present invention is the intersection of HVG and the genes of all 5000 pathways, named input_gene. After that, the embodiment of the present invention initializes an all-zero matrix with the number of rows being the number of n selected pathways and the number of columns being the number of input_gene (self-set, for example, set to 9000). Each row of the matrix corresponds to a pathway, and for a row, the gene position 0 of the gene set contained in the pathway is assigned to 1, and the others remain unchanged. In the same way, all pathways in all pathway sets are processed to obtain a pathway mask matrix mask.

[0108] like Figure 2 On the right side of pathway-based embedding, an all-zero matrix transformation is performed, and the gene position 0 of the gene set contained in the pathway is assigned to 1 corresponding to the row where a pathway is located.

[0109] like Figure 2 As shown in the figure, after obtaining 1 million simulated free RNA samples, they are input into the right side of pathway-based embedding, and firstly subjected to all-zero matrix transformation processing. Then, after obtaining the gene set, the part indicated by the arrow of pathway-based embedding is input.

[0110] 2) Model construction:

[0111] For Step 2, in the process of processing the simulated free RNA expression profile, the following contents are included:

[0112] [1], expression profile embedding (e.g. Figure 2 1 million simulated free RNA samples were collected and for each free RNA, pathway-based embedding was performed ( Figure 2 This is indicated by “pathway-based embedding” in the example above):

[0113] When the model obtains a simulated free RNA expression spectrum, it includes the simulated expression amount s imu_exp and the cell type score F. The embodiment of the present invention intersects the s imu_exp vector with input_gene (here, the columns of s imu_exp are all gene names, input_gene is the list of the previous intersection genes, which contains gene names, and the intersection is to retain the gene names in input_gene), and copies the s imu_exp row by row for the number of times the mask matrix row is copied (here, it means copying s imu_exp, and the total number of copies is the number of rows of mask), and obtains the matrix exp_matr ix, and then performs a dot product of this exp_matr ix and the mask matrix (when doing the dot product, the row and column sizes of the two matrices need to be consistent), and obtains a pw_exp_matr ix.

[0114] Then the embodiment of the present invention randomly initializes a fully connected weight matrix W, the size of which is the number of input_genes * embd_d im dimensions, where embd_d im is the dimension to be embedded. In the experiment, the embodiment of the present invention selects 128 dimensions. Then the embodiment of the present invention multiplies the pw_exp_matrix with the fully connected weight matrix W to obtain a matrix Te of the number of pathways * the number of embedding dimensions. This matrix Te is the matrix after the simulated sample expression and pathway information are embedded, and each row of the embodiment of the present invention is called a token.

[0115] [2]. Build a deep neural network with Transformer architecture as the core:

[0116] In the embodiment of the present invention, the deep neural network is named deconformer, which includes a parameter mask matrix mask that does not need to be learned, and an iteratively updated parameter embedding_matrix (i.e., the fully connected weight matrix W mentioned above) that participates in learning, and the data type is pytorch.nn.Parameter(). Then, deconformer includes a transformer of type pytorch.nn.Transformer(), and the initialization parameters are as follows: d_mode l=embedding_d im, nhead=4, dim_feedforward=4*embedding_d im, num_encoder_l ayers=3, num_decoder_l ayers=0. Then, deconformer includes a fully connected layer fracFCN of type nn.Linear().

[0117] [3],Deconformer data flow,processing flow:

[0118] Using a neural network encoder (such as Figure 2 The "Transformer Encoder" in the figure is used for processing. Before calculating and learning, the Deconformer will randomly initialize a cls_token, so the number of tokens input to the transformer is the number of channels plus 1. For example, the number of channels selected in the embodiment of the present invention is 5000, so the input here is 5001. After that, the two mutil-head self-attention layers in the middle of the transformer encoder will calculate the 5001 inputs and output 5001 tokens. The present invention uses the cls_token that has been processed by the intersection of the 5001 tokens, and passes through a fully connected layer, and then performs a softmax to obtain fd, and calculates the mean square error of the result fd and F, but the present invention only calculates the mean square error of the non-zero position in F, and this mean square error is the loss function of the model. Using this loss function, the model will calculate the gradient, and use the gradient to update all the trainable and iterative parameter sets in the model, including transformer (a deep neural network structure), fracFCN (fully connected layer), and embedding_matrix (iteratively updateable parameters).

[0119] [4], Training strategy and training model:

[0120] The optimizer of the present invention uses torch.optim.Adam(), and the learning rate adjustment strategy uses the warm-up and cosine annealing decay strategy. By training the model, the final layer structure for classification is determined ( Figure 2 The training set is divided by DataLoader in the embodiment of the present invention, and the batch size is 40. Afterwards, the embodiment of the present invention can be trained on various algorithm processors / chips, and the number of training epochs is 30, where the first 10,000 steps are the warm-up stage, and the learning rate increases linearly, and then all steps until the end of training use cosine annealing decay.

[0121] Part III: Inference of the true free nucleic acid composition.

[0122] Using the trained and saved deep learning model, in the inference stage, the embodiment of the present invention inputs a free RNA expression profile into the model, and after the model is processed, a 60-dimensional vector is output, representing the components of 60 cell types, such as Figure 2 The Fraction ratio is used to illustrate this.

[0123] Through the above implementation, the deconformer deep learning network is used, and the expression profile and the pathway are embedded, and the gene set in the pathway itself has a more consistent expression pattern, thereby greatly improving the stability of the dropout missing value. Relative to the specific expression reference matrix that requires cell type expression in the prior art, the higher the specificity of the gene, the lower the detection rate in body fluids (such as plasma). Only using highly specific genes to construct a specific expression matrix, it is impossible to obtain good results in the subsequent deconvolution task. And the use of transformer architecture in this embodiment has a powerful ability to capture global information and correlation. During deconvolution, it does not rely on any feature reference matrix at all, and can stably obtain the true expression spectrum.

[0124] The present invention is described below in conjunction with another optional embodiment.

[0125] Embodiment 2

[0126] This embodiment provides a nucleic acid cell granularity deconvolution device based on deep learning, and each implementation unit included in the device corresponds to each implementation step in the above-mentioned embodiment one.

[0127] Figure 3 is a schematic diagram of an optional nucleic acid cell granularity deconvolution device based on deep learning according to an embodiment of the present invention, such as Figure 3 As shown, the nucleic acid cell particle size deconvolution device based on deep learning includes: an acquisition unit 31 and a deconvolution unit 32.

[0128] The acquisition unit 31 is used to acquire a nucleic acid expression profile of a target object, wherein the nucleic acid expression profile is acquired by a preset sequencing technology;

[0129] The deconvolution unit 32 is used to input the nucleic acid expression spectrum into the target deep learning model, and the target deep learning model performs a deconvolution operation on the nucleic acid expression spectrum to output the N-dimensional cell type ratio of the target object, wherein the cell type ratio is the cell contribution fraction of the corresponding cell type in the free nucleic acid (the cell contribution fraction is used to indicate the proportion of each dimension of the cell type), and the target deep learning model includes a pathway mask matrix and a set of iteratively updateable parameters, and N is a positive integer greater than 1.

[0130] The above-mentioned nucleic acid cell granularity deconvolution device based on deep learning can obtain the nucleic acid expression spectrum of the target object through the acquisition unit 31, wherein the nucleic acid expression spectrum is obtained by a preset sequencing technology, and the nucleic acid expression spectrum is input into the target deep learning model through the deconvolution unit 32, and the nucleic acid expression spectrum is deconvoluted by the target deep learning model, and the N-dimensional cell type ratio of the target object is output, wherein the cell type ratio is the cell contribution score of the corresponding cell type in the free nucleic acid, and the target deep learning model includes a pathway mask matrix and a parameter set that can be iteratively updated. In this embodiment, in the process of deconvolution, the pathway information is embedded in the nucleic acid expression spectrum, and the powerful global information capture ability and over-parameterization advantage of the multi-head self-attention mechanism of the deep learning model are used. The cell deconvolution process does not rely on any cell type-specific genes, and there is no need to generate a matrix or list of cell type-specific genes. The source score of each cell type of nucleic acid can be directly determined, and the cell contribution score of the N-dimensional cell type in the nucleic acid can be recorded. The nucleic acid analysis algorithm is relatively stable, thereby solving the technical problems of the related technology that the free nucleic acid expression spectrum is analyzed, which depends on cell type-specific genes and the algorithm is unstable.

[0131] Optionally, the deconvolution unit includes: a deconvolution module, which is used to perform a deconvolution operation on the nucleic acid expression spectrum by the updated target deep learning model after the nucleic acid expression spectrum is input into the target deep learning model, so as to obtain a set of proportions of each cell type, wherein in the process of updating the target deep learning model, the initial tokens obtained by random initialization, the target matrix and the initialized deep neural network are processed by the gradient obtained by the loss function, and the set of proportions of each cell type is combined with the simulated nucleic acid expression spectrum to update the trainable network parameters in the initial deep neural network; the target deep learning model is used to output the N-dimensional cell type ratio of the target object.

[0132] Optionally, when generating a target matrix, the nucleic acid cell granularity deconvolution device based on deep learning includes: a first acquisition module, used to simulate the expression spectrum of nucleic acid generated by using a single-cell sequencing data set to obtain a simulated nucleic acid expression spectrum, wherein the simulated nucleic acid expression spectrum includes: a mixed fraction vector set of M reference cell types, a mixture expression list of all reference cell types, and the mixture expression list records the gene expression set corresponding to each reference cell type, and M is a positive integer greater than 1; a first selection unit, used to select a highly variable gene set from the simulated nucleic acid expression spectrum; a second generation unit, used to generate a pathway mask matrix based on the highly variable gene set and a preset pathway data set, wherein the preset pathway data set contains M pathways, and each pathway contains a gene set; a third generation unit, used to embed the simulated nucleic acid expression spectrum based on the pathway mask matrix to generate a target matrix.

[0133] Optionally, the first acquisition module includes: a first selection submodule, used to select M reference cell types from the total set of cell types; a second selection submodule, used to select the total number of cells T of each reference cell type for calculating the expression value of the cells of this type; a random generation module, used to randomly generate a mixture fraction vector set F of M reference cell types, wherein the mixture fraction vector set F contains M fraction vectors, and the mixture fractions of the M reference cell types add up to 1; a first determination module, used to determine, for each reference cell type i, the mixture fraction Fi of the reference cell type, the average expression vector set Ti of the total number of cells T sampled this time of the reference cell type, and calculate the mixture expression amount Fi*Ti of the cell type in free RNA; an accumulation module, used to accumulate the mixture expression amounts Fi*Ti of all cell types to obtain a mixture expression list; a saving module, used to save the mixture expression list and the mixture fraction vector set F in a cell analysis library to obtain a simulated nucleic acid expression spectrum.

[0134] Optionally, the first selection unit includes: from the gene set in the mixture expression list, a third selection submodule is used to select genes whose variance is greater than a preset variance threshold according to a preset number to obtain a highly variable gene set.

[0135] Optionally, the second generation unit includes: a second acquisition module, used to acquire a preset pathway data set, wherein each pathway in the preset pathway data set contains a gene set; a first calculation module, used to calculate, for each pathway, the overlap of the genes in the gene set of the pathway and all the highly variable genes in the highly variable gene set; select a pathway set whose overlap is greater than a preset overlap threshold; a first intersection module, used to perform an intersection operation on the genes in the pathway set and all the genes in the highly variable gene set to obtain the genes in the matrix list; a construction module, used to construct an all-zero matrix with the number of pathways in the pathway set as the number of rows and the number of genes in the matrix list as the number of columns, wherein each row in the all-zero matrix corresponds to a pathway; a third acquisition module, used to acquire, for each row in the all-zero matrix, the gene position of the gene set contained in the pathway corresponding to the row; and assign the number 0 associated with the gene position in the all-zero matrix to a specified value; a first generation module, used to generate a pathway mask matrix after assigning values ​​to the pathways corresponding to each row in all all-zero matrices.

[0136] Optionally, the third generation unit includes: a second intersection module, used to take the intersection of the mixture expression list and the matrix list to obtain a mixed gene intersection; a copy module, used to use the number of rows of the pathway mask matrix as the number of copies, and copy the mixture expression list multiple times to generate a first matrix; a second generation module, used to perform dot multiplication on the first matrix and the pathway mask matrix to generate a second matrix; a matrix initialization module, used to randomly initialize a fully connected weight matrix, wherein the size of the fully connected weight matrix is ​​the product of the number of genes in the matrix list and the number of embedded dimensions; a multiplication module, used to multiply the second matrix with the fully connected weight matrix to obtain a target matrix.

[0137] Optionally, the set of parameters that can be iteratively updated includes: the network structure of the deep neural network, the number of fully connected layers of the deep neural network, and the fully connected weight matrix.

[0138] Optionally, the target deep learning model is pre-trained. When training the target deep learning model, the nucleic acid cell granularity deconvolution device based on deep learning includes: a construction unit, which is used to construct an initial deep neural network with a Transformer network as the architecture; an initialization unit, which is used to randomly initialize a token to obtain an initial token; a first input unit, which is used to input the target matrix and the initial token into the initial deep neural network to obtain a set of proportions of each cell type, wherein each row of the target matrix is ​​defined as a token; a first calculation unit, which is used to calculate the mean square error of the numerical values ​​of the non-zero positions in the mixed fraction vector set in the simulated nucleic acid expression spectrum, and use the mean square error as a model loss function, wherein the model loss function is used to determine the model gradient; a first update unit, which is used to update the set of iteratively updateable parameters in the initial deep neural network based on the model gradient; a first generation unit, which is used to train the initial deep neural network using a preheating and cosine annealing decay strategy to train and generate the target deep learning model.

[0139] The above-mentioned deep learning-based nucleic acid cell particle size deconvolution device may also include a processor and a memory. The above-mentioned acquisition unit 31, deconvolution unit 32, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.

[0140] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the nucleic acid expression profile is input into the target deep learning model by adjusting the kernel parameters. The target deep learning model performs a deconvolution operation on the nucleic acid expression profile and outputs the N-dimensional cell type ratio of the target object. The cell type ratio is the cell contribution fraction of the corresponding cell type in the free nucleic acid, and the cell contribution fraction is used to indicate the proportion of each dimension of the cell type.

[0141] The above-mentioned memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one storage chip.

[0142] According to another aspect of an embodiment of the present invention, an electronic device is also provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the above-mentioned deep learning-based nucleic acid cell granularity deconvolution methods by executing the executable instructions.

[0143] Figure 4 1 is a hardware structure block diagram of an electronic device (or mobile device) of a production scheduling method based on medical testing according to an embodiment of the present invention. Figure 4 As shown, the electronic device may include one or more (402a, 402b, ..., 402n are used to illustrate) processors 402 (the processor 402 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), and a memory 404 configured to store data. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a keyboard, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 4 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 4 More or fewer components as shown, or with Figure 4 Different configurations are shown.

[0144] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned deep learning-based nucleic acid cell granularity deconvolution methods.

[0145] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the following method steps: obtaining a nucleic acid expression spectrum of a target object, wherein the nucleic acid expression spectrum is obtained by a preset sequencing technology; inputting the nucleic acid expression spectrum into a target deep learning model, and performing a deconvolution operation on the nucleic acid expression spectrum by the target deep learning model, and outputting an N-dimensional cell type ratio of the target object, wherein the cell type ratio is the cell contribution fraction of the corresponding cell type in the free nucleic acid, and the target deep learning model includes a pathway mask matrix and a parameter set that can be iteratively updated, and N is a positive integer greater than 1.

[0146] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0147] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0148] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0149] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0150] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0151] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0152] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for nucleic acid cell granularity deconvolution based on deep learning, characterized in that: include: Obtaining a nucleic acid expression profile of a target object, wherein the nucleic acid expression profile is obtained by a preset sequencing technology; The nucleic acid expression spectrum is input into a target deep learning model, and the target deep learning model performs a deconvolution operation on the nucleic acid expression spectrum to output an N-dimensional cell type ratio of the target object, wherein the cell type ratio is the cell contribution fraction of the corresponding cell type in the free nucleic acid, and the target deep learning model comprises a pathway mask matrix and a set of iteratively updateable parameters, where N is a positive integer greater than 1.

2. The nucleic acid cell size deconvolution method according to claim 1, characterized in that: The step of performing a deconvolution operation on the nucleic acid expression profile by the target deep learning model to output the N-dimensional cell type ratio of the target object comprises: After the nucleic acid expression profile is input into the target deep learning model, the updated target deep learning model performs a deconvolution operation on the nucleic acid expression profile to obtain a set of proportions of each cell type, wherein in the process of updating the target deep learning model, the gradient obtained by the loss function is used to process the initial tokens obtained by random initialization, the target matrix, and the initialized deep neural network, and the set of proportions of each cell type is combined with the simulated nucleic acid expression profile to update the trainable network parameters in the initial deep neural network; The target deep learning model is used to output the N-dimensional cell type ratio of the target object.

3. The nucleic acid cell size deconvolution method according to claim 2, characterized in that: When generating the target matrix, it includes: A single-cell sequencing data set is used to simulate and generate an expression profile of a nucleic acid to obtain a simulated nucleic acid expression profile, wherein the simulated nucleic acid expression profile comprises: a mixture fraction vector set of M reference cell types, a mixture expression list of all the reference cell types, the mixture expression list records a gene expression set corresponding to each reference cell type, and M is a positive integer greater than 1; Selecting a set of highly variable genes from the simulated nucleic acid expression profile; Based on the highly variable gene set and a preset pathway data set, the pathway mask matrix is ​​generated, wherein the preset pathway data set includes M pathways, and each pathway includes a gene set; Based on the pathway mask matrix, the simulated nucleic acid expression profile is embedded to generate a target matrix.

4. The method for nucleic acid cell size deconvolution according to claim 3, characterized in that: The step of simulating and generating a nucleic acid expression profile using a single-cell sequencing data set to obtain a simulated nucleic acid expression profile includes: Select M reference cell types from the total set of cell types; Selecting the total number of cells T of each reference cell type for calculating the expression value of cells of that type; Randomly generate a mixture score vector set F of M reference cell types, wherein the mixture score vector set F includes M score vectors, and the sum of the mixture scores of the M reference cell types is 1; For each reference cell type i, determine the mixed fraction Fi of the reference cell type, the average expression vector set Ti of the total number of sampled cells T of the reference cell type, and calculate the mixed expression amount Fi*Ti of the cell type in free RNA; Accumulate the mixture expression amounts Fi*Ti of all the cell types to obtain a mixture expression list; The mixture expression list and the mixture score vector set F are stored in a cell analysis library to obtain the simulated nucleic acid expression profile.

5. The method for nucleic acid cell size deconvolution according to claim 3, characterized in that: The step of selecting a set of highly variable genes from the simulated nucleic acid expression profile comprises: From the gene set in the mixture expression list, genes whose variance is greater than a preset variance threshold are selected according to a preset number to obtain the highly variable gene set.

6. The method for nucleic acid cell size deconvolution according to claim 3, characterized in that: The step of generating the pathway mask matrix based on the highly variable gene set and the preset pathway data set comprises: Acquire a preset pathway data set, wherein each pathway in the preset pathway data set includes a gene set; For each of the pathways, calculating the overlap between the genes in the gene set of the pathway and all the highly variable genes in the highly variable gene set; Selecting a set of paths whose overlap is greater than a preset overlap threshold; Performing an intersection operation on the genes in the pathway set and all genes in the highly variable gene set to obtain genes in a matrix list; Taking the number of pathways in the pathway set as the number of rows and the number of genes in the matrix list as the number of columns, an all-zero matrix is ​​constructed, wherein each row in the all-zero matrix corresponds to a pathway; For each row in the all-zero matrix, obtaining the gene position of the gene set contained in the pathway corresponding to the row; Assigning a specified value to the number 0 associated with the gene position in the all-zero matrix; After assigning values ​​to the paths corresponding to each row in all the all-zero matrices, the path mask matrix is ​​generated.

7. The method for nucleic acid cell size deconvolution according to claim 6, characterized in that: Based on the pathway mask matrix, the simulated nucleic acid expression profile is embedded to generate a target matrix, comprising: Taking the intersection of the mixture expression list and the matrix list to obtain a mixture gene intersection; Taking the number of rows of the channel mask matrix as the number of replications, the mixture expression list is replicated multiple times to generate a first matrix; Performing a dot multiplication process on the first matrix and the path mask matrix to generate a second matrix; Randomly initialize a fully connected weight matrix, wherein the size of the fully connected weight matrix is ​​the product of the number of genes in the matrix list and the number of embedding dimensions; The second matrix is ​​multiplied by the fully connected weight matrix to obtain the target matrix.

8. The method for nucleic acid cell size deconvolution according to claim 7, characterized in that: The set of iteratively updateable parameters includes: the network structure of the deep neural network, the number of fully connected layers of the deep neural network, and the fully connected weight matrix.

9. The method for nucleic acid cell size deconvolution according to claim 1, characterized in that: The target deep learning model is pre-trained. When training the target deep learning model, it includes: Build an initial deep neural network based on the Transformer network architecture; Randomly initialize a token to obtain an initial token; Inputting the target matrix and the initial tokens into the initial deep neural network to obtain a set of percentages of each cell type, wherein each row of the target matrix is ​​defined as a token; Calculating the mean square error of the numerical values ​​of the non-zero positions in the mixture fraction vector set in the proportion set and the simulated nucleic acid expression spectrum, and using the mean square error as a model loss function, wherein the model loss function is used to determine the model gradient; Based on the model gradient, a set of iteratively updateable parameters in the initial deep neural network is updated; The initial deep neural network is trained using a preheating and cosine annealing decay strategy to generate the target deep learning model.

10. A nucleic acid cell size deconvolution device based on deep learning, characterized in that: include: an acquisition unit, configured to acquire a nucleic acid expression profile of a target object, wherein the nucleic acid expression profile is acquired by a preset sequencing technology, and free RNA refers to a multi-tissue RNA mixture existing outside cells in a body fluid of the target object; A deconvolution unit is used to input the nucleic acid expression spectrum into a target deep learning model, and the target deep learning model performs a deconvolution operation on the nucleic acid expression spectrum to output an N-dimensional cell type ratio of the target object, wherein the cell type ratio is a cell contribution fraction of the corresponding cell type in the free nucleic acid, and the target deep learning model comprises a pathway mask matrix and a set of iteratively updateable parameters, and N is a positive integer greater than 1.

11. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the deep learning-based nucleic acid cell granularity deconvolution method described in any one of claims 1 to 9 by executing the executable instructions.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the nucleic acid cell granularity deconvolution method based on deep learning as described in any one of claims 1 to 9.