Space omics data completion method and system based on variational graph auto-encoder

By constructing a spatial omics data completion method based on variational graph autoencoders and utilizing spatial position and gene expression characteristics, the problems of large errors and insufficient completeness in data completion in existing technologies are solved, achieving higher data accuracy and improved downstream analysis.

CN120783869APending Publication Date: 2025-10-14SHANDONG UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510952878.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-10
Publication Date
2025-10-14

AI Technical Summary

Technical Problem

When using variational graph autoencoders for spatial transcriptomics data completion, existing technologies fail to fully utilize the positional information and gene expression characteristics in the data, resulting in large errors, insufficient data integrity and reliability of downstream analysis.

Method used

By acquiring paired spatial transcriptomics and single-cell RNA sequencing data of the same tissue, the feature matrix of common genes was extracted, and an adjacency matrix was constructed based on spatial position and gene expression similarity, which was then input into a pre-trained variational graph autoencoder network to complete the missing genes.

Benefits of technology

It improves the similarity of gene expression and the accuracy of downstream analysis, reduces errors, enhances data integrity, and promotes the development of spatial omics and biomedical research.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120783869A_ABST
    Figure CN120783869A_ABST
Patent Text Reader

Abstract

The invention provides a spatial omics data completion method and system based on a variational graph auto-encoder, and relates to the technical field of bioinformatics. Extracting partial common genes in the data pair to obtain a feature matrix; based on the spatial position information, obtaining a first sub-adjacency matrix of cells in the spatial transcriptomics sequencing data; respectively obtaining a second sub-adjacency matrix of the cells in the single-cell RNA sequencing data and a third sub-adjacency matrix of the cells in the data pair based on gene expression similarity; combining the first sub-adjacency matrix, the second sub-adjacency matrix and the third sub-adjacency matrix to obtain a final adjacency matrix; and inputting the feature matrix and the final adjacent matrix into a pre-trained variational graph auto-encoder network to complete the deletion gene of the space transcriptomics. According to the method, the position information and gene expression characteristics between idle data cells can be effectively utilized, errors can be reduced, and meanwhile, the similarity between complementation genes and true values can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of bioinformatics, and in particular relates to a method and system for spatial omics data completion based on variational graph autoencoders. Background Art

[0002] With the rapid development of spatial transcriptomics technology, researchers can obtain high-resolution gene expression profiles while preserving the spatial structure of tissues, providing a key tool for analyzing tissue microenvironments, cell-cell interactions, and disease heterogeneity. This technology breaks through the bottleneck of traditional single-cell sequencing technology that loses spatial positioning by accurately integrating spatial coordinate information with transcriptome data. Currently, mainstream spatial transcriptomics technologies can be divided into two categories: sequencing-based and imaging-based. Their resolution has been improved from the tissue level to the subcellular level, and some technologies can even achieve single-cell level accuracy, providing new perspectives and methods for biomedical research.

[0003] Single-cell accuracy is required for tasks such as analyzing cell-cell interactions and identifying cell types. Image-based spatial transcriptomics technologies have achieved single-cell resolution gene expression measurement by combining high-resolution tissue section images with sequencing data. However, limitations in probe design and imaging techniques often limit the number of genes that can be measured simultaneously, severely hampering data integrity and the reliability of downstream analyses. Existing research has extensively explored the spatial domain and achieved excellent results. However, most of these methods ultimately generate final predictions based on KNN. The optimal combination of batch effect correction methods, similarity metrics, and neighbor number selection is difficult to determine, and the information contained in spatial transcriptome sequencing data and single-cell RNA sequencing data is not fully utilized when completing expression data for missing genes.

[0004] Variational graph autoencoders (VAEs), an unsupervised learning framework for graph-structured data based on variational autoencoders (VAEs), can learn interpretable latent representations for undirected graphs by leveraging latent variables, significantly improving prediction performance on multiple benchmark datasets. However, directly applying VGAs to spatial transcriptomics sequencing data completion still faces the challenge of fully utilizing the positional information and gene expression features in the data. Summary of the Invention

[0005] To overcome the deficiencies of the above-mentioned prior art, the present invention provides a spatial omics data completion method and system based on variational graph autoencoders, which can effectively utilize the position information and gene expression characteristics between cells in idle data, not only reducing errors, but also improving the similarity between the completed genes and the true values, and improving downstream analysis. It has important scientific significance and application value for promoting spatial omics and related biomedical research.

[0006] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions: The first aspect of the present invention provides a spatial omics data completion method based on variational graph autoencoder.

[0007] The spatial omics data completion method based on variational graph autoencoder includes the following steps: Acquire spatial transcriptomics and single-cell RNA sequencing data from the same tissue pair, perform preprocessing, and obtain preprocessed data pairs; Extract some common genes in the data pairs to obtain the feature matrix; Based on spatial location information, the first sub-adjacency matrix of cells in spatial transcriptomics sequencing data is obtained. Based on gene expression similarity, the second sub-adjacency matrix of cells in single-cell RNA sequencing data and the third sub-adjacency matrix of cells in data pairs are obtained respectively. The first, second, and third sub-adjacency matrices are merged to obtain the final adjacency matrix. The feature matrix and the final adjacency matrix are input into the pre-trained variational graph autoencoder network to complete the completion of the missing genes in spatial transcriptomics.

[0008] The second aspect of the present invention provides a spatial omics data completion system based on variational graph autoencoders.

[0009] The spatial omics data completion system based on variational graph autoencoders includes: The data acquisition module is configured to: acquire spatial transcriptomics and single-cell RNA sequencing data from the same tissue pair, perform preprocessing, and obtain preprocessed data pairs; The feature matrix calculation module is configured to: extract some common genes in the data pairs to obtain a feature matrix; The adjacency matrix calculation module is configured to: obtain a first sub-adjacency matrix of cells in the spatial transcriptomics sequencing data based on spatial location information; obtain a second sub-adjacency matrix of cells in the single-cell RNA sequencing data and a third sub-adjacency matrix of cells in the data pair based on gene expression similarity; and merge the first sub-adjacency matrix, the second sub-adjacency matrix, and the third sub-adjacency matrix to obtain a final adjacency matrix; The completion module is configured to input the feature matrix and the final adjacency matrix into the pre-trained variational graph autoencoder network to complete the completion of missing genes in spatial transcriptomics. A third aspect of the present invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the steps in the spatial omics data completion method based on variational graph autoencoder as described in the first aspect of the present invention.

[0010] The fourth aspect of the present invention provides an electronic device, comprising a memory, a processor, and a program stored in the memory and runnable on the processor, wherein when the processor executes the program, the steps in the spatial omics data completion method based on variational graph autoencoder as described in the first aspect of the present invention are implemented.

[0011] One or more of the above technical solutions have the following beneficial effects: The present invention provides a spatial omics data completion method and system based on variational graph autoencoders, which can effectively utilize the position information and gene expression characteristics between cells in idle data, and obtain the first sub-adjacency matrix of cells in spatial transcriptomics sequencing data based on spatial position information; based on gene expression similarity, respectively obtain the second sub-adjacency matrix of cells in single-cell RNA sequencing data and the third sub-adjacency matrix of cells in data pairs; merge the first sub-adjacency matrix, the second sub-adjacency matrix and the third sub-adjacency matrix to obtain the final adjacency matrix, which can not only reduce errors, but also improve the similarity between the completed genes and the true values, and also improve downstream analysis. It has important scientific significance and application value for promoting spatial omics and related biomedical research.

[0012] When pre-training the variational graph autoencoder network, the present invention extracts multiple highly variable genes other than common genes from single-cell RNA sequencing data as genes to be completed in spatial transcriptomics sequencing data, extracts the expression values ​​of common genes and multiple highly variable genes in sample pairs, generates a gene expression matrix, and uses the mean square error as the loss function to complete the training of the variational graph autoencoder network; and multiplies the gene expression matrix with three mask matrices respectively to realize the training set, the idle test set and the single-cell test set. The three data sets are used to complete the training and testing of the network model, and the obtained network model can accurately complete the missing genes.

[0013] Advantages of additional aspects of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The accompanying drawings, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0015] Figure 1 This is a flow chart of the method of embodiment 1.

[0016] Figure 2 This is the completion result diagram of Example 1.

[0017] Figure 3This is a comparison chart of the clustering consistency index effects of the method in Example 1 and other methods. DETAILED DESCRIPTION

[0018] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present invention belongs.

[0019] It should be noted that the terms used herein are for describing particular embodiments only and are not intended to limit the exemplary embodiments according to the present invention.

[0020] In the absence of conflict, the embodiments of the present invention and the features thereof may be combined with each other.

[0021] Example 1 This embodiment discloses a spatial omics data completion method based on variational graph autoencoders.

[0022] like Figure 1 As shown in FIG, the spatial omics data completion method based on variational graph autoencoder includes the following steps: Acquire spatial transcriptomics and single-cell RNA sequencing data from the same tissue pair, perform preprocessing, and obtain preprocessed data pairs; Extract some common genes in the data pairs to obtain the feature matrix; Based on spatial location information, the first sub-adjacency matrix of cells in spatial transcriptomics sequencing data is obtained. Based on gene expression similarity, the second sub-adjacency matrix of cells in single-cell RNA sequencing data and the third sub-adjacency matrix of cells in data pairs are obtained respectively. The first, second, and third sub-adjacency matrices are merged to obtain the final adjacency matrix. The feature matrix and the final adjacency matrix are input into the pre-trained variational graph autoencoder network to complete the completion of the missing genes in spatial transcriptomics.

[0023] In a first aspect, a spatial omics data completion method based on a variational graph autoencoder is disclosed, comprising: Get pairs from the same organization Spatial transcriptomic gene expression matrix and Single-cell RNA sequencing gene expression matrices. In both matrices, rows correspond to cells and columns correspond to genes. We used scanpy to filter genes with mean expression values ​​less than 0.01 in the single-cell data, and then normalized and log-transformed the gene expression data. Extract genes shared by spatial transcriptomics and single-cell sequencing data to generate a The common gene expression matrix of is the number of common genes, extract the matrix The first 75% of the columns are obtained Feature Matrix , is the total number of genes used in training, Less than ; Constructing an adjacency matrix between cells based on position information and gene expression correlation ; For single-cell RNA sequencing data, 2000 highly variable genes were extracted using scanpy, excluding the common genes, as genes to be completed in the idle data. The expression values ​​of the common genes and 2000 highly variable genes in the idle and single-cell data were extracted. Generate a Gene expression matrix , as the true value label of gene expression, the expression value of the unmeasured gene in the idle run is set to 0; Gene expression matrix is ​​transformed using training mask, idle test mask and single cell test mask Divided into three parts: training set, idle test set and single-cell test set; For the feature matrix and the adjacency matrix , the constructed network model is input for training, and the error loss function of the gene expression value in the training set is calculated using the mean square error. The loss function is iteratively optimized using the Adam optimizer with a learning rate of 0.00001 to minimize the loss function; Stop training when the loss value on the untrained spatial transcriptome data rises above patience, and output The prediction results , completing the completion of missing genes in the spatial transcriptome.

[0024] As a further technical solution, the adjacency matrix A is constructed as follows: for The cells in the spatial transcriptomics sequencing data were analyzed, and the KNN algorithm was used to construct an inter-cell adjacency matrix with K equal to 6 based on the Euclidean distance between cells using the location information. The construction of for cells in single-cell RNA sequencing data, Gene expression values ​​are used as features to calculate the Pearson correlation coefficient between cells and generate a If the Pearson correlation coefficient between two cells is greater than the threshold, it is considered that there is an edge between the two cells, and the value of this position is 1, otherwise it is 0. ; For all The Pearson correlation coefficient between cells is calculated based on the expression value of the shared gene. If the Pearson correlation coefficient between two cells is greater than the threshold, it is considered that there is an edge between the two cells, and the value of this position is 1, otherwise it is 0. ; For the adjacency matrix between the three cells Merge, with the index of the empty cell in front and the index of the single cell in the back, and convert it into a sparse form to obtain the adjacency matrix ; As a further technical solution, for gene expression matrix , the data set is divided by multiplying with three mask matrices respectively: Training mask matrix Used to divide the part invested in network training, After listing the common genes and single-cell RNA sequencing data, the expression data of all genes in a small number of rows of cells are used for training. The value of the data position used for training is 1, and the value of the remaining positions is 0; for The idling mask matrix , idling mask matrix Used to test the prediction performance of the model, the spatial transcriptome that was not used for training is known. The position of the column gene is 1, and the rest are 0; Single cell mask matrix Also used to verify the predictive performance of the model, the positions of the cells in the first part of the single-cell RNA sequencing that were not used for training were set to 1, and the rest were set to 0.

[0025] As a further technical solution, the model architecture based on the variational graph autoencoder network consists of three parts: Two layers of SAGEConv graph convolution feature encoder. Given the feature matrix and the adjacency matrix , as the input of the neural network, first passes through the first layer of SAGEConv graph convolution to obtain The vector is then obtained through the second layer of SAGEConv New features ; VGAE. Given a feature matrix and the adjacency matrix , as the input of the neural network, it first passes through a GCN graph convolution layer with an output dimension of 512, and then passes through two GCN graph convolution layers with an output dimension of 1024 after the relu activation function to obtain the mean and variance respectively. The variance is resampled to obtain the latent variable ; Feature decoder. For new features and latent variables Add together to get a new potential representation , through an output dimension of The linear layer output Prediction results .

[0026] As a further technical solution, the true value of gene expression and prediction results , is the true value of the expression of the jth gene in the i-th cell, is the model-predicted value of the expression of the jth gene in the i-th cell, is the total number of cells, and k is the total number of genes. The loss function of model training is:

[0027]

[0028] Spatial transcriptome loss function: .

[0029] Single-cell RNA sequencing loss function:

[0030] Next, the method described in this embodiment will be further explained.

[0031] like Figure 1 As shown, this embodiment discloses a spatial omics data completion method based on a variational graph autoencoder, comprising: The spatial transcriptome data of 6963 cells and 254 genes generated by MERFISH technology from the primary motor cortex of mice, as well as the single-cell RNA sequencing data of 7240 cells and 25186 genes, were preprocessed and the expression values ​​of some common genes were extracted to obtain the feature matrix (see S1); Adjacency Matrix It is the sum of the preliminary adjacency relationships obtained by using multiple relationships in S2 S3 S4, that is, the adjacency matrix A i sum; Based on the feature matrix and adjacency matrix The training network obtains the completion result as shown in S7. The specific steps include: S1 Normalize and log-transform the gene expression values ​​in the idle and single-cell data, and extract the expression values ​​of the top 200 common genes to obtain the feature matrix X.

[0032] In this step of the present embodiment, for the single-cell RNA sequencing data of 7240 cells, the genes of the single cells were not filtered to ensure a certain number of common genes with the spatial transcription data.

[0033] S2 idle cell adjacency.

[0034] Here, it is assumed that cells with similar spatial positions have similar functions and thus have an adjacency relationship, so a spatial adjacency matrix is ​​constructed. . Given a cell and The two-dimensional space coordinates are and . The distance between two cells is calculated based on the position information, that is, the Euclidean distance.

[0035]

[0036] Use the KNN algorithm to obtain the nearest neighbor of each cell space. cells. The number of cells connected to each cell controls the number of neighbors of the cell, which is 6 here.

[0037] S3 Single-cell adjacency relationships.

[0038] For single-cell RNA sequencing data, the similarity of 7240 cells was calculated based on gene expression values, and we obtained The similarity matrix ,

[0039] Each row and column represents 7240 cells, obtained according to the correlation matrix If two cells If the correlation is greater than the threshold, it is 1.

[0040]

[0041] If it is less than the threshold .

[0042]

[0043] S4 Idle-single-cell adjacency.

[0044] For idle-single-cell sequencing data pairs, the common gene expression values ​​were calculated. The similarity of cells is obtained The similarity matrix ,

[0045] Rows and columns represent cells, obtained according to the correlation matrix If two cells If the correlation is greater than the threshold, it is 1.

[0046]

[0047] If it is less than the threshold .

[0048]

[0049] S5 adjacency matrix construction.

[0050] For the adjacency relationships generated in S2 S3 S4 、 、 , merge them, put the cell index of the idle data in front and the single cell index in the back, convert the merged adjacency matrix into a sparse matrix to get the final adjacency matrix .

[0051] S6 Mask matrix construction.

[0052] Create one The identity matrix of the training mask matrix is ​​obtained by setting the part after 200 columns of the first 10,000 rows to 0 and the rest to 1. ; Create one Zero matrix, set the 200th to 252nd columns of its first 6963 rows to 1, and get the empty mask matrix ; Create one Zero matrix, set the part after 200 columns from row 6963 to row 10000 to 1, and get the single cell mask matrix .

[0053] S7 calculates the error loss.

[0054] The feature matrix X and the adjacency matrix Input the network for training and obtain the completed gene expression value. The predicted value and true value of each gene in the cell are respectively obtained by 、 The training part, the idle test part and the single-cell test part are multiplied together, and the mean square error is used to calculate the error loss function of the corresponding parts in the network training.

[0055] The true value of gene expression and prediction results , is the true value of the expression of the jth gene in the i-th cell, is the model-predicted value of the expression of the jth gene in the i-th cell, is the total number of cells, and k is the total number of genes.

[0056] Loss function for model training:

[0057]

[0058] Spatial transcriptome loss function: .

[0059] Single-cell RNA sequencing loss function: .

[0060] S8 model optimization.

[0061] Select Adam optimizer, set the learning rate to 0.00001, and iteratively optimize the training loss , so that the model's loss function is minimized. The change in loss on the idle test set is used to determine whether the early stopping condition is met, preventing the model from overfitting and thus obtaining more accurate prediction results.

[0062] The trained model is obtained through steps S6, S7 and S8.

[0063] S9 Completion of spatial transcriptomics sequencing data.

[0064] Call the trained model using the feature matrix X and adjacency matrix Generate a The prediction results , which completes the expression values ​​of missing genes in the idle data, thereby making downstream analysis more efficient.

[0065] like Figure 2 、 Figure 3 Figure 2 shows the effect of comparing the completion results obtained by the method described in this embodiment with those of other methods. Four other completion methods, SPRITE, SpaGE, novoSpaRc, and stPlus, were selected to compare the completion results obtained by the method described in this embodiment. Figure 2 The PCC, SCC, Kendall's Tau, RMSE, and MAE represent the Pearson correlation coefficient, Spearman rank correlation coefficient, Kendall's correlation coefficient, root mean square error, and mean absolute error of the predicted results and true values ​​of gene expression in cells, respectively. and the true value , is the true value of the expression of the jth gene in the i-th cell, is the model prediction value of the expression of the jth gene in the i-th cell, and k is the total number of genes. The calculation formula for the relevant indicators of this cell is as follows: Pearson correlation coefficient (PCC):

[0066] in, is the true mean value of gene expression in the i-th cell, is the mean predicted value of gene expression in the i-th cell.

[0067] Spearman's rank correlation coefficient (SCC):

[0068] in, is the rank difference between the true value and the predicted value of the j-th gene.

[0069] Kendall's Tau:

[0070] Among them, c is the logarithm of the relative relationship between the true value and the predicted value of the two gene expressions, and d is the logarithm of the relative relationship between the true value and the predicted value of the two gene expressions.

[0071] Root Mean Square Error (RMSE):

[0072] Mean Absolute Error (MAE):

[0073] Compared with other methods, the correlation coefficient between the prediction results and the true value of the method described in this embodiment is significantly greater than that of other methods, and the error is significantly smaller than that of other methods; in downstream cell clustering tasks, such as Figure 3 As shown, the prediction results obtained by the method described in this embodiment are clustered, and the six clustering consistency indices with the true labels are greater than those of other methods, among which five clustering consistency indices are still improved compared with the original data.

[0074] The present invention proposes a spatial omics data completion method based on variational graph autoencoders, which obtains spatial transcriptome and single-cell RNA sequencing data pairs from the same tissue pair, uses scanpy to normalize and logarithmically transform the data, and obtains data preprocessing results; for the preprocessed paired data set, the expression values ​​of some common genes are extracted based on the gene names to obtain the feature matrix ; Based on the location information of cells in the data and the similarity of gene expression, the adjacency matrix between cells is constructed to obtain the adjacency matrix ; The data is divided into three parts through training mask, idle test mask and single-cell test mask. The training part is put into the network for training, the error loss is iteratively optimized, and the training is stopped after triggering early stopping to output the prediction results, thereby completing the completion of missing gene expression values ​​in the spatial transcriptome sequencing data. It can not only improve the gene coverage of image-based spatial transcriptome sequencing data, but also achieve data enhancement and improve downstream analysis. It has important scientific significance and application value for promoting spatial omics and related biomedical research.

[0075] Example 2 This embodiment discloses a spatial omics data completion system based on variational graph autoencoders.

[0076] The spatial omics data completion system based on variational graph autoencoders includes: The data acquisition module is configured to: acquire spatial transcriptomics and single-cell RNA sequencing data from the same tissue pair, perform preprocessing, and obtain preprocessed data pairs; The feature matrix calculation module is configured to: extract some common genes in the data pairs to obtain a feature matrix; The adjacency matrix calculation module is configured to: obtain a first sub-adjacency matrix of cells in the spatial transcriptomics sequencing data based on spatial location information; obtain a second sub-adjacency matrix of cells in the single-cell RNA sequencing data and a third sub-adjacency matrix of cells in the data pair based on gene expression similarity; and merge the first sub-adjacency matrix, the second sub-adjacency matrix, and the third sub-adjacency matrix to obtain a final adjacency matrix; The completion module is configured to input the feature matrix and the final adjacency matrix into the pre-trained variational graph autoencoder network to complete the completion of missing genes in spatial transcriptomics.

[0077] It can be understood that the system described in this embodiment also includes a preliminary pre-processing module: The preliminary preprocessing module is configured as follows: Acquire spatial omics and single-cell RNA sequencing data pairs from the same tissue pair, filter out low-expression genes in the single-cell data, normalize and log-transform the gene expression values ​​in the data pairs, and obtain preliminary data preprocessing results.

[0078] The adjacency matrix calculation module in the system of this embodiment: The adjacency matrix generation module is configured as follows: for The distance between two cells is calculated based on the position information, that is, the Euclidean distance. KNN is used to calculate the nearest 6 cells based on the Euclidean distance, and the result is ; For m single cells, calculate the similarity matrix between cells based on the gene expression value, and replace the position greater than the threshold with 1, otherwise it is 0, and get For all (n+m) cells, the similarity matrix between cells is calculated based on the expression value of the common genes. If the expression value is greater than the threshold, it is considered that there is an adjacency relationship between the cells; if the expression value is less than the threshold, it is considered that there is no adjacency relationship between the cells. , merge the three parts of the adjacency matrix and convert them into a sparse matrix to obtain the final adjacency matrix .

[0079] The system described in this embodiment also includes a gene expression matrix Generate module: Gene expression matrix Generate a module, configured as follows: For single-cell RNA sequencing data, in addition to the common genes, 2000 highly variable genes were extracted using scanpy as the genes to be completed in the idle data. The expression values ​​of the common genes and 2000 highly variable genes in the idle and single cells were extracted to construct the gene expression matrix. , the expression values ​​of genes not measured in the idle run were set to 0.

[0080] Also includes dataset partitioning module: The dataset partitioning module is configured as follows: For the gene expression matrix Y, it is multiplied with the three mask matrices to obtain the training set, idle test set and single-cell test set.

[0081] Also includes training modules: The training module is configured as follows: For the feature matrix and the adjacency matrix , input the network for training, output the completed prediction results, use the mean square error to calculate the error loss function between the model prediction value and the true value, iteratively optimize the training loss to minimize the loss function, and stop training when the loss of the idle test part does not decrease for more than the set patience number of times; In the completion module, the trained model outputs prediction results to complete the missing gene expression values ​​in the idle data.

[0082] Example 3 The purpose of this embodiment is to provide a computer-readable storage medium.

[0083] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the spatial omics data completion method based on variational graph autoencoder as described in Example 1 of the present disclosure.

[0084] Example 4 The purpose of this embodiment is to provide an electronic device.

[0085] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, the steps in the spatial omics data completion method based on the variational graph autoencoder as described in Example 1 of the present disclosure are implemented.

[0086] The steps involved in the apparatuses of Examples 2, 3, and 4 above correspond to those of Method Example 1. For detailed implementations, please refer to the relevant description of Example 1. The term "computer-readable storage medium" should be understood to mean a single medium or multiple media containing one or more instruction sets; it should also be understood to include any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and causing the processor to perform any method of the present invention.

[0087] Those skilled in the art will appreciate that the modules or steps of the present invention described above can be implemented using a general-purpose computer device. Alternatively, they can be implemented using program code executable by a computing device, which can then be stored in a storage device and executed by the computing device. Alternatively, they can be fabricated into separate integrated circuit modules, or multiple modules or steps can be fabricated into a single integrated circuit module for implementation. The present invention is not limited to any specific combination of hardware and software.

[0088] Although the above describes the specific embodiments of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without any creative work are still within the scope of protection of the present invention.

Claims

1. A spatial omics data completion method based on variational graph autoencoders, characterized by: The following steps are involved: Acquire spatial transcriptomics and single-cell RNA sequencing data from the same tissue pair, perform preprocessing, and obtain preprocessed data pairs; Extract some common genes in the data pairs to obtain the feature matrix; Based on the spatial location information, the first sub-adjacency matrix of cells in the spatial transcriptomics sequencing data is obtained; Based on the similarity of gene expression, the second sub-adjacency matrix of cells in the single-cell RNA sequencing data and the third sub-adjacency matrix of cells in the data pair are obtained respectively; the first sub-adjacency matrix, the second sub-adjacency matrix and the third sub-adjacency matrix are merged to obtain the final adjacency matrix; The feature matrix and the final adjacency matrix are input into the pre-trained variational graph autoencoder network to complete the completion of the missing genes in spatial transcriptomics.

2. The spatial omics data completion method based on variational graph autoencoder according to claim 1, characterized in that: The preprocessing includes filtering genes whose expression mean is less than a set value in the single-cell RNA sequencing data, and normalizing and logarithmically transforming the gene expression data in the data pairs.

3. The spatial omics data completion method based on variational graph autoencoder according to claim 1, characterized in that: The specific calculation method of the first sub-adjacency matrix, the second sub-adjacency matrix and the third sub-adjacency matrix is: Calculate the Euclidean distance between cells in the spatial transcriptomics sequencing data, use KNN to calculate the N cells with the closest Euclidean distance, construct the adjacency matrix of the N cells, and obtain the first sub-adjacency matrix; Based on the cell gene expression values, the Pearson correlation coefficient between cells in the single-cell RNA sequencing data is calculated to determine whether the Pearson correlation coefficient is greater than the first set threshold. If so, it is set to 1, otherwise it is set to 0, to obtain the second sub-adjacency matrix; Based on the shared gene expression values, the Pearson correlation coefficient of the cells in the data pair is calculated to determine whether the Pearson correlation coefficient is greater than the second set threshold. If so, it is set to 1, otherwise it is set to 0, to obtain the third sub-adjacency matrix.

4. The spatial omics data completion method based on variational graph autoencoder according to claim 1, characterized in that: It also includes pre-training the variational graph autoencoder network. The specific process is as follows: Acquire spatial transcriptomics and single-cell RNA sequencing data from the same tissue pairs as sample pairs to obtain a sample dataset containing multiple sample pairs; Extract some common genes in the sample pairs to obtain the feature matrix; For the single-cell RNA sequencing data in the sample pairs, multiple highly variable genes other than the common genes were extracted as the genes to be completed in the spatial transcriptomics sequencing data. The expression values ​​of the common genes and multiple highly variable genes in the sample pairs were extracted. Generate a gene expression matrix based on the expression values ​​of common genes and multiple highly variable genes , as the true value label of gene expression, the expression value of unmeasured genes in spatial transcriptomics sequencing data is set to 0; The gene expression matrix is ​​divided into three parts: training set, idle test set and single cell test set; The mean square error is used to calculate the loss function of the gene expression values ​​in the training set, so that the loss function is minimized and the training of the variational graph autoencoder network is completed.

5. The spatial omics data completion method based on variational graph autoencoder according to claim 4, characterized in that: The gene expression matrix is ​​multiplied by three mask matrices respectively to realize the division of training set, idle test set and single cell test set. The three mask matrices specifically include training mask matrix, idle mask matrix and single cell mask matrix: Training mask matrix Used to divide the part invested in network training, After the common genes and single-cell RNA sequencing data are listed, the expression data of all genes in some rows of cells are put into training. The value of the data position put into training is 1, and the value of the other positions is 0; Idle mask matrix Used to test the predictive performance of the model, not used for training The position of the column gene is 1, and the rest are 0. is the total number of shared genes; Single cell mask matrix Also used to verify the predictive performance of the model, the positions of the cells in the first part of the single-cell RNA sequencing that were not used for training were set to 1, and the rest were set to 0.

6. The spatial omics data completion method based on variational graph autoencoder according to claim 1, characterized in that: The variational graph autoencoder network model architecture consists of three parts: a feature encoder and VGAE set up in parallel, and a feature decoder: The given feature matrix and the adjacency matrix Input into the feature encoder of the variational graph autoencoder network model, and then pass through two layers of SAGEConv graph convolution to obtain new features ; The given feature matrix and the adjacency matrix The input is sent to VGAE and first passes through a GCN graph convolution layer. The output of the GCN graph convolution layer passes through the relu activation function and then passes through two GCN graph convolutions to obtain the mean and variance respectively. The variance is resampled to obtain the latent variable ; In the feature decoder, the new features and latent variables Add together to get a new latent representation , output the prediction result through a linear layer .

7. The spatial omics data completion method based on variational graph autoencoder according to claim 1, characterized in that: Loss function for training the variational graph autoencoder network model: ; ; Spatial transcriptome loss function: ; Single-cell RNA sequencing loss function: ; in, is the true value of gene expression, is the prediction result of the model, is the true value of the expression of the jth gene in the i-th cell, is the model-predicted value of the expression of the jth gene in the i-th cell, is the total number of cells, and k is the total number of genes.

8. Spatial omics data completion system based on variational graph autoencoder, characterized by: include: The data acquisition module is configured to: acquire spatial transcriptomics and single-cell RNA sequencing data from the same tissue pair, perform preprocessing, and obtain preprocessed data pairs; The feature matrix calculation module is configured to: extract the common genes in the data pairs to obtain the feature matrix; The adjacency matrix calculation module is configured to: obtain a first sub-adjacency matrix of cells in the spatial transcriptomics sequencing data based on spatial position information; Based on the similarity of gene expression, the second sub-adjacency matrix of cells in the single-cell RNA sequencing data and the third sub-adjacency matrix of cells in the data pair are obtained respectively; the first sub-adjacency matrix, the second sub-adjacency matrix and the third sub-adjacency matrix are merged to obtain the final adjacency matrix; The completion module is configured to input the feature matrix and the final adjacency matrix into the pre-trained variational graph autoencoder network to complete the completion of missing genes in spatial transcriptomics.

9. A computer-readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, the steps of the spatial omics data completion method based on variational graph autoencoder are implemented.

10. An electronic device comprising a memory, a processor, and a program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps in the spatial omics data completion method based on variational graph autoencoder are implemented as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Spatial omics multi-modal fusion method under single cell level

    CN121011247A

  • A spatial omics multi-modal fusion method at single cell level

    CN121011247B