Single-cell multi-sample mixed sequencing splitting method and device based on self-supervised variational autoencoder

By splitting the mixed sequencing data of single-cell multi-sample samples using deep learning self-supervised variational autoencoder model, the problems of high costs, waste of resources and difficulty in identifying two cells in the existing methods are solved, and efficient and accurate data splitting and double cell deletion are achieved.

CN119132390BActive Publication Date: 2025-04-18GUANGDONG PHARMA UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411233840.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-04
Publication Date
2025-04-18
Estimated Expiration
2044-09-04

AI Technical Summary

Technical Problem

The existing single-cell multi-sample mixed-sequencing and splitting methods have problems such as high cost, waste of resources, and difficulty in identifying two-cells. Biomarker-based methods are prone to damage samples, poor scalability of computer algorithms and rely on simple machine learning algorithms.

Method used

The self-supervised variational autoencoder (VAE) model based on deep learning was used to split the mixed sequencing data of single-cell multi-sample samples. Data splitting and double-cell deletion were achieved by identifying potential variants, filtering SNP sites, building a single-cell genotype matrix, training a variant autoencoder model, obtaining hidden variables, unsupervised clustering and identifying two cells.

Benefits of technology

This method can effectively reduce the cost of single-cell sequencing, improve resource utilization, improve the accuracy and efficiency of double-cell recognition, and has good scalability, and does not require a single-sample genotype.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119132390B_ABST
    Figure CN119132390B_ABST
Patent Text Reader

Abstract

The present invention relates to a method and device for splitting single-cell multi-sample mixed sequencing based on a self-supervised variational autoencoder. The method comprises the steps of: S1. screening candidate SNPs; S2. counting the genotypes of each cell at the candidate SNPs; S3. constructing a single-cell genotype matrix; S4. constructing a variational autoencoder model; S5. using the trained model to obtain the latent variable representation of each cell in the matrix; S6. performing unsupervised clustering on the latent variables of each cell; S7. based on the clustering results, calculating the similarity between each cell and the cell cluster to which it belongs, identifying and deleting double cells, and finally completing the splitting of single-cell multi-sample mixed sequencing data. The technology of the present invention can effectively utilize the self-specific genotype difference information between each mixed sample to split the single-cell multi-sample mixed sequencing. The applicable objects of the present invention include single-cell sequencing experiments for normal samples, tumor samples and cell line samples.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of single-cell sequencing in high-throughput sequencing, and specifically relates to a single-cell multi-sample mixed sequencing splitting method and device based on a self-supervised variational autoencoder. Background Art

[0002] In recent years, the rapid development of high-throughput sequencing technology has led to a sharp decline in sequencing costs, thus helping gene sequencing to be widely used in life science research and clinical fields. However, compared with ordinary population sequencing, the construction of single-cell sequencing libraries is still a relatively cumbersome process, and the cost of sequencing is still high. The sequencing cost of a single sample usually exceeds 10,000 yuan, but in many bioinformatics analyses, more experimental repetitions are required, and one experiment often requires sequencing of multiple samples. At the same time, due to sequencing technology, there will be a certain proportion of double cells in single-cell sequencing. With the development of many high-throughput sequencing platforms, their throughput continues to increase, and single-time sequencing of a single sample is prone to waste of resources. Therefore, sequencing multiple samples together can effectively reduce experimental costs and reduce batch effects. At present, there are two main methods for splitting mixed sequencing data. One is mainly based on biomarkers, that is, the sample cells are marked with sample-specific barcodes before mixing, and then split according to the barcodes. However, this method has disadvantages such as easy destruction of samples and adding additional interference to the experiment. The other is based on the genetic differences of the samples themselves, using computer algorithms for splitting, and does not require additional experiments. However, the existing methods of this method have some problems such as requiring the provision of single sample genotypes, poor scalability, and only using a simple machine learning algorithm. Summary of the invention

[0003] In order to solve the shortcomings of biomarker-based multi-sample mixed sequencing splitting technology and existing data splitting algorithms and improve the identification of double cells in single-cell sequencing data, the present invention proposes a single-cell multi-sample mixed sequencing splitting technology based on deep learning self-supervised variational autoencoder.

