Detection method of coronavirus sample
By using a dynamic learning-based identification model and Bayesian network technology, the problems of model bias and false positives in coronavirus detection were solved, enabling rapid identification and accurate tracing of emerging viruses and generating detailed transmission path reports.
Patent Information
- Application Number
- CN202511269663.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-08
- Publication Date
- 2025-12-19
AI Technical Summary
Existing coronavirus detection technologies suffer from problems such as model bias due to training data not covering emerging or rare viral variants, incomplete detection of variant sites or false positives, misjudgment of mixed infections, and frequency conflicts when multiple lineages coexist.
A dynamic learning-based identification model combined with an incremental learning mechanism is adopted. Through noise-perceived mutation detection and Bayesian network construction, host genetic data is integrated to construct a recombination-perceived Bayesian network, dynamically updating model parameters to identify emerging viruses, reduce false positives, and generate source tracing reports.
It significantly improves the ability to identify emerging viruses, reduces sequencing error interference and false positive results, ensures that key signals are not filtered out, and generates accurate transmission path reports.
Smart Images

Figure CN121171339A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of virus detection technology, and in particular to a method for detecting coronavirus samples. Background Technology
[0002] With the development of neural network technology, high-throughput detection of coronaviruses is gradually beginning to use pre-defined recognition models (such as BERT) to determine the viral lineage. However, the following problems still exist:
[0003] 1. Training data may not cover emerging or rare virus variants, resulting in model bias or data imbalance. For example, if the training dataset is concentrated on known lineages, the accuracy of identifying unknown variant viruses (such as newly emerging viruses) may decrease significantly, and the model may misjudge the lineage, leading to errors in subsequent analysis.
[0004] 2. Mutation site detection is based on comparison with a pre-set viral reference genome. However, the reference genome may be incomplete or outdated. In high-throughput sequencing, the coverage depth of certain genomic regions may be insufficient, which may lead to missed mutations. Moreover, linkage is based on co-occurrence frequency calculation (such as the distribution of the mutation site set in segmented data). However, high-throughput data often contains sequencing noise. If error correction algorithms are not integrated and only simple frequency thresholds are relied upon, false positive linkages may occur (such as random co-occurrences that are not genetically associated).
[0005] 3. When matching mutation sites, it is generally assumed that the expected frequency of each viral lineage can be preset or predicted. However, in reality, the frequency distribution is complex when there is mixed infection or coexistence of multiple lineages. If the difference between the measured frequency of a candidate mutation site and the expected frequency exceeds the threshold, the site is discarded. This may lead to the neglect of important low-frequency mutations (such as drug resistance-related mutations), especially in the scenario of dynamic evolution of viral quasi-species.
[0006] 4. Linkage is inferred solely from co-occurrence frequency (e.g., co-occurrence of variant sites in segmented data), but this ignores the common recombination in viral genetics, which may lead to spurious associations of non-linked sites. The scheme relies on high-frequency variant sites to screen haplotypes, but low-frequency linkages (e.g., <5% frequency) may reflect key evolutionary pathways, but are excluded due to abundance filtering.
[0007] 5. Most existing methods assume that the virus is of a single lineage, but in reality, multiple lineages of viruses may coexist, forming mixed infections or co-infections, leading to misjudgments of mutation site attribution. Summary of the Invention
[0008] To address the problems existing in the prior art, the present invention provides a method for detecting coronavirus samples.
[0009] The technical solution adopted in this invention is:
[0010] A method for detecting coronavirus samples includes the following steps:
[0011] S1. Obtain high-throughput raw sequencing data of the target sample. The raw sequencing data consists of segmented data, and each segmented data represents a short sequence fragment in the nucleic acid sequence of the target sample.
[0012] S2. Input the raw sequencing data into the dynamic learning identification model. The model is trained through an incremental learning mechanism and outputs the lineage to which each virus in the target sample belongs and the confidence level of each lineage.
[0013] S3. Noise-sensing variant detection is performed on the raw sequencing data to determine each variant site and the variant frequency of each variant site contained in the raw sequencing data, as well as the linkage relationship between each variant site. The linkage relationship is used to reflect the genetic pattern of whether some variant sites in each variant site are passed on to the offspring as a whole.
[0014] S4. For each viral lineage, identify the mutation sites that match the preset specific mutation sites corresponding to that viral lineage from each mutation site, and use them as the mutation sites belonging to that viral lineage.
[0015] S5. Based on the reliability of each viral lineage output in step S2 and the variant sites determined in step S4, detect mixed infection indicators. The calculation of mixed infection indicators integrates host genetic data, including the frequency of host single nucleotide polymorphism sites.
[0016] S6. Construct a Bayesian network based on the viral lineage to which each mutation site belongs, the mutation frequency of each mutation site, and the linkage relationship between each mutation site. If the mixed infection indicator exceeds the preset threshold, adjust the Bayesian network construction parameters, determine the genetic relationship between each mutation site through the Bayesian network, and generate viral haplotype sequences based on the genetic relationship.
[0017] S7. Mark mutation sites that meet the criteria of mutation frequency deviating from the historical distribution threshold of the global virus database or linkage confidence level lower than the preset risk threshold as anomalous mutation sites; calculate the genetic distance between anomalous mutation sites and the reference database, infer the transmission path using the maximum likelihood method, and adjust the transmission path inference if the mixed infection indicator exceeds the preset threshold; output a source tracing report, which includes the geographical location of the anomalous mutation source and the transmission timeline.
[0018] Preferably, in step S1, the high-throughput raw sequencing data comes from an Illumina Novaseq 6000 or MGIDNBSEQ-T7 sequencing platform, and the sequencing mode is PE150.
[0019] Preferably, in step S2, the incremental learning mechanism triggers fine-tuning based on the data distribution offset of the original sequencing data. The offset is calculated using KL divergence based on the data distribution of the original sequencing data and the data distribution of the training sequencing data. When the offset exceeds the offset threshold, global abnormal virus variant data is injected to update the model parameters.
[0020] Preferably, in step S3, the noise-aware variation detection uses a convolutional autoencoder to denoise the segmented data, the loss function is constrained by reconstruction error and sparsity, and a hidden Markov model is applied to interpolate low-coverage areas with depth less than the trial threshold.
[0021] Preferably, in step S3, the loss function L is:
[0022] L = ||X noisy -X clean ‖2+λ·KL(q(z|X noisy )‖p(z))
[0023] Among them, X noisy X represents the segmented data sequence after alignment of the original sequencing data. clean For the denoised segmented data sequence, ||X noisy -X clean ||2 is X noisy and X clean The Euclidean distance between them, q(z|X) noisy ) represents the posterior distribution of the input segmented data sequence in the latent variable space, p(z) represents the preset prior distribution of the latent variables, and λ represents the weights of the translation reconstruction error and the distribution constraint.
[0024] Preferably, in step S3, the interpolation process of the Hidden Markov Model integrates recombination rate correction, and the state transition probability formula is:
[0025] P adj (s t |s t-1 )=P(s t |s t-1 )×(1+α·r recomb )
[0026] Among them, P adj (s t |s t-1 ) is the site s t-1 To s t The corrected transition probability, P(s) t |s t-1 ) is the site s t-1 To s t The standard state transition probability, r recomb α is the preset viral recombination rate, and α is the viral type coefficient.
[0027] Preferably, in step S6, during the construction of the Bayesian network, the edge weight W ij The calculation formula is:
[0028]
[0029] Where, d ij β represents the genomic distance between sites i and j, and β is set to 2.0 to enhance the detection sensitivity of abnormal linkage.
[0030] Preferably, in step S7, the genetic distance calculation adopts the Tamura-Nei model, the propagation path inference is combined with spatiotemporal metadata, and the anomaly threshold is set to genetic distance > 0.05 and confidence level < 75%.
[0031] Preferably, in step S5, the mixed infection indicator I m The calculation formula is:
[0032]
[0033] Where N is the number of viral lineages, f k Let be the variation frequency of the k-th spectral lineage. Where γ is the average variation frequency, h is the adjustment coefficient, and h is the mean variation frequency. s This represents the standard deviation of the host single nucleotide polymorphism (SNP) site frequency.
[0034] Preferably, in step S6, adjusting the Bayesian network construction parameters includes the following steps:
[0035] Add hidden nodes to the Bayesian network to represent host-virus interactions;
[0036] In step S7, adjusting the propagation path inference includes the following steps:
[0037] In propagation path inference, the host genetic distance is integrated into the likelihood function of the maximum likelihood method, and the likelihood function is updated as follows:
[0038] L new =L original ×exp(-θ·D h )
[0039] Among them, L original Let D be the original maximum likelihood function. h θ represents the primary genetic distance, and θ is the weighting factor.
[0040] The beneficial effects of this invention are:
[0041] 1. Employing a dynamic learning-based identification model enables the system to quickly adapt to emerging viruses. Through incremental learning, the entire network can be trained without retraining, significantly shortening the response cycle and ensuring continuous optimization of the identification capability for new variants.
[0042] 2. By using noise-sensing variant detection technology, the problem of sensitivity to sequencing noise is effectively solved, sequencing error interference is significantly reduced, and the accuracy of variant site detection is improved;
[0043] 3. By dynamically updating and retaining low-frequency but significant variant sites, key signals are ensured not to be filtered out;
[0044] 4. A recombination-aware Bayesian network was constructed. This network integrates viral recombination rate parameters and genomic distance decay coefficients to accurately quantify the genetic linkage strength between variant sites, effectively distinguishing between real genetic associations and random noise, and significantly reducing false positive results.
[0045] 5. By calculating the genetic distance between the virus sequence and the global database, and combining it with the sample's spatiotemporal metadata (such as geographical location and sampling time), a transmission path report can be generated;
[0046] 6. By quantifying mixed infection indicators, the frequency conflict problem in the coexistence of multiple lineages can be solved, the misjudgment of the mutation site can be avoided, the host genetic data can be incorporated into the propagation path inference, the biological rationality of the path can be enhanced, and the false positive rate can be reduced by dynamically adjusting parameters (such as hidden nodes in Bayesian networks), which is especially suitable for samples in complex environments. Attached Figure Description
[0047] Figure 1 This is a schematic diagram of the method flow in an embodiment of the present invention. Detailed Implementation
[0048] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0049] Example
[0050] S1. Obtain high-throughput raw sequencing data of the target sample. The raw sequencing data consists of segmented data, each segment representing a short sequence fragment in the nucleic acid sequence of the target sample.
[0051] High-throughput raw sequencing data were obtained from Illumina Novaseq 6000 or MGIDNBSEQ-T7 sequencing platforms, with the sequencing mode being PE150.
[0052] S2. Input the raw sequencing data into the dynamic learning identification model. The model is trained through an incremental learning mechanism and outputs the viral lineage to which each virus in the target sample belongs and the confidence level of each lineage.
[0053] The incremental learning mechanism triggers fine-tuning based on the data distribution offset of the original sequencing data. The offset is calculated using KL divergence based on the data distribution of the original sequencing data and the data distribution of the training sequencing data. KL (P new ||P old ), where P new P represents the data distribution of the raw sequencing data. old For training the sequencing data distribution, when the offset D KL When the value is greater than 0.3, inject global abnormal virus variant data (such as the GISAID database) to update the model parameters.
[0054] S3. Noise-sensing variant detection is performed on the raw sequencing data to determine each variant site and its frequency, as well as the linkage relationship between them. The linkage relationship reflects whether some variant sites in each variant site are passed on as a whole to the offspring in a genetic pattern.
[0055] Noise-aware variation detection uses a convolutional autoencoder to denoise segmented data. The loss function is constrained by reconstruction error and sparsity. Hidden Markov models are applied to interpolate low-coverage regions with depths less than the trial threshold.
[0056] The loss function L is:
[0057] L = ||X noisy -X clean ‖2+λ·KL(q(z|X noisy )‖p(z))
[0058] Among them, X noisy X represents the segmented data sequence after alignment of the original sequencing data. clean For the denoised segmented data sequence, ||X noisy -X clean ||2 is X noisy and X clean The Euclidean distance between them, q(z|X) noisy ) represents the posterior distribution of the input segmented data sequence in the latent variable space, p(z) represents the preset prior distribution of the latent variables, and λ represents the weights of the translation reconstruction error and the distribution constraint.
[0059] The interpolation process of a Hidden Markov Model integrates recombination rate correction, and the state transition probability formula is as follows:
[0060] P adj (s t |s t-1 )=P(s t |s t-1 )×(1+α·r recomb )
[0061] Among them, P adj (s t |s t-1 ) is the site s t-1 To s t The corrected transition probability, P(s) t |s t-1 ) is the site s t-1 To s t The standard state transition probability, r recomb The preset viral recombination rate is α, where α is the viral type coefficient (0.8 for RNA viruses).
[0062] S4. For each viral lineage, identify the mutation sites that match the preset specific mutation sites corresponding to that viral lineage from each mutation site, and use them as the mutation sites belonging to that viral lineage.
[0063] Specific variant sites are obtained from a dynamically updated global database of anomalous sites, which is synchronized every 48 hours to include emerging anomalous variant data.
[0064] S5. Based on the confidence levels of each viral lineage output in step S2 and the variant sites identified in step S4, detect mixed infection indicators. The calculation of mixed infection indicators integrates host genetic data, including the frequency of host single nucleotide polymorphism sites; Mixed infection indicator I m The calculation formula is:
[0065]
[0066] Where N is the number of viral lineages, f k Let be the variation frequency of the k-th spectral lineage. Where γ is the average variation frequency, h is the adjustment coefficient, and h is the mean variation frequency. s The standard deviation of the host single nucleotide polymorphism site frequency can be calibrated using databases such as the 1000 Genomes Project.
[0067] If the mixed infection indicator exceeds the preset threshold, when I m If the value is greater than 0.2, it is determined to be a mixed infection. Then, the Bayesian network construction parameters in step S6 and the propagation path inference in step S7 are adjusted to generate a corrected source tracing report.
[0068] S6. Construct a Bayesian network based on the viral lineage to which each mutation site belongs, the mutation frequency of each mutation site, and the linkage relationship between each mutation site. If the mixed infection indicator exceeds the preset threshold, adjust the Bayesian network construction parameters and add hidden nodes to the Bayesian network to represent host-virus interactions, such as the effect of ACE2 receptor genotype on coronavirus Spike protein mutations. Recalculate the edge weights. Use the Bayesian network to determine the genetic relationship between each mutation site and generate viral haplotype sequences based on the genetic relationship.
[0069] In the construction of a Bayesian network, the edge weight W ij The calculation formula is:
[0070]
[0071] Where, d ij β represents the genomic distance between sites i and j, and β is set to 2.0 to enhance the detection sensitivity of abnormal linkage.
[0072] S7. Mark mutation sites that meet the criteria of mutation frequency deviating from the historical distribution threshold of the global virus database or linkage confidence level below the preset risk threshold as anomalous mutation sites; calculate the genetic distance between anomalous mutation sites and the reference database. The genetic distance calculation uses the Tamura-Nei model. The transmission path inference is combined with spatiotemporal metadata. The anomalous threshold is set to genetic distance > 0.05 and confidence level < 75%. The transmission path is inferred using the maximum likelihood method. If the mixed infection indicator exceeds the preset threshold, the transmission path inference is adjusted. In the transmission path inference, the host genetic distance (calculated using Nei distance) is integrated into the likelihood function of the maximum likelihood method. The likelihood function is updated as follows:
[0073] L new =L original ×exp(-θ·D h )
[0074] Among them, L original Let D be the original maximum likelihood function. h The dominant genetic distance is given by θ, which is a weighting factor of 0.1.
[0075] Output a source tracing report, which includes the geographical location of the source of the abnormal mutation and the timeline of its spread.
[0076] Using the above method for anomaly identification and tracing in high-throughput coronavirus detection has the following advantages:
[0077] 1. Improved model dynamism
[0078] A dynamic learning-based identification model is introduced, which automatically triggers an incremental learning mechanism by monitoring data distribution shifts in real time (e.g., when KL divergence > 0.3). This mechanism only fine-tunes the parameters of the fully connected layers, injecting new global variant data (e.g., the XBB.1.5 sequence from the GISAID database) while preserving historical knowledge. This design enables the system to adapt to virus evolution; for example, when unknown mutations appear in sewage samples, the model can be quickly updated, improving the accuracy of identifying emerging variants and avoiding the waste of computational resources caused by traditional retraining.
[0079] 2. Enhanced data reliability
[0080] Design a dual-track error correction mechanism:
[0081] Convolutional autoencoders: learn noise distribution characteristics through an encoder-decoder structure to separate the real signal from sequencing errors (such as base substitution errors in the Illumina platform) in the latent variable space.
[0082] Recombination-corrected HMM: Integrating the recombination rate parameter (r) into a Hidden Markov Model to target viral genome recombination characteristics. recomb ), optimize the state transition probability in low-coverage areas.
[0083] 3. Low-frequency signal integrity protection
[0084] A dynamic abnormal site database is constructed, synchronizing global emerging variant data (such as Spike:K444T resistance site) every 48 hours, and intelligent retention rules are set:
[0085] Variations located in functionally conserved regions (such as polymerase coding regions) are still marked as key sites even if their frequency is below a threshold;
[0086] Low-frequency variants that are strongly linked to known resistance / virulence sites (confidence >85%) were included in the analysis.
[0087] 4. In-depth optimization of genetic analysis
[0088] Integrating two types of key parameters in a Bayesian network:
[0089] Recombination rate r recomb : Quantify site association strength based on historical recombination hotspot data (such as the coronavirus S protein region);
[0090] Distance attenuation coefficient β: through genomic distance d ij Reduce random co-occurrence interference at distant sites.
[0091] This design reduces the false positive rate of genetic linkages and precisely locates cross-lineage co-evolutionary modules (such as Spike-RdRp linkage blocks) in Delta-Omicron recombinant analysis.
[0092] Finally, the genetic distance is calculated using the Tamura-Nei model, and the propagation network is constructed by combining the spatiotemporal metadata of the samples (sampling location / time). Based on this, a source tracing report containing a propagation path map and timeline can be further generated.
[0093] 5. Improved capacity for handling mixed infections
[0094] By quantifying mixed infection indicators, the frequency conflict problem in the coexistence of multiple lineages can be resolved, and misjudgment of the mutation site attribution can be avoided.
[0095] 6. Host Factor Integration
[0096] Incorporating host genetic data into transmission pathway inference enhances the biological plausibility of the pathways. For example, host ACE2 receptor mutations affect viral entry efficiency, and the corrected transmission timeline better aligns with epidemiological investigations.
[0097] 7. Enhanced overall robustness
[0098] As a post-processing step, S7 does not interfere with the core process of S1-S6, but reduces the false positive rate by dynamically adjusting parameters (such as hiding nodes in a Bayesian network), making it particularly suitable for samples in complex environments.
[0099] The embodiments described above are merely illustrative of specific implementations of the present invention, and while the descriptions are detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention.
Claims
1. A method for detecting coronavirus samples, characterized in that, Includes the following steps: S1. Obtain high-throughput raw sequencing data of the target sample. The raw sequencing data consists of segmented data, and each segmented data represents a short sequence fragment in the nucleic acid sequence of the target sample. S2. Input the raw sequencing data into the dynamic learning identification model. The model is trained through an incremental learning mechanism and outputs the viral lineage to which each virus in the target sample belongs and the confidence level of each lineage. S3. Noise-sensing variant detection is performed on the raw sequencing data to determine each variant site and the variant frequency of each variant site contained in the raw sequencing data, as well as the linkage relationship between each variant site. The linkage relationship is used to reflect the genetic pattern of whether some variant sites in each variant site are passed on to the offspring as a whole. S4. For each viral lineage, identify the mutation sites that match the preset specific mutation sites corresponding to that viral lineage from each mutation site, and use them as the mutation sites belonging to that viral lineage. S5. Based on the reliability of each viral lineage output in step S2 and the variant sites determined in step S4, detect mixed infection indicators. The calculation of mixed infection indicators integrates host genetic data, including the frequency of host single nucleotide polymorphism sites. S6. Construct a Bayesian network based on the viral lineage to which each mutation site belongs, the mutation frequency of each mutation site, and the linkage relationship between each mutation site. If the mixed infection indicator exceeds the preset threshold, adjust the Bayesian network construction parameters, determine the genetic relationship between each mutation site through the Bayesian network, and generate viral haplotype sequences based on the genetic relationship. S7. Mark mutation sites that meet the criteria of mutation frequency deviating from the historical distribution threshold of the global virus database or linkage confidence level lower than the preset risk threshold as anomalous mutation sites; calculate the genetic distance between anomalous mutation sites and the reference database, infer the transmission path using the maximum likelihood method, and adjust the transmission path inference if the mixed infection indicator exceeds the preset threshold; output a source tracing report, which includes the geographical location of the anomalous mutation source and the transmission timeline.
2. The method for detecting coronavirus samples according to claim 1, characterized in that, In step S1, the high-throughput raw sequencing data comes from the Illumina Novaseq 6000 or MGIDNBSEQ-T7 sequencing platform, and the sequencing mode is PE150.
3. The method for detecting coronavirus samples according to claim 2, characterized in that, In step S2, the incremental learning mechanism triggers fine-tuning based on the data distribution offset of the original sequencing data. The offset is calculated using KL divergence based on the data distribution of the original sequencing data and the data distribution of the training sequencing data. When the offset exceeds the offset threshold, global abnormal virus variant data is injected to update the model parameters.
4. The method for detecting coronavirus samples according to claim 3, characterized in that, In step S3, noise-aware variation detection uses a convolutional autoencoder to denoise the segmented data. The loss function is constrained by reconstruction error and sparsity. Hidden Markov models are applied to interpolate low-coverage regions with depths less than the trial threshold.
5. The method for detecting coronavirus samples according to claim 4, characterized in that, In step S3, the loss function L is: L=‖X noisy -X clean ‖2+λ·KL(q(z|X noisy )‖p(z)) Among them, X noisy X represents the segmented data sequence after alignment of the original sequencing data. clean For the denoised segmented data sequence, ||X noisy -X clean ||2 is X noisy and X clean The Euclidean distance between them, q(z|X) noisy ) represents the posterior distribution of the input segmented data sequence in the latent variable space, p(z) represents the preset prior distribution of the latent variables, and λ represents the weights of the translation reconstruction error and the distribution constraint.
6. The method for detecting coronavirus samples according to claim 5, characterized in that, In step S3, the interpolation process of the Hidden Markov Model integrates the recombination rate correction, and the state transition probability formula is: P adj (s t |s t-1 )=P(s t |s t-1 )×(1+α·r recomb ) Among them, P adj (s t |s t-1 ) is the site s t-1 To s t The corrected transition probability, P(s) t |s t-1 ) is the site s t-1 To s t The standard state transition probability, r recomb α is the preset viral recombination rate, and α is the viral type coefficient.
7. The method for detecting coronavirus samples according to claim 6, characterized in that, In step S6, during the construction of the Bayesian network, the edge weights W ij The calculation formula is: Where, d ij β represents the genomic distance between sites i and j, and β is set to 2.0 to enhance the detection sensitivity of abnormal linkage.
8. The method for detecting coronavirus samples according to claim 7, characterized in that, In step S7, the genetic distance is calculated using the Tamura-Nei model, and the propagation path inference is combined with spatiotemporal metadata. The anomaly threshold is set to genetic distance > 0.05 and confidence level < 75%.
9. The method for detecting coronavirus samples according to claim 1, characterized in that, In step S5, the mixed infection indicator I m The calculation formula is: Where N is the number of viral lineages, f k Let be the variation frequency of the k-th spectral lineage. Where γ is the average variation frequency, h is the adjustment coefficient, and h is the mean variation frequency. s This represents the standard deviation of the host single nucleotide polymorphism (SNP) site frequency.
10. The method for detecting coronavirus samples according to claim 9, characterized in that, In step S6, adjusting the Bayesian network construction parameters includes the following steps: Add hidden nodes to the Bayesian network to represent host-virus interactions; In step S7, adjusting the propagation path inference includes the following steps: In propagation path inference, the host genetic distance is integrated into the likelihood function of the maximum likelihood method, and the likelihood function is updated as follows: L new =L original ×exp(-θ·D h ) Among them, L original Let D be the original maximum likelihood function. h θ represents the primary genetic distance, and θ is the weighting factor.
Citation Information
Cited By
Method and system for inferring chicken gene-pathogen interaction network by using graph neural network
CN122024837A