[0004] The technical solution of the present invention is:

[0005] A single-cell multi-sample mixed sequencing splitting method based on a self-supervised variational autoencoder comprises the following steps:

[0006] S1. Identify all potential variants in mixed sequencing data, filter potential variants, retain SNP sites, and screen out candidate SNPs;

[0007] S2. Counting the genotypes of each cell at the candidate SNP to obtain the genotype type of each cell at the candidate SNP;

[0008] S3. Convert the sparse matrix into a single-cell genotype matrix, filter, screen and fill the SNPs of each cell in the matrix, and finally encode to construct a single-cell genotype matrix;

[0009] S4. Construct a variational autoencoder model to train and reconstruct the single-cell genotype matrix;

[0010] S5. Use the trained model to obtain the hidden variables of each cell;

[0011] S6. Perform unsupervised clustering on the latent variables of each cell to obtain cell clusters equal to the number of samples;

[0012] S7. Based on the clustering results, the similarity between each cell and its cell cluster is calculated, and duplicate cells are identified and deleted to complete the splitting of single-cell multi-sample mixed sequencing data.

[0013] Furthermore, in the step S1, in the process of identifying mutations, first retain the candidate SNV sites with base quality greater than 30, appearing in at least two reads, coverage greater than 40, using the best three alleles and alignment quality value greater than 30, and then filter out the SNPs therein as candidate mutation sites. Since there are usually some false positive sites in sequencing data, which may be caused by factors such as sequencing errors or DNA damage, by screening bases with base quality greater than 30 and sites with coverage greater than 40, the occurrence of false positives can be effectively reduced and high-quality mutation sites can be obtained. At the same time, the true position of the mutation site can also be better found through the screening of alignment quality. The SNP sites obtained by the above-mentioned parameter screening can effectively improve the quality of subsequent analysis and reduce false positives compared to the lower screening threshold, laying the foundation for the effectiveness and accuracy of downstream analysis.

[0014] In a specific embodiment, freebayes software is used in step S1 to screen candidate SNV sites in mixed sequencing data, with base quality greater than 30, appearing in at least two reads, coverage greater than 40, using the best three alleles, and alignment quality value greater than 30. Then vcftools is used to filter the SNV sites, retaining only the SNP sites, and deleting the base deletion, insertion, and multi-base variation sites.

[0015] In step S2, according to the provided mutation sites, the mutation sites of each cell are counted into statistical expression and genotype. Compared with statistical expression, the use of genotype statistics can effectively reduce the amount of data in subsequent model training, improve model training efficiency and save computing resources. At the same time, using genotype to represent mutation sites can make model training more robust than using continuous value expression, and is less affected by extreme values ​​and outliers.

[0016] In a specific embodiment, step S2 uses VarTrix software to count the genotypes of each cell at the candidate SNP based on the reference genome, using 0 to indicate absence, 1 to indicate the same as the reference genome, 2 to indicate different from the reference genome, and 3 to indicate heterozygous for the site.

[0017] Furthermore, in step S3, the SNPs missing in 99% of the cells and the SNP sites identical in 80% of the cells are filtered out, and then according to the degree of missingness of the matrix, the 20 closest cells are selected for filling by calculating the similarity between each cell to obtain the final single-cell genotype matrix. By deleting the variant sites that are too missing and identical in most cells, the sparsity of the matrix during subsequent model training can be reduced. Since these features usually have little information, the data dimension can be reduced after deletion, the training efficiency can be improved, the model can be focused on the features that are truly informative, overfitting can be reduced, and interference with model training can be reduced, thereby improving model performance. At the same time, the matrix is ​​encoded to eliminate the difference in distance between genotypes of different categories due to symbols.

[0018] In a specific embodiment, step S3 uses the Seurat software package of R language to convert the sparse matrix obtained by VarTrix software into a behavior cell, a single-cell genotype matrix of SNP, and then the SNPs missing in 99% of the cells and the SNP sites that are the same in 80% of the cells are filtered out. Finally, according to the degree of missingness of the matrix, by calculating the similarity between each cell, the 20 closest cells are selected for filling, and then the matrix is ​​encoded according to different genotypes, and 0, 1, 2 and 3 are encoded as (0, 0), (1, 0), (0, 1) and (0.5, 0.5), respectively, and the final single-cell genotype matrix for subsequent model training is obtained at this time.

[0019] Furthermore, in the step S4, the constructed single-cell genotype matrix is ​​used, each cell is used as a training sample, and each SNP is used as a training feature to construct a variational autoencoder model. The data is divided into a training set, a validation set, and a test set, and then the model is trained. The variational autoencoder model is composed of an encoder, a sampling layer, and a decoder. The encoder is composed of a convolutional layer and a fully connected layer, and the decoder is composed of a deconvolutional layer and a fully connected layer. The encoder converts the input data into the mean and variance of the latent variable space, and passes it to the sampling layer. The sampling layer accepts the mean and variance passed by the encoder, randomly samples in the latent variable space, and obtains the latent variable. The decoder accepts the latent variable from the sampling layer and reconstructs the data according to the latent variable. Except for the output layer using the Sigmoid activation function, the other layers use the ELU activation function. The loss function of the model is composed of reconstruction loss and regularization loss, that is, binary cross entropy and KL divergence, which are used to measure the difference between the original data and the reconstructed data and the difference between the latent variable and the normal distribution, respectively; the dimension of the latent variable is set to 4. When setting the model structure, placing the convolutional layer at the front end of the encoder can enable the model to effectively learn the potential information in the single-cell genotype matrix and better extract the information in the cell. By setting the reconstruction loss and regularization loss, the data can be better optimized, overfitting can be prevented, and the generalization ability of the model can be improved.

[0020] In a specific embodiment, step S4 uses Python's TensorFlow and Keras to build a variational autoencoder model. The model consists of an encoder, a decoder, and a sampling layer. SNP is used as a feature during model training, and each cell is used as a training sample. The encoder consists of a convolutional layer and a fully connected layer, and the decoder consists of a deconvolutional layer and a fully connected layer. The encoder converts the input data into the mean and variance of the latent variable space, and passes it to the sampling layer. The sampling layer accepts the mean and variance passed by the encoder, randomly samples in the latent variable space, and obtains the latent variable. The decoder accepts the latent variable from the sampling layer and reconstructs the data according to the latent variable. Except for the output layer using the Sigmoid activation function, the other layers use the ELU activation function. The loss function of the model consists of reconstruction loss and regularization loss, that is, binary cross entropy and KL divergence, which are used to measure the difference between the original data and the reconstructed data and the difference between the latent variable and the normal distribution. The dimension of the latent variable is set to 4, and then 60% of the cells are divided into a training set, 20% of the cells are validation sets, and the remaining 20% ​​of the cells are test sets. Finally, the Adam optimizer is used to train the model. Further, in step S5, the single cell genotype matrix is ​​input into the trained model, and the output of the encoder is input into the sampling layer for sampling to obtain the latent variables of each cell.

[0021] Furthermore, in step S6, the tSNE algorithm is used to reduce the dimension and visualize the latent variable matrix obtained, reducing the dimension to 2 dimensions, and finally, the kmeans algorithm is used for clustering to obtain cell clusters with the same number of samples.

[0022] In a specific embodiment, when the tSNE algorithm is used, the learning rate is 200 and the perplexity is 30 to find the optimal distribution of hidden variables. When the kmeans algorithm is used, 10 initialization attempts are made to increase the probability of the algorithm converging to the global optimum without significantly increasing the computational overhead. If the number of initialization attempts is too small, the algorithm may converge to a local optimal solution, resulting in poor reliability of the clustering results and unstable clustering results.

[0023] Furthermore, in step S7, according to the clustering results, the genotype ratio of each cell cluster is counted, and then the similarity between each cell and the class to which it belongs is calculated. If the similarity is less than 3 times the standard deviation, it is marked as a double cell and deleted. The process is repeated until no new double cells are found, and finally the cells and double cells of each cell cluster are obtained. When deleting double cells, it is based on whether the similarity exceeds 3 times the standard deviation, which can better adapt to the data containing different proportions of double cells, and there is no need to know the percentage of double cells in each data set in advance. At this time, each cell cluster and double cell are obtained, and the data corresponding to the cells of each cell cluster are extracted from the mixed sample data, so as to realize data splitting and double cell deletion.

[0024] In addition, to achieve the above-mentioned purpose, the present invention also provides a single-cell multi-sample mixed sequencing splitting system based on a self-supervised variational autoencoder, comprising:

[0025] The candidate SNP screening module is used to identify all potential variants in the mixed sequencing data, filter the potential variants, retain the SNP sites therein, and thus screen out candidate SNPs;

[0026] The SNP genotype statistics module is used to count the genotypes of each cell at the candidate SNP to obtain the genotype type of each cell at the candidate SNP;

[0027] The single-cell genotype matrix construction module is used to convert the sparse matrix into a single-cell genotype matrix, filter, screen and fill in the data of the SNPs of each cell in the matrix;

[0028] The cell latent variable representation module is used to build a variational autoencoder model to train and reconstruct the single-cell genotype matrix data; and use the trained model to represent the latent variables of each cell;

[0029] The unsupervised clustering module is used to perform unsupervised clustering of the latent variables of each cell to obtain cell clusters equal to the number of samples.

[0030] The identification and splitting module is used to calculate the similarity between each cell and its corresponding cell cluster, identify and delete double cells, and finally complete the splitting of single-cell multi-sample mixed sequencing data.

[0031] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, it implements the above-mentioned single-cell multi-sample mixed sequencing splitting method based on self-supervised variational autoencoder.

[0032] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the above-mentioned single-cell multi-sample mixed sequencing splitting method based on self-supervised variational autoencoder is implemented.

[0033] Compared with the prior art, the present invention has the following beneficial effects:

[0034] When single-cell sequencing analysis is required for multiple samples, the cost of traditional single-cell sequencing is relatively high. If multi-sample mixed sequencing splitting based on biomarkers is adopted, although the experimental cost can be effectively reduced, the technology still has instability, which is easy to damage samples and cause additional interference to cells. Some methods based on computer algorithms need to provide single sample genotypes, some have poor scalability, and only use a simple machine learning algorithm. The present invention is based on a deep learning algorithm, and through the corresponding processing flow, a model with good stability, efficiency and data splitting effect can be obtained after training. The model can utilize the genetic information of the sample itself, does not need to provide the genotype of a single sample, and has good scalability, can effectively split the data, and further reduce the experimental cost.

[0035] When performing single-cell sequencing data analysis of multiple samples, the traditional single-cell sequencing of a single sample is costly and has batch effects. Although the use of multi-sample mixed sequencing technology can effectively reduce the sequencing cost of a single sample, existing data splitting methods, such as biomarker-based methods, are prone to destroying samples and adding additional interference to the experiment. The splitting method of the present invention can utilize the genotype specificity of the sample itself, efficiently split the single-cell multi-sample mixed sequencing, and further reduce the experimental cost. The applicable objects of the present invention include single-cell sequencing experiments for normal samples, tumor samples, and cell line samples. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 A technical flow chart of a splitting method according to an embodiment of the present invention;

[0037] Figure 2 Schematic diagram of the model structure of the variational autoencoder of the present invention;

[0038] Figure 3 tSNE diagram of the mixed sample dimensionality reduction clustering and double cell removal in Example 1 (AML1: tSNE of the first data set AML2: tSNE of the second data set AML3: tSNE of the third data set);

[0039] Figure 4 The ROC curves are plotted according to the true origins of the cells after dimensionality reduction clustering of the mixed samples in Example 1 and elimination of double cells (AML1: ROC of the first data set AML2: ROC of the second data set AML3: ROC of the third data set);

[0040] Figure 5 The Venn diagram of the double cells identified in Example 1 and the existing software Vireo and Souporcell (AML1: Venn diagram of the first data set AML2: Venn diagram of the second data set AML3: Venn diagram of the third data set);

[0041] Figure 6 tSNE diagram of the dual cell distribution identified for the mixed sample of Example 1 (AML1: tSNE of the first dataset AML2: tSNE of the second dataset AML3: tSNE of the third dataset);

[0042] Figure 7 tSNE diagram of the mixed sample dimensionality reduction clustering and double cell removal in Example 2 (NSCLC1: tSNE of the first data set NSCLC2: tSNE of the second data set NSCLC1: tSNE of the third data set);

[0043] Figure 8 ROC curves plotted according to the true origins of the cells after dimensionality reduction and clustering of the mixed samples in Example 2 (NSCLC1: ROC of the first data set, NSCLC2: ROC of the second data set, NSCLC3: ROC of the third data set). DETAILED DESCRIPTION

[0044] In order to better demonstrate the technical scheme, purpose and advantages of the present invention, the present invention is further described in detail in conjunction with the following specific examples and accompanying drawings. The process, conditions, experimental methods, etc. for implementing the present invention, except for the contents specifically mentioned below, are all common knowledge and common common sense in the art, and the present invention has no special restrictions. The biochemical reagents used in the following examples are all commercially available.

[0045] Example 1

[0046] In this example, three data sets consisting of single-cell sequencing samples of three cell lines treated with different drugs containing acute myeloid leukemia (AML) are split based on sample genotypes. The specific steps are as follows:

[0047] (1) Library construction and sequencing

[0048] In this example, three cell line tissues of acute myeloid leukemia (KG-1a, Kasumi-1 and HL-60) were obtained. KG-1a and Kasumi-1 were cultured in a T25 culture flask using 6 mL of RPMI1640 medium containing 10% fetal bovine serum (FBS). HL-60 was cultured in a T25 culture flask using 6 mL of IMDM medium containing 20% ​​fetal bovine serum. The cells were placed in a cell culture incubator at 37°C, 5% CO2, and a humid environment for growth. The three cell lines were mixed and treated with three different drugs (cytarabine, azacitidine, and decitabine) to obtain three treatment groups, each of which was labeled with CMO. A suspension containing 200,000 starting cells was taken from each of the three cell lines in each drug treatment group and placed in the same 15 mL centrifuge tube. After lysis, centrifugation, flow cytometry and other experimental steps, a single cell nuclear suspension was obtained and sequenced using the 10xGenomics single-cell transcriptome platform. The sequencing platform used was Illumina Novasek PE150.

[0049] (2) Data Analysis

[0050] refer to Figure 1 First, use FastQC software to perform basic quality assessment on the raw data, and then use Trimmomatic software to filter low-quality data. The fastq file after sequencing and filtering is analyzed by cellranger for genome alignment, transcriptome alignment and cell statistics. At least 3 cells expressing genes and cells with mitochondrial genes accounting for no more than 20% are retained. Then select cells with gene expression numbers between 500-8000 and reads not less than 2000 to obtain bam files. Freebayes software is used to identify potential variant sites in bam files (parameter settings: freebayes-C 2-q 30-n 3-E 1-m 30--min-coverage 40--pooled-continuous), and the reference genome used is the human hg38 reference genome. After obtaining the variant sites, vcftools is used to filter and only the SNP sites are retained (parameter settings: vcftools--remove-indels--recode--recode-INFO-all). The variant sites obtained at this time are candidate SNP sites.

[0051] Then, the VarTrix software was used to count the genotypes of each cell at the candidate SNP (the parameter was set to: vartrix_linux--scoring-method consensus). After obtaining the sparse matrix, the Seurat package of the R language was used to convert the sparse matrix into a single-cell genotype matrix, and the SNPs missing in 99% of the cells and the SNP sites that were the same in 80% of the cells were filtered out. Finally, according to the degree of missingness in the matrix, the similarity between each cell was calculated, and the 20 most similar cells were selected for filling.

[0052] The constructed VAE variational autoencoder model is then used to train the single-cell genotype matrix. The VAE model is built using Python's TensorFlow and Keras, and its structure is as follows: Figure 2 As shown in the figure, it consists of an encoder, a decoder and a sampling layer. The encoder consists of a convolutional layer and a fully connected layer, and the decoder consists of a deconvolutional layer and a fully connected layer. The encoder converts the input data into the mean and variance of the latent variable space, and passes it to the sampling layer. The sampling layer accepts the mean and variance passed by the encoder, randomly samples in the latent variable space, and obtains the latent variable. The decoder accepts the latent variable from the sampling layer and reconstructs the data according to the latent variable. Except for the output layer using the Sigmoid activation function, other layers use the ELU activation function. The loss function of the model consists of reconstruction loss and regularization loss, namely binary cross entropy and KL divergence, which are used to measure the difference between the original data and the reconstructed data and the difference between the latent variable and the normal distribution. When setting the structure of the model, putting the convolutional layer at the forefront of the encoder can enable the model to effectively learn the potential information in the single-cell genotype matrix and better extract the information in the cell. By setting the reconstruction loss and regularization loss, the data can be better optimized, overfitting can be prevented, and the generalization ability of the model can be improved.

[0053] SNPs were used as features for model training, each cell was used as a training sample, and the dimension of the latent variable was set to 4. Then 60% of the cells were divided into training sets, 20% of the cells were used as validation sets, and the remaining 20% ​​of the cells were used as test sets. Finally, the Adam optimizer was used to train the model.

[0054] After training the model, the latent variables of each cell are obtained, and then the tSNE algorithm is used to reduce the dimension and visualize the latent variable matrix obtained, reducing the dimension to 2 dimensions, where the learning rate of the algorithm is 200 and the perplexity is 30, which is used to find the optimal distribution of latent variables. Then the kmeans algorithm is used for clustering, and the number of clusters is set to 3. 10 initialization attempts are made to increase the probability of the algorithm converging to the global optimum without greatly increasing the computational overhead, and obtain cell clusters with the same number of samples. Finally, according to the similarity between the cell and the class to which it belongs, the cells with a similarity less than 3 times the standard deviation are marked as double cells, and the process is repeated until no new double cells are found. The AUC and accuracy are calculated using the labels of the cell lines from which each cell comes, and the accuracy of the splitting results of the model is verified. The accuracy of double cell recognition is compared with two existing software Vireo and Souporcell.

[0055] (3) Results display

[0056] Three treatment groups were set up for single-cell sequencing, and three sequencing data of three mixed samples of three cell lines were obtained, AML1, AML2 and AML3, with corresponding cell numbers of 1127, 2705 and 2349, and the final number of retained SNPs was 5747, 5788 and 4619. The three data sets were clustered separately, and the results shown in Tables 1 and 2 were obtained, where 1 to 3 represent three cell clusters, doublet represents multi-cell conditions, and Table 2 shows the number of double cells identified by each software and the number of intersections. Figure 3 The tSNE distribution diagram of the clustering results of the model after identifying and deleting double cells is shown. By observing the image, it can be clearly seen that it is clustered into 3 classes, corresponding to the number of mixed samples in the data set. Figure 4 What is shown is the ROC curve diagram drawn based on the prediction results of the model using the actual sample sources of each cell. Figure 5 The Venn diagram of the double cells identified by the model and the existing software is shown, and it can be seen that most of the double cells identified are overlapping. Figure 6 The distribution of the identified double cells in the cluster diagram is shown in the following table. Figure 3 tSNE clustering diagram, Figure 4 ROC curve and Figure 5 The present embodiment demonstrates that the invented technology can be effectively used for the segmentation of normal samples and the identification of double cells.

[0057] Table 1

[0058]

[0059] Table 2

[0060]

[0061] Example 2

[0062] (1) Data source

[0063] The source data of this embodiment is the data of non-small cell lung cancer (NSCLC) of 7 people provided by Gasper W, Rossi F, Ligorio M, Ghersi D. Variant calling enhances the identification of cancer cells in single-cell RNA sequencing data. PLoS Comput Biol. 2022; 18(10): e1010576. Published 2022Oct3. doi: 10.1371 / journal.pcbi.1010576, and the library was constructed and sequenced on the 10xGenomics single-cell transcriptome platform.

[0064] (2) Data Analysis

[0065] refer to Figure 1, using the 7 samples provided by the data source, samtools merge was used to merge the bam files of 3, 4 and 6 samples to form 3 simulated mixed sample data sets NSCLC1, NSCLC2 and NSCLC3. Freebayes software was used to identify potential variant sites in the bam files (parameters were set to: freebayes-C 2-q 30-n3-E 1-m 30--min-coverage 40--pooled-continuous), and the reference genome used was the human hg38 reference genome. After obtaining the variant sites, vcftools was used to filter and only the SNP sites were retained (parameters were set to: vcftools--remove-indels--recode--recode-INFO-all). The variant sites obtained at this time were the candidate SNP sites. After that, the VarTrix software is used to count the genotype of each cell at the candidate SNP (the parameter is set to: vartrix_linux--scoring-method consensus), and the sparse matrix is ​​converted into a single-cell genotype matrix using the Seurat package of the R language, and the SNPs missing in 99% of the cells and the SNP sites that are the same in 80% of the cells are filtered out. Finally, according to the degree of missingness of the matrix, the 20 closest cells are selected for filling by calculating the similarity between each cell. Then the single-cell genotype matrix is ​​trained using the variational autoencoder model constructed in Example 1 of this article, and the hidden variables of each cell are obtained after the model is trained. Then the tSNE algorithm is used to reduce the dimension and visualize the obtained hidden variable matrix, and the dimension is reduced to 2 dimensions, where the learning rate of the algorithm is 200 and the perplexity is 30, which is used to find the distribution of the better hidden variables. Then use the kmeans algorithm for clustering, set the number of clusters to 3, 4, and 6, and perform 10 initialization attempts to increase the probability of the algorithm converging to the global optimum without significantly increasing the computational overhead, and obtain cell clusters with the same number of samples. Since there are no double cells in the simulated mixed data, double cells are not eliminated. Use the labels of the source samples of each cell to calculate the AUC and accuracy to verify the accuracy of the model's splitting results.

[0066] (3) Results display

[0067] The number of samples of the three simulated mixed sample data sets NSCLC1, NSCLC2 and NSCLC3 are 3, 4 and 6, the corresponding number of cells are 5948, 8026 and 13960, and the number of SNPs retained are 4699, 4070 and 4835. The three data sets are clustered respectively, and the results shown in Tables 3, 4 and 5 can be obtained, where 1 to 6 represent the number of six cell clusters. Figure 7 The tSNE distribution diagram of the clustering results of the model is shown. By observing the image, it can be clearly seen that the clusters are divided into 3, 4, and 6 classes, corresponding to the number of mixed samples in the dataset. Figure 8 The ROC curve is drawn based on the prediction results of the model using the real sample sources of each cell. The AUC and accuracy indicators shown in the following table are: Figure 7 The tSNE clustering diagram and Figure 8 The ROC curve diagram of this embodiment proves that the invented technology can be effectively used for splitting normal samples.

[0068] Table 3

[0069]

[0070] Table 4

[0071]

[0072] Table 5

[0073]

[0074] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0075] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. A single-cell multi-sample mixed sequencing splitting method based on self-supervised variational autoencoder, characterized in that: The following steps are involved: S1. Identify all potential variants in the mixed sequencing data, filter the potential variants, retain the SNP sites, and screen out candidate SNPs; in the process of identifying variants, first retain the candidate SNV sites with base quality greater than 30, appearing in at least two reads, coverage greater than 40, using the best three alleles and alignment quality value greater than 30, and then filter out the SNPs as candidate variant sites; S2. Count the candidate SNPs of each cell to obtain the genotype type of each cell at the candidate SNP; S3. Convert the sparse matrix into a single-cell genotype matrix, filter, screen and fill the SNPs of each cell in the matrix, and finally encode and construct the single-cell genotype matrix; specifically, filter out the SNPs that are missing in 99% of the cells and the SNP sites that are the same in 80% of the cells, and then according to the degree of missingness of the matrix, calculate the similarity between each cell, select the 20 most similar cells for filling, and obtain the final single-cell genotype matrix; S4. Construct a variational autoencoder model to train and reconstruct the single-cell genotype matrix; S5. Use the trained model to obtain the hidden variables of each cell; S6. Perform unsupervised clustering on the latent variables of each cell to obtain cell clusters equal to the number of samples; specifically, use the tSNE algorithm to reduce the dimension and visualize the obtained latent variable matrix to 2 dimensions, and finally, use the kmeans algorithm to perform clustering to obtain cell clusters equal to the number of samples; S7. According to the clustering results, the genotype ratios of each cell cluster are counted, and then the similarity between each cell and its class is calculated. Cells with a similarity less than 3 times the standard deviation are marked as double cells and deleted. This process is repeated until no new double cells are found. Finally, the cells and double cells of each cell cluster are obtained, completing the splitting of single-cell multi-sample mixed sequencing data.

2. The single-cell multi-sample mixed sequencing splitting method based on self-supervised variational autoencoder according to claim 1, characterized in that: In step S4, the constructed single-cell genotype matrix is ​​used, each cell is used as a training sample, each SNP is used as a training feature, a variational autoencoder model is constructed, and the data is divided into a training set, a validation set, and a test set to perform model training; The variational autoencoder model consists of an encoder, a sampling layer and a decoder. The encoder consists of a convolutional layer and a fully connected layer, and the decoder consists of a deconvolutional layer and a fully connected layer. The encoder converts the input data into the mean and variance of the latent variable space, and passes it to the sampling layer. The sampling layer accepts the mean and variance passed by the encoder, randomly samples in the latent variable space, and obtains latent variables. The decoder accepts the latent variables from the sampling layer and reconstructs the data according to the latent variables. Except for the output layer using the Sigmoid activation function, the other layers use the ELU activation function. The loss function of the model consists of reconstruction loss and regularization loss, namely binary cross entropy and KL divergence, which are used to measure the difference between the original data and the reconstructed data and the difference between the latent variable and the normal distribution respectively. The dimension of the latent variable is set to 4.

3. The single-cell multi-sample mixed sequencing splitting method based on self-supervised variational autoencoder according to claim 1, characterized in that: In step S5, the single-cell genotype matrix is ​​input into the trained model, and the output of the encoder is input into the sampling layer for sampling to obtain the latent variables of each cell.

4. A single-cell multi-sample mixed sequencing splitting system based on self-supervised variational autoencoder, characterized in that: include: The candidate SNP screening module is used to identify all potential variants in the mixed sequencing data, filter the potential variants, retain the SNP sites, and thus screen out candidate SNPs; in the process of identifying variants, first retain the candidate SNV sites with base quality greater than 30, appearing in at least two reads, coverage greater than 40, using the best three alleles and alignment quality values ​​greater than 30, and then filter out the SNPs as candidate variant sites; The SNP genotype statistics module is used to count the genotypes of each cell at the candidate SNP to obtain the genotype type of each cell at the candidate SNP; The single-cell genotype matrix construction module is used to convert the sparse matrix into a single-cell genotype matrix, filter, screen and fill the SNPs of each cell in the matrix; specifically, the SNPs that are missing in 99% of the cells and the SNP sites that are the same in 80% of the cells are filtered out, and then according to the degree of missingness of the matrix, by calculating the similarity between each cell, the 20 most similar cells are selected for filling to obtain the final single-cell genotype matrix; The cell latent variable representation module is used to build a variational autoencoder model to train and reconstruct the single-cell genotype matrix data; and use the trained model to represent the latent variables of each cell; The unsupervised clustering module is used to perform unsupervised clustering on the latent variables of each cell to obtain cell clusters equal to the number of samples. Specifically, the tSNE algorithm is used to reduce the dimension and visualize the latent variable matrix to 2 dimensions. Finally, the kmeans algorithm is used for clustering to obtain cell clusters equal to the number of samples. The identification and splitting module is used to count the genotype ratios of each cell cluster based on the clustering results, and then calculate the similarity between each cell and its class. Cells with a similarity less than 3 times the standard deviation are marked as double cells and deleted. The process is repeated until no new double cells are found. Finally, the cells and double cells of each cell cluster are obtained, completing the splitting of single-cell multi-sample mixed sequencing data.

5. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the single-cell multi-sample mixed sequencing splitting method based on the self-supervised variational autoencoder described in any one of claims 1 to 3 is implemented.

6. A computer device, characterized in that: It comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the single-cell multi-sample mixed sequencing splitting method based on a self-supervised variational autoencoder as described in any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Single cell identification method and device based on graph neural network self-supervised clustering

    CN115798593A

  • Label-free multi-sample mixed single cell sequencing technology based on data splitting of sample genotypes

    CN116230082A