A method and system for detecting mutations and recombination during RNA virus growth.
By constructing a viral mutation database and performing sequence-level and alignment-level deduplication, and setting clear site quality thresholds and coverage depth standards, the problems of unstable and incomparable results in RNA virus recombination analysis were solved, and the stability and consistency of detection results were achieved.
Patent Information
- Application Number
- CN202611353400.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-02
- Publication Date
- 2026-11-17
AI Technical Summary
Existing technologies lack clear data preprocessing, repetitive sequence control, low-frequency candidate site quality criteria, and inter-sample deep standardization in RNA virus recombination analysis, resulting in unstable and incomparable results, especially in the analysis of variants with allele frequencies below 1%, which are difficult to reproduce.
By constructing a viral mutation database, performing sequence-level and alignment-level deduplication, setting clear site quality thresholds and coverage depth standards, and using synchronous sampling and recombination frequency calculation methods, the impact of non-target reads and duplicate reads is reduced, thereby improving the reproducibility and comparability of detection results.
It achieves stability and comparability of RNA virus mutation and recombination detection results, reduces the impact of duplicate reads on detection, and improves the consistency of detection between different samples and batches.
Abstract
Description
Technical Field
[0001] This invention relates to the fields of bioinformatics and viral genomics, specifically to a method and system for detecting mutations and recombination during the growth of RNA viruses. Background Technology
[0002] RNA viruses, due to the lack of proofreading function in their RNA-dependent RNA polymerases, exhibit a high mutation rate during replication, resulting in numerous variations during proliferation within the host. Simultaneously, RNA virus genomes can exchange genetic material through recombination mechanisms, leading to alterations in genome structure. Mutation and recombination are the primary driving forces of RNA virus evolution, directly influencing viral pathogenicity, transmissibility, and antigenic characteristics. Therefore, accurate detection of mutation and recombination events during RNA virus replication is crucial for virus surveillance, vaccine development, and antiviral drug design.
[0003] With the development of high-throughput sequencing technology, deep sequencing-based methods for viral mutation and recombination analysis have gradually become mainstream. Some existing analytical workflows can identify mutations or recombination events based on the alignment of sequencing reads with the viral reference genome. However, without clear data preprocessing, repetitive sequence control, quality criteria for low-frequency candidate sites, and depth standardization between samples, different software or batches of data are prone to generating additional candidate signals or result fluctuations due to host sequence contamination, PCR duplication, low-quality bases, and differences in coverage depth. Especially in mutation analysis with allele frequencies below 1%, if candidate sites are determined solely by a small number of supporting reads without simultaneously restricting site depth, base quality, alignment quality, and strand direction support, technicians find it difficult to reliably reproduce experimental results. In recombination analysis, if recombination breakpoints are calculated directly for different samples with different coverage depths, the number of detected samples lacks direct comparability.
[0004] Existing research has used ViReMa to identify recombination breakpoints in RNA virus recombination analysis, employed samtoolsdepth to calculate coverage depth, and used seqkit to process different samples to approximate coverage levels before comparing breakpoint distributions. While these publications provide principles for comparing approximate equal coverage, they do not explicitly outline a closed-loop process: restoring paired-end FASTQs using deduplicated BAMs, synchronous sampling with the same random seed, re-aligning, and iteratively correcting to a preset deviation range based on measured coverage depth. Furthermore, they do not clearly specify a method for merging paired-end reads with renamed, unspliced R1 / R2 reads into a unified single-end FASTQ before performing recombination breakpoint analysis.
[0005] Therefore, it is necessary to establish a data closed loop that includes host removal, sequence-level PCR duplication control, read-level quality filtering, viral reference alignment, alignment-level PCR duplication deletion, low-frequency candidate site filtering, BAM and paired-end FASTQ conversion, synchronous flattening, and recombination breakpoint statistics. The input format, output format, threshold, and calculation formula for each step should be clearly defined so that technicians in the relevant technical field can repeat the process on different RNA virus samples. Summary of the Invention
[0006] To address the problems of host sequence contamination, PCR duplication, low-quality reads, inconsistent criteria for ultra-low frequency candidate sites, and inconsistent coverage depth among different samples in RNA virus sequencing analysis, this invention aims to provide a method and system for detecting mutations and recombination during RNA virus growth. By clarifying the data format, actual deduplication method, site quality threshold, synchronization leveling rules, and recombination frequency calculation method for each step, the impact of non-target reads and duplicate reads on subsequent calculations is reduced, improving the reproducibility and comparability of detection results for different samples or batches, and reducing the subsequent computational load for samples with a high host proportion.
[0007] To achieve the above objectives, the technical solution adopted by the present invention is: a method for detecting mutations and recombination during the growth of RNA viruses, comprising the following steps: S1: Constructing a viral mutation database: Obtain multiple whole genome sequences of the target RNA virus, remove sequences with integrity below 95%, N base ratio above 1%, and completely repetitive sequences, and select a reference genome; perform whole genome alignment of the remaining valid genomes with the reference genome, uniformly coordinate base substitutions, insertions, and deletions, calculate the mutation frequency with the number of valid genomes with identifiable bases at the corresponding sites as the denominator and the number of valid genomes with the corresponding mutations as the numerator, and form a viral mutation database containing reference coordinates, reference bases, mutated bases or insertions / deletions, number of supporting genomes, number of identifiable genomes, and mutation frequency.
[0008] S2: Obtaining valid viral data: Align the original paired-end reads of viral sequencing with the host reference genome, retaining read pairs whose R1 and R2 ends are not aligned to the host reference genome, thus obtaining host-removed paired-end data; using the identical R1 and R2 sequences of a pair of paired-end reads as the sequence-level PCR repeat criterion, retain only one pair, thus obtaining pre-deduplication data; perform quality filtering on the pre-deduplication data, retaining reads with 0 N bases, an average Phred quality value of not less than Q30, and a length of not less than 50 bp, thus obtaining valid viral data.
[0009] S3: Viral Mutation Analysis: The effective viral data is compared with the reference genome to obtain a BAM format alignment file; PCR duplicates are identified according to the paired-end read alignment coordinates and duplicate reads are actually deleted to obtain a deduplicated BAM file; based on the deduplicated BAM file, homogeneous sequences and high-frequency mutation information are obtained, and low-frequency mutation candidate sites with allele frequencies below 1% are called; for candidate sites, only bases with a base quality value of not less than Q30 and an alignment quality value of not less than 30 are counted, wherein the effective coverage depth of candidate sites is not less than 500X; for candidate sites with supporting records in the viral mutation database, the number of supporting reads for the mutation is not less than 2 and both forward and reverse reads are supported; for candidate sites without supporting records in the database, the number of supporting reads for the mutation is not less than 3, the mutation frequency is not less than 0.2%, and both forward and reverse reads are supported, to obtain viral mutation information.
[0010] S4: Data leveling: Calculate the average coverage depth and base coverage of the deduplicated BAM file, convert the deduplicated BAM into R1 and R2 paired-end FASTQs that maintain the paired correspondence of read names; set a target coverage depth no higher than the original average coverage depth, determine the initial sampling ratio according to the ratio of the target coverage depth to the original average coverage depth, use the same random seed and sample R1 and R2 synchronously according to read names; re-align the sampled data to the reference genome and calculate the actual average coverage depth. When the relative deviation between the actual average coverage depth and the target coverage depth is greater than 2%, adjust the sampling ratio according to the ratio of the target depth to the actual depth, and re-synchronize sampling from the same R1 and R2 paired-end FASTQs in each round, with a maximum of 5 rounds of correction, and take the first paired-end data with a relative deviation of no more than 2% as the data with a unified effective depth.
[0011] S5: Viral Recombination Analysis: The paired-end data of uniform effective depth are spliced together with a minimum overlap length of 10 bp. Successfully spliced reads are treated as single continuous sequences, and unsuccessfully spliced R1 and R2 are treated as single-end sequences. After renaming them with end identifiers appended to the original read names, they are merged with the successfully spliced reads into a single-end FASTQ dataset. The single-end FASTQ dataset is compared with the viral reference genome for recombination breakpoint analysis. The results are merged according to the breakpoint coordinates and directions and deduplicated according to the unique read identifier. Only recombination events supported by at least two unique reads and with valid alignment sequences on both sides of the breakpoint are retained. The recombination frequency of the recombination breakpoint is calculated by dividing the number of unique reads supporting a specific recombination breakpoint by the total number of single-end unique reads entering the recombination analysis, thus obtaining the viral recombination information.
[0012] Furthermore, in step S1, the target viral genome is obtained from the NCBI database or RefSeq database, and the list of sequence accession numbers used and the database download date are saved; whole genome multiple sequence alignment is performed using MAFFT; based on the alignment results, a Python script is used to count base substitutions, insertions and deletions according to the reference genome coordinates, and after normalizing the insertions and deletions, the number of supporting genomes and the number of identifiable genomes are counted.
[0013] Furthermore, in step S2, bowtie2 is used to align the original paired-end reads with the host reference genome and output the alignment file. Then, read pairs with both ends of R1 and R2 in an unaligned state are selected and secondary and supplementary alignments are excluded. When the target host reference genome is missing, the genome of a species of the same genus that is most closely related to the target host and has a publicly available reference genome is used, and the alternative genome is noted in the analysis record.
[0014] Furthermore, in step S2, sequence-level PCR repeat removal is performed using FastUniq; quality filtering is performed using FastP, with the N base allowance set to 0, the average Phred quality threshold for reads set to Q30-Q40, and the shortest read length set to 50bp. The results of the number and quality statistics of reads before and after filtering are then output.
[0015] Furthermore, in step S3, bwa mem is used to align the valid viral data with the reference genome; samtools is used to sort read names, correct fixmate end pairing information, and sort coordinates in sequence, and then samtools markdup -r is used to actually delete PCR repeats; snippy is used to obtain consistent sequences and high-frequency variants with an allele frequency of not less than 50%, and LoFreq is used to call low-frequency variant candidate sites with an allele frequency of less than 1%.
[0016] Furthermore, in step S3, samtools mpileup is used to obtain the reference base, the count of each substitution base, the base quality, and the alignment quality for each site; the allele frequency of the ultra-low frequency candidate site is the ratio of the number of mutation-supporting reads to the total number of valid reads that meet the quality conditions for that site; candidate sites with supporting records in the database meet the following requirements: effective depth not less than 500X, number of mutation-supporting reads not less than 2, and support from both forward and reverse reads; candidate sites without supporting records in the database further meet the following requirements: number of mutation-supporting reads not less than 3 and allele frequency not less than 0.2%.
[0017] Furthermore, in steps S3 and S4, the average coverage depth D is calculated by dividing the sum of the depths of all statistically significant sites in the reference genome by the length of the reference genome, and the base coverage rate is calculated by dividing the number of reference genome sites with a coverage depth of not less than 1X by the length of the reference genome; the average coverage depth of the samples used for ultra-low frequency variant analysis is not less than 500X and the base coverage rate is not less than 95%.
[0018] Further, in step S4, the deduplicated BAM is converted into synchronized R1 and R2 double-ended FASTQ using samtools fastq, maintaining the pairing relationship according to the read name; random sampling is performed using seqkit sample according to the sampling ratio, with R1 and R2 using the same random seed; in each round, sampling is resynchronized from the same input double-ended FASTQ, the actual average coverage depth is re-compared and calculated, and the sampling ratio for the next round is adjusted according to p(n+1)=p(n)×Dtarget / Dmeasured, until |Dmeasured-Dtarget| / Dtarget is no greater than 2% or 5 rounds are reached.
[0019] A detection system for detecting mutations and recombination during the growth of RNA viruses, comprising: The database construction module is used to screen target RNA virus genomes in public databases for integrity, N base ratio, and repetitive sequences. It completes reference genome alignment, mutation coordinate normalization, and statistics on the number of supporting genomes, the number of identifiable genomes, and mutation frequencies to build a viral mutation database.
[0020] The data preprocessing module is used to align the raw paired-end reads with the host reference genome, extract read pairs that are not aligned to the host reference genome at both ends, perform sequence-level PCR duplicate removal and read-level quality filtering to obtain valid viral data.
[0021] The mutation analysis module is used to compare the effective viral data with the viral reference genome, actually delete the alignment-level PCR repeats, and filter low-frequency mutation candidate sites based on the effective site depth, base quality, alignment quality, number of mutation-supporting reads, chain direction support, and the viral mutation database to obtain viral mutation information.
[0022] The data leveling module is used to convert the deduplicated BAM into a double-ended FASTQ that maintains the matching relationship of read names. It synchronously and randomly samples R1 and R2 according to the target coverage depth, and obtains unified effective depth data with a relative deviation of no more than 2% through re-comparison and coverage depth correction.
[0023] The reassembly analysis module is used to stitch together two-end reads of unified and valid depth data. After merging the successfully stitched reads with the renamed unstitched R1 / R2 into a unified single-end FASTQ, it performs reassembly breakpoint analysis, and merges and removes duplicates according to the breakpoint coordinates, direction and unique read identifier. It also filters reassembly events based on the number of unique reads and calculates the reassembly frequency.
[0024] Furthermore, the data preprocessing module uses bowtie2 and samtools to complete host alignment and extract unaligned paired-end reads, uses FastUniq for sequence-level PCR repeat removal, and uses fastp to filter reads based on an N base count of 0, an average Phred quality value of at least Q30, and a length of at least 50 bp. The mutation analysis module uses bwa mem for viral reference alignment, uses samtools markdup to delete alignment-level PCR repeats, uses snippy and LoFreq to obtain high-frequency and low-frequency mutation candidate sites, and uses samtools mpileup to obtain site base counts. The data leveling module uses samtools fastq and seqkit sample to complete simultaneous paired-end sampling. The recombination analysis module uses FLASH to complete paired-end read splicing, merges successfully spliced reads with renamed unspliced R1 / R2 reads into a unified single-end FASTQ, and uses ViReMa to calculate recombination breakpoints on the unified single-end FASTQ.
[0025] Compared with the prior art, the beneficial effects of the present invention are: (1) In this invention, sequence-level PCR duplicate removal is performed in the preprocessing stage, and alignment-level PCR duplicate deletion is performed after viral reference alignment. The former reduces identical paired-end sequences before alignment, while the latter identifies and removes residual duplicate reads based on alignment position and deletion mode. The criteria and execution stages of the two-level deduplication are different. Duplicate reads generated during PCR amplification and sequencing will increase the apparent coverage depth without increasing independent molecular information. Therefore, the two-level actual deduplication can reduce the duplicate count of duplicate reads on site depth, mutation support number and recombination breakpoint support number, and at the same time reduce the amount of data entering subsequent calculations.
[0026] (2) This invention simultaneously limits the effective coverage depth, base quality, alignment quality, number of mutation-supporting reads, and chain direction support for candidate sites with an allele frequency of less than 1%, and uses a viral mutation database as a priori support condition. Different minimum support conditions are used for candidate sites with and without records in the database, making the determination rules for candidate sites clear and repeatable, and reducing the situation where candidate signals are formed based on a single or a small number of low-quality reads.
[0027] (3) This invention uses the BAM after two-stage deduplication as the effective depth benchmark, without substituting the original sequencing volume or nominal sampling ratio for the effective depth; then the deduplicated BAM is explicitly converted into paired-end FASTQ that maintains the pairing relationship, and R1 / R2 are sampled simultaneously according to the target coverage depth, and the relative deviation is iteratively corrected to no more than 2% by re-aligning the measured depth. Thus, each dataset entering recombination analysis corresponds to a specific set of reads and actual coverage depth, avoiding the problem of not being able to determine the final input data by "averaging multiple sets of reads", and improving the comparability of results between different samples.
[0028] (4) In this invention, the original reads are first aligned with the host reference genome, and only read pairs whose R1 and R2 ends are not aligned to the host reference genome are retained, thus clarifying the host removal criterion from the data source. For samples with a high proportion of host sequences, the amount of data entering the viral reference alignment, mutation call and recombination calculation can be reduced; for samples with a low proportion of host sequences, this step can still form a unified input standard.
[0029] (5) This invention first uses FLASH to splice the paired-end reads. The splicing process can eliminate the repeated base count in the R1 / R2 overlapping region and extend the length of a single sequence. Then, the unspliced R1 / R2 are renamed according to their ends and merged with the successfully spliced reads into a unified single-end FASTQ, which serves as the unified input for ViReMa. This processing reduces the impact of different library-built insertion fragment lengths and paired-end overlap on breakpoint statistics, and is beneficial for identifying recombination breakpoints using longer continuous sequences. At the same time, it uses a unique read support number and a clear formula to calculate the recombination frequency. Detailed Implementation
[0030] The following will provide a clear and complete description of the technical solutions of this invention. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0031] Example 1 In this embodiment, SARS-CoV-2 was used as the detection target. The sequencing data was obtained by probe capture sequencing method, with a data volume of 19.00 Gb and a host sequence ratio of 4.18%.
[0032] S1: Constructing a viral mutation database: 12,000 valid whole-genome sequences of SARS-CoV-2 were downloaded from the NCBI database and screened. The screening criteria were sequence integrity of no less than 95%, N base ratio of no more than 1%, and only one identical repetitive sequence was retained. A genome with complete sequences and clear annotation (GenBank accession number MN908947.3) was selected as the reference genome, with a genome length of 29903 bp. Whole-genome multiple sequence alignment was performed on the reference genome and the remaining valid genomes using MAFFT 7.526 in --auto mode. Based on the MAFFT alignment results, a Python script was used to extract and label base substitutions, insertions, and deletions according to the reference genome coordinates, and insertions and deletions were normalized. For each site in the reference genome, the number of valid genomes with a clearly definable state, n_determinable, was used as the denominator, and the number of valid genomes with the same mutation direction, n_mutation, was used as the numerator. The mutation frequency was calculated using f = n_mutation / n_determinable. The reference coordinates, reference bases, mutated bases or insertions / deletions, n_mutation, n_determinable, and f were recorded to obtain the SARS-CoV-2 virus mutation database. The sequence accession number list used in this embodiment and the database download date were saved together with the analysis results to ensure the traceability of the database snapshot.
[0033] S2: Obtaining Valid Virus Data: The 19.00 Gb raw paired-end sequencing data underwent host removal processing. Bowtie2 was used to align R1 and R2 with the human GRCh38 reference genome, using a very-sensitive preset and outputting SAM / BAM. Subsequently, samtools was used to filter read pairs where both ends of R1 and R2 were unaligned, excluding secondary and supplementary alignments. The filtering results were converted into host-removed R1 / R2 FASTQ data with one-to-one read name correspondence. FastUniq was used to perform sequence-level PCR repeat removal on the host-removed paired-end data. When the R1 and R2 sequences of two paired-end reads were completely identical, only one pair was retained. FastP was used for read-level quality filtering, setting the N-base allowance to 0, the average Phred quality threshold to Q30, and the shortest read length to 50 bp. After filtering, the readname correspondence of R1 / R2 was checked again to obtain valid paired-end FASTQ data for SARS-CoV-2 virus.
[0034] S3: Viral Mutation Analysis: The effective paired-end FASTQ sequences of the SARS-CoV-2 virus were aligned with the reference genome (MN908947.3) using bwa mem, resulting in a BAM format alignment file. Samtools was used to sequentially sort the BAM files by read name, correct for fixed-end pairing information, and sort by coordinates. Then, samtools markdup -r was used to remove alignment-level PCR repeats, resulting in a deduplicated BAM file. Samtools depth was used to output the coverage depth site-by-site. The average coverage depth was calculated as D = Σd_i / L, where d_i is the depth of the i-th reference site and L is the length of the reference genome. Base coverage was calculated as C = N(d_i≥1) / L × 100%. In this example, the average coverage depth was 2,850X, and the base coverage was 98.7%.
[0035] Snippy was used to obtain consistent sequences and high-frequency variant information with an allele frequency of at least 50% based on deduplication BAM; LoFreq was used to retrieve candidate sites for low-frequency variants with an allele frequency of less than 1%. The samtools mpileup was used to obtain the base counts of candidate sites, counting only bases with a quality value of at least Q30 and an alignment quality value of at least 30. The effective depth of candidate sites was required to be at least 500X. For candidate sites with records of the same reference coordinates and mutation direction in the SARS-CoV-2 virus mutation database, the number of supporting reads for the mutation was required to be at least 2, with support from both forward and reverse reads; for candidate sites without supporting records in the database, the number of supporting reads for the mutation was required to be at least 3, with an allele frequency of at least 0.2%, and support from both forward and reverse reads. Candidate sites meeting these conditions constituted SARS-CoV-2 virus variant information; each site output its reference coordinates, reference base, mutated base, effective depth, number of supporting reads for the mutation, allele frequency, number of forward and reverse support reads, and database support status.
[0036] S4: Data leveling: The average coverage depth of the deduplicated BAM is 2,850X, with a base coverage rate of 98.7%. The target coverage depth Dt is set to 2000X. Using samtools fastq, the deduplicated BAM is converted to R1 / R2 FASTQ with read names maintaining pairwise correspondence. The number of reads and the order of read names in the two files are checked to be consistent. The initial sampling ratio is calculated as p0 = Dt / D0; in this example, p0 = 2000 / 2850 = 0.7018. Simultaneous sampling is performed on R1 and R2 using the same random seed using seqkit sample; the sampling results are re-aligned to the viral reference genome, and the average coverage depth Dn is recalculated. If |Dn-Dt| / Dt>2%, then the sampling ratio is adjusted according to p(n+1)=p(n)×Dt / Dn, and sampling is re-done synchronously from the same input FASTQ, with a maximum of 5 rounds of adjustment. The first set of R1 / R2 data with a relative deviation of no more than 2% is taken as the final flattened data, and the average or merging of read sets from different rounds is not performed. The final average coverage depth of the data used in step S5 is controlled within the range of 2000X±2%.
[0037] S5: Viral Recombination Analysis: For synchronous paired-end FASTQ reads with an average coverage depth of 2000X±2%, FLASH was used to splice paired-end reads, with a minimum overlap of 10 bp. Successfully spliced reads were output as continuous single-end sequences, with an "M" identifier appended to the original read name. Unspliced R1 and R2 reads were renamed by appending "R1" or "R2" end identifiers to their original read names, and merged with the successfully spliced reads into a unified single-end FASTQ. This unified single-end FASTQ was input into ViReMa, and recombination breakpoints were calculated using the SARS-CoV-2 reference genome. The ViReMa output was merged according to the breakpoint start coordinates, end coordinates, and direction, and duplicate counts were removed based on the renamed unique read identifiers. Only recombination events supported by at least two unique reads and with valid viral reference alignment sequences on both sides of the breakpoint were retained. For any breakpoint j, the recombination frequency is calculated as F_j = N_j / N_total × 100%, where N_j is the number of unique reads supporting breakpoint j, and N_total is the total number of unique single-ended reads entering the recombination analysis. The breakpoint coordinates, direction, number of unique supporting reads, and F_j are output to obtain the SARS-CoV-2 virus recombination information.
[0038] Example 2 In this embodiment, porcine reproductive and respiratory syndrome virus type 1 (PRRSV-1) was used as the detection target. The sequencing data was obtained by reverse cDNA sequencing, with a data volume of 15.13 Gb and a host sequence ratio of 50.29%.
[0039] S1: Constructing a viral mutation database: 3,500 valid PRRSV-1 whole-genome sequences were downloaded from the NCBI database and screened. Screening criteria included sequence integrity of at least 95%, N-base ratio of at least 1%, and only one identical repetitive sequence was retained. A genome with complete sequences and clear annotation (GenBank accession number EU073079.1) was selected as the reference genome, with a length of 15099 bp. Whole-genome multiple sequence alignment was performed on the reference genome and the remaining valid genomes using MAFFT 7.526 in --auto mode. Based on the MAFFT alignment results, a Python script was used to extract and label base substitutions, insertions, and deletions according to the reference genome coordinates, and the insertions and deletions were normalized. For each site in the reference genome, the number of valid genomes with a clearly definable state, n_definable, was used as the denominator, and the number of valid genomes with the same mutation direction, n_mutation, was used as the numerator. The mutation frequency was calculated using f = n_mutation / n_definable. The reference coordinates, reference bases, mutated bases or insertions / deletions, n_mutation, n_definable, and f were recorded to obtain the PRRSV-1 virus mutation database. The sequence accession number list used in this embodiment and the database download date were saved together with the analysis results to ensure the traceability of the database snapshot.
[0040] S2: Obtaining Valid Virus Data: The 15.13 Gb raw paired-end sequencing data underwent host removal processing. Bowtie2 was used to align R1 and R2 with the porcine Sscrofa11.1 reference genome, using a very-sensitive preset and outputting SAM / BAM. Subsequently, samtools was used to filter read pairs where both ends of R1 and R2 were unaligned, excluding secondary and supplementary alignments. The filtering results were converted into host-removed R1 / R2 FASTQ data with one-to-one read name correspondence. FastUniq was used to perform sequence-level PCR repeat removal on the host-removed paired-end data. When the R1 and R2 sequences of two paired-end reads were completely identical, only one pair was retained. FastP was used for read-level quality filtering, setting the N-base allowance to 0, the average Phred quality threshold to Q30, and the shortest read length to 50 bp. After filtering, the readname correspondence of R1 / R2 was checked again to obtain valid paired-end FASTQ data for PRRSV-1 virus.
[0041] S3: Viral Mutation Analysis: The effective paired ends of the PRRSV-1 virus (FASTQ) were aligned with the reference genome (EU073079.1) using bwa mem, resulting in a BAM format alignment file. Samtools was used to sequentially sort the BAM files by read name, correct for fixed-end pairing information, and sort by coordinates. Then, samtools markdup -r was used to remove alignment-level PCR repeats, resulting in a deduplicated BAM file. Samtools depth was used to output the coverage depth site-by-site. The average coverage depth was calculated as D = Σd_i / L, where d_i is the depth of the i-th reference site and L is the length of the reference genome. Base coverage was calculated as C = N(d_i≥1) / L × 100%. In this example, the average coverage depth was 3200X, and the base coverage was 97.2%.
[0042] Snippy was used to obtain consistent sequences and high-frequency variant information with an allele frequency of at least 50% based on deduplication BAM; LoFreq was used to retrieve candidate sites for low-frequency variants with an allele frequency of less than 1%. The samtools mpileup was used to obtain the base counts of candidate sites, counting only bases with a quality value of at least Q30 and an alignment quality value of at least 30. The effective depth of candidate sites was required to be at least 500X. For candidate sites with records of the same reference coordinates and mutation direction in the PRRSV-1 virus mutation database, the number of supporting reads for the mutation was required to be at least 2, with support from both forward and reverse reads; for candidate sites without supporting records in the database, the number of supporting reads for the mutation was required to be at least 3, with an allele frequency of at least 0.2%, and support from both forward and reverse reads. Candidate sites meeting these conditions constituted PRRSV-1 virus variant information; each site output its reference coordinates, reference base, mutated base, effective depth, number of supporting reads for the mutation, allele frequency, number of forward and reverse support reads, and database support status.
[0043] S4: Data leveling: The average coverage depth of the deduplicated BAM is 3,200X, with a base coverage rate of 97.2%. The target coverage depth Dt is set to 1000X. Using samtools fastq, the deduplicated BAM is converted to R1 / R2 FASTQ with read names maintaining pairwise correspondence. The number of reads and the order of read names in both files are checked to be consistent. The initial sampling ratio is calculated as p0 = Dt / D0; in this example, p0 = 1000 / 3200 = 0.3125. Simultaneous sampling is performed on R1 and R2 using the same random seed using seqkit sample; the sampling results are re-aligned to the viral reference genome, and the average coverage depth Dn is recalculated. If |Dn-Dt| / Dt>2%, then the sampling ratio is adjusted according to p(n+1)=p(n)×Dt / Dn, and sampling is re-done synchronously from the same input FASTQ, with a maximum of 5 rounds of adjustment. The first set of R1 / R2 data with a relative deviation of no more than 2% is taken as the final flattened data, and the average or merging of read sets from different rounds is not performed. The final average coverage depth of the data used in step S5 is controlled within the range of 1000X±2%.
[0044] S5: Viral Recombination Analysis: For synchronous paired-end FASTQ reads with an average coverage depth of 1000X±2%, FLASH was used to assemble paired-end reads, with a minimum overlap of 10 bp. Successfully assembled reads were output as continuous single-end sequences, with an "M" identifier appended to the original read name. Unassembled R1 and R2 reads were renamed by appending the "R1" or "R2" end identifier to their original read names, and merged with the successfully assembled reads into a unified single-end FASTQ. The unified single-end FASTQ was input into ViReMa, and recombination breakpoints were calculated using the PRRSV-1 reference genome. The ViReMa output was merged according to the breakpoint start coordinates, end coordinates, and direction, and duplicate counts were removed based on the renamed unique read identifiers. Only recombination events supported by at least two unique reads and with valid viral reference alignment sequences on both sides of the breakpoint were retained. For any breakpoint j, the recombination frequency is calculated as F_j = N_j / N_total × 100%, where N_j is the number of unique reads supporting breakpoint j, and N_total is the total number of unique single-ended reads entering the recombination analysis. The breakpoint coordinates, direction, number of uniquely supporting reads, and F_j are output to obtain the PRRSV-1 virus recombination information.
[0045] Example 3 In this embodiment, feline calicivirus (FCV) was used as the detection target. Metatranscriptome sequencing was used to obtain sequencing data, with a data volume of 16.48 Gb and a host sequence ratio of 40.03%.
[0046] S1: Constructing a viral mutation database: 2,800 valid FCV whole-genome sequences were downloaded from the NCBI database and screened. The screening criteria were sequence integrity of no less than 95%, N base ratio of no more than 1%, and only one identical repetitive sequence was retained. A genome with complete sequences and clear annotation (GenBank accession number FJ938051.1) was selected as the reference genome, with a genome length of 7690 bp. MAFFT 7.526 was used to perform whole-genome multiple sequence alignment on the reference genome and the remaining valid genomes, using the --auto mode. Based on the MAFFT alignment results, a Python script was used to extract and label base substitutions, insertions, and deletions according to the coordinates of the reference genome, and insertions and deletions were normalized. For each site in the reference genome, the number of valid genomes with a clearly definable state, n_determinable, was used as the denominator, and the number of valid genomes with the same mutation direction, n_mutation, was used as the numerator. The mutation frequency was calculated using f = n_mutation / n_determinable. The reference coordinates, reference bases, mutated bases or insertions / deletions, n_mutation, n_determinable, and f were recorded to obtain the FCV viral mutation database. The list of sequence accession numbers used for analysis in this embodiment, the database download date, and the analysis results are saved together to ensure that the database snapshot is traceable.
[0047] S2: Obtaining Valid Virus Data: The 16.48 Gb raw paired-end sequencing data underwent host removal processing. Bowtie2 was used to align R1 and R2 with the feline Felis_catus_9.0 reference genome, using a very-sensitive preset and outputting SAM / BAM. Subsequently, samtools was used to filter read pairs where both ends of R1 and R2 were unaligned, excluding secondary and supplementary alignments. The filtering results were converted into host-removed R1 / R2 FASTQ data with one-to-one read name correspondence. FastUniq was used to perform sequence-level PCR repeat removal on the host-removed paired-end data. When the R1 and R2 sequences of two paired-end reads were completely identical, only one pair was retained. FastP was used for read-level quality filtering, setting the N-base allowance to 0, the average Phred quality threshold to Q30, and the shortest read length to 50 bp. After filtering, the read name correspondence of R1 / R2 was checked again to obtain valid paired-end FASTQ data for FCV virus.
[0048] S3: Viral Mutation Analysis: The effective paired-end FASTQ sequences of the FCV virus were aligned with the reference genome (FJ938051.1) using bwa mem, resulting in a BAM format alignment file. The BAM file was then sorted by read name, corrected for fixed-end pairing information using fixmate, and sorted by coordinates using samtools. Finally, samtools markdup -r was used to remove alignment-level PCR repeats, resulting in a deduplicated BAM file. The coverage depth was output site-by-site using samtools depth, and the average coverage depth was calculated as D=Σd_i / L, where d_i is the depth of the i-th reference site and L is the length of the reference genome. Base coverage was calculated as C=N(d_i≥1) / L×100%. In this example, the average coverage depth was 2,400X, and the base coverage was 96.5%.
[0049] Snippy was used to obtain consistent sequences and high-frequency variant information with an allele frequency of at least 50% based on deduplication BAM; LoFreq was used to retrieve candidate sites for low-frequency variants with an allele frequency of less than 1%. The samtools mpileup was used to obtain the base counts of candidate sites, counting only bases with a quality value of at least Q30 and an alignment quality value of at least 30. The effective depth of candidate sites was required to be at least 500X. For candidate sites with records of the same reference coordinates and mutation direction in the FCV virus mutation database, the number of supporting reads for the mutation was required to be at least 2, with support from both forward and reverse reads; for candidate sites without supporting records in the database, the number of supporting reads for the mutation was required to be at least 3, with an allele frequency of at least 0.2%, and support from both forward and reverse reads. Candidate sites meeting these conditions constituted FCV virus variant information; each site output the reference coordinates, reference base, mutated base, effective depth, number of supporting reads for the mutation, allele frequency, number of forward and reverse support reads, and database support status.
[0050] S4: Data leveling: The average coverage depth of the deduplicated BAM is 2,400X, with a base coverage rate of 96.5%. The target coverage depth Dt is set to 1500X. Using samtools fastq, the deduplicated BAM is converted to R1 / R2 FASTQ with read names maintaining pairwise correspondence. The number of reads and the order of read names in both files are checked to be consistent. The initial sampling ratio is calculated as p0 = Dt / D0; in this example, p0 = 1500 / 2400 = 0.6250. Simultaneous sampling of R1 and R2 is performed using seqkit sample with the same random seed. The sampling results are re-aligned to the viral reference genome, and the average coverage depth Dn is recalculated. If |Dn-Dt| / Dt>2%, then the sampling ratio is adjusted according to p(n+1)=p(n)×Dt / Dn, and sampling is re-done synchronously from the same input FASTQ, with a maximum of 5 rounds of correction. The R1 / R2 data with a relative deviation of no more than 2% in the first group are taken as the final flattened data, and the average or merging of read sets from different rounds is not performed. The final average coverage depth of the data used in step S5 is controlled within the range of 1500X±2%.
[0051] S5: Viral Recombination Analysis: For synchronous paired-end FASTQ reads with an average coverage depth of 1500X±2%, FLASH was used to assemble paired-end reads, with a minimum overlap of 10 bp. Successfully assembled reads were output as continuous single-end sequences, with an "M" identifier appended to the original read name. Unassembled R1 and R2 reads were renamed by appending the "R1" or "R2" end identifier to the original read name, and merged with the successfully assembled reads into a unified single-end FASTQ. The unified single-end FASTQ was input into ViReMa, and recombination breakpoints were calculated using the FCV reference genome. The ViReMa output was merged according to the breakpoint start coordinates, end coordinates, and direction, and duplicate counts were removed based on the renamed unique read identifiers. Only recombination events supported by at least two unique reads and with valid viral reference alignment sequences on both sides of the breakpoint were retained. For any breakpoint j, the recombination frequency is calculated as F_j = N_j / N_total × 100%, where N_j is the number of unique reads supporting breakpoint j, and N_total is the total number of unique single-ended reads entering the recombination analysis. The breakpoint coordinates, direction, number of uniquely supporting reads, and F_j are output to obtain the FCV virus recombination information.
[0052] Example 4 In this embodiment, porcine reproductive and respiratory syndrome virus type 2 (PRRSV-2) was used as the detection target. The reverse cDNA sequencing method was used to obtain sequencing data, with a data volume of 20.33 Gb and a host sequence ratio of 67.83%.
[0053] S1: Constructing a viral mutation database: 4,200 valid PRRSV-2 whole-genome sequences were downloaded from the RefSeq database and screened. The screening criteria were sequence integrity of no less than 95%, N base ratio of no more than 1%, and only one identical repetitive sequence was retained. A genome with complete sequences and clear annotation (RefSeq accession number NC_001539.2) was selected as the reference genome, with a genome length of 15408 bp. Whole-genome multiple sequence alignment was performed on the reference genome and the remaining valid genomes using MAFFT 7.526 in --auto mode. Based on the MAFFT alignment results, a Python script was used to extract and label base substitutions, insertions, and deletions according to the reference genome coordinates, and insertions and deletions were normalized. For each site in the reference genome, the number of valid genomes with a clearly definable state, n_definable, was used as the denominator, and the number of valid genomes with the same mutation direction, n_mutation, was used as the numerator. The mutation frequency was calculated using f = n_mutation / n_definable. The reference coordinates, reference bases, mutated bases or insertions / deletions, n_mutation, n_definable, and f were recorded to obtain the PRRSV-2 viral mutation database. The sequence accession number list used in this embodiment and the database download date were saved together with the analysis results to ensure the traceability of the database snapshot.
[0054] S2: Obtaining Valid Virus Data: The 20.33 Gb raw paired-end sequencing data underwent host removal processing. Bowtie2 was used to align R1 and R2 with the porcine Sscrofa11.1 reference genome, using a very-sensitive preset and outputting SAM / BAM. Subsequently, samtools was used to filter read pairs where both ends of R1 and R2 were unaligned, excluding secondary and supplementary alignments. The filtering results were converted into host-removed R1 / R2 FASTQ data with read names one-to-one correspondence. FastUniq was used to perform sequence-level PCR repeat removal on the host-removed paired-end data. When the R1 and R2 sequences of two paired-end reads were completely identical, only one pair was retained. FastP was used for read-level quality filtering, setting the N-base allowance to 0, the average Phred quality threshold to Q40, and the shortest read length to 50 bp. After filtering, the read name correspondence of R1 / R2 was checked again to obtain valid paired-end FASTQ data for PRRSV-2 virus.
[0055] S3: Viral Mutation Analysis: The effective paired-end FASTQ sequences of the PRRSV-2 virus were aligned with the reference genome (NC_001539.2) using bwa mem, resulting in a BAM format alignment file. The BAM file was then sorted by read name, corrected for fixed-end pairing information using fixmate, and sorted by coordinates using samtools. Finally, samtools markdup -r was used to remove alignment-level PCR repeats, resulting in a deduplicated BAM file. The coverage depth was output site-by-site using samtools depth, and the average coverage depth was calculated as D=Σd_i / L, where d_i is the depth of the i-th reference site and L is the length of the reference genome. Base coverage was calculated as C=N(d_i≥1) / L×100%. In this example, the average coverage depth was 3,800X, and the base coverage was 98.1%.
[0056] Snippy was used to obtain consistent sequences and high-frequency variant information with an allele frequency of at least 50% based on deduplication BAM; LoFreq was used to retrieve candidate sites for low-frequency variants with an allele frequency of less than 1%. The samtools mpileup was used to obtain the base counts of candidate sites, counting only bases with a quality value of at least Q30 and an alignment quality value of at least 30. The effective depth of candidate sites was required to be at least 500X. For candidate sites with records of the same reference coordinates and mutation direction in the PRRSV-2 viral mutation database, the number of supporting reads for the mutation was required to be at least 2, with support from both forward and reverse reads; for candidate sites without supporting records in the database, the number of supporting reads for the mutation was required to be at least 3, with an allele frequency of at least 0.2%, and support from both forward and reverse reads. Candidate sites meeting these conditions constituted PRRSV-2 viral variant information; each site output its reference coordinates, reference base, mutated base, effective depth, number of supporting reads for the mutation, allele frequency, number of forward and reverse support reads, and database support status.
[0057] S4: Data leveling: The average coverage depth of the deduplicated BAM is 3,800X, with a base coverage rate of 98.1%. The target coverage depth Dt is set to 2000X. Using samtools fastq, the deduplicated BAM is converted to R1 / R2 FASTQ with read names maintaining pairwise correspondence. The number of reads and the order of read names in both files are checked to be consistent. The initial sampling ratio is calculated as p0 = Dt / D0; in this example, p0 = 2000 / 3800 = 0.5263. Simultaneous sampling is performed on R1 and R2 using the same random seed using seqkit sample; the sampling results are re-aligned to the viral reference genome, and the average coverage depth Dn is recalculated. If |Dn-Dt| / Dt>2%, then the sampling ratio is adjusted according to p(n+1)=p(n)×Dt / Dn, and sampling is re-done synchronously from the same input FASTQ, with a maximum of 5 rounds of adjustment. The first set of R1 / R2 data with a relative deviation of no more than 2% is taken as the final flattened data, and the average or merging of read sets from different rounds is not performed. The final average coverage depth of the data used in step S5 is controlled within the range of 2000X±2%.
[0058] S5: Viral Recombination Analysis: For synchronous paired-end FASTQ reads with an average coverage depth of 2000X±2%, FLASH was used to assemble paired-end reads, with a minimum overlap of 10 bp. Successfully assembled reads were output as continuous single-end sequences, and an "M" identifier was appended to the original read name. Unassembled R1 and R2 reads were renamed by appending the "R1" or "R2" end identifier to their original read names, and merged with the successfully assembled reads into a unified single-end FASTQ. The unified single-end FASTQ was input into ViReMa, and recombination breakpoints were calculated using the PRRSV-2 reference genome. The ViReMa output was merged according to the breakpoint start coordinates, end coordinates, and direction, and duplicate counts were removed based on the renamed unique read identifiers. Only recombination events supported by at least two unique reads and with valid viral reference alignment sequences on both sides of the breakpoint were retained. For any breakpoint j, the recombination frequency is calculated as F_j = N_j / N_total × 100%, where N_j is the number of unique reads supporting breakpoint j, and N_total is the total number of unique single-ended reads entering the recombination analysis. The breakpoint coordinates, direction, number of uniquely supporting reads, and F_j are output to obtain the PRRSV-2 virus recombination information.
[0059] Comparative Example 1 This comparative example is based on the SARS-CoV-2 dataset of Example 1, omitting the host removal process in step S2. The remaining steps and parameters are the same as in Example 1. The original paired-end FASTQ reads are not aligned with GRCh38, but directly proceed to sequence-level PCR repeat removal and read-level quality filtering before viral reference alignment. This setting is used to evaluate the impact of host sequence removal on the subsequent data volume, number of candidate signals, and computation time. Since all host reads are included in the viral reference alignment, the computational input increases, and a small number of non-specific alignments may generate additional candidate signals.
[0060] Comparative Example 2 This comparative example is based on the SARS-CoV-2 dataset of Example 1, omitting the sequence-level PCR duplicate removal in step S2; the remaining steps and parameters are the same as in Example 1. Host-end deduplication data is not processed through FastUniq but directly subjected to FASTP quality filtering; the alignment-level PCR duplicate removal in step S3 is retained. This setting is used to evaluate the impact of pre-alignment sequence-level deduplication on computational input and subsequent result fluctuations.
[0061] Comparative Example 3 This comparative example is based on the SARS-CoV-2 dataset of Example 1, omitting the alignment-level PCR duplicate deletion in step S3; the remaining steps and parameters are the same as in Example 1. FastUniq sequence-level deduplication in step S2 is retained, but the BAM obtained from bwa mem is not processed using samtools markdup -r, and directly proceeds to coverage depth statistics and variant analysis. This setting is used to evaluate the impact of residual duplicate reads with the same alignment position on site support number and recombination breakpoint support number.
[0062] Comparative Example 4 This comparative example is based on the SARS-CoV-2 dataset of Example 1, omitting the ultra-low frequency candidate site filtering in step S3 that combines the viral mutation database and site quality conditions. The remaining steps and parameters are the same as in Example 1. Candidate sites with an allele frequency of less than 1% output by LoFreq are directly counted in the candidate site count, without secondary screening based on effective depth, base quality, alignment quality, number of mutation-supporting reads, chain direction support, and database support status. This setting is used to evaluate the impact of the filtering rules on the number of candidate sites and repetitive fluctuations.
[0063] Comparative Example 5 This comparative example is based on the SARS-CoV-2 dataset of Example 1, omitting the data flattening in step S4. The remaining steps and parameters are the same as in Example 1. The deduplicated BAM obtained in step S3 is directly converted to synchronous two-end FASTQ and enters step S5 with the original average coverage depth of 2,850X, without performing synchronous sampling and iterative correction at the target coverage depth. This setting is used to evaluate the impact of sample coverage depth standardization on the number of recombinant candidate breakpoints and batch-to-batch reproducibility.
[0064] Comparative Example 6 This comparative example is based on the SARS-CoV-2 dataset from Example 1. ViReMa was used only to perform recombination analysis on the raw sequencing data that had not undergone the preprocessing and depth normalization described in this invention. The host removal, sequence-level PCR duplicate removal, read-level quality filtering, alignment-level PCR duplicate deletion, low-frequency variant candidate site filtering, and data leveling steps of this invention were not performed. This process is only used for comparing recombination candidate breakpoints and does not output the ultra-low-frequency variant candidate sites defined in this invention; therefore, the corresponding items are recorded as "not detected" instead of a value of 0.
[0065] Comparative Example 7 This comparative example uses the SARS-CoV-2 dataset from Example 1 and sets up a comparison procedure A: Virus reference alignment and recombination breakpoint calculation are retained, but the coverage depth flattening in step S4 is not performed, and the database-assisted filtering rules for low-frequency candidate sites of this invention are not adopted. Recombination analysis directly uses the original data with an average coverage depth of 2,850X. This comparison procedure is used to evaluate the impact of depth normalization on the number of recombination candidate breakpoints and batch-to-batch result fluctuations; this procedure does not configure the ultra-low-frequency variant candidate site output of this invention, therefore the corresponding item is marked as "not detected".
[0066] Comparative Example 8 This comparative example is based on the SARS-CoV-2 dataset from Example 1. The average read phoned quality threshold in step S2 was lowered from Q30 to Q20, while the remaining steps and parameters remained the same as in Example 1. FastP was set to allow 0 N bases, Q20 for the average read phoned quality threshold, and 50 bp for the shortest read length, allowing reads with an average quality between Q20 and Q30 to proceed to subsequent analysis. This setting was used to evaluate the impact of a lower read quality threshold on candidate variants, candidate recombination breakpoints, and reproducibility fluctuations.
[0067] Performance testing: 1. Analysis Time (CPU / h): Records the CPU time consumed throughout the entire process from raw data input to reconstructed information output, in CPU hours (CPU / h).
[0068] 2. Number of candidate sites with ultra-low frequency variants: This is the number of candidate sites with an allele frequency of less than 1% that are ultimately retained according to rule S3 of this invention, expressed in units of individual sites. This metric is used to compare the impact of different processes on the number of candidate signals; in the absence of an independent truth set, the number of candidate sites is not equivalent to accuracy.
[0069] 3. Number of Recombination Candidate Breakpoints: This metric counts the number of recombination breakpoints that satisfy at least two unique reads and have valid viral reference alignment sequences on both sides of the breakpoint. The unit is individual breakpoints. This metric is used to compare the number of candidate breakpoints under different levels of normalization and preprocessing, and is not used as a standalone accuracy indicator.
[0070] 4. Coefficient of variation (CV%) for data reproducibility: The coefficient of variation (CV = standard deviation / mean multiplied by 100%) is calculated for the three independent sequencing and full-process analysis of the same viral sample, expressed as a percentage (%). A lower coefficient of variation indicates better data reproducibility.
[0071] For Examples 1 to 4, the complete analysis workflow was executed according to the parameters described for each example, and the analysis time, number of candidate sites for ultra-low frequency variants, number of candidate breakpoints for recombination, and coefficient of variation for data reproducibility were recorded. For Comparative Examples 1 to 7, the analysis was performed based on the SARS-CoV-2 dataset of Example 1, according to the single-variable or comparative workflow described for each example, and the same indicators were recorded. Data reproducibility was tested by executing the complete workflow on three independent sequencing data of the same viral sample, and the coefficient of variation (CV) for the number of candidate breakpoints for recombination was calculated as (CV = standard deviation / mean × 100%). For comparative workflows without ultra-low frequency variant analysis, the corresponding indicator was marked as "not detected".
[0072] Furthermore, the analysis time of the method of the present invention was compared with that of Comparative Procedure A on eight viral samples. Comparative Procedure A used the same viral reference alignment and recombination computing environment, but did not employ at least one of the standardization processes of the present invention: host removal, sequence-level PCR duplicate removal, ultra-low frequency candidate site database-assisted filtering, and coverage depth flattening. Table 3 is only used to compare the runtime under the listed computing platforms and datasets, and does not extrapolate the runtime difference to a fixed proportion across all software or hardware environments.
[0073] All tests were performed on the same computing platform. The hardware configuration was: Intel Xeon Gold 6248R CPU, 3.0 GHz, 256 GB RAM, and CentOS 7.9 operating system. All software versions were consistent: bwa 0.7.17, bowtie22.4.4, samtools 1.16, fastp 0.23.2, FastUniq 2.21, snippy 4.6.0, LoFreq 2.1.5, seqkit 2.2.0, MAFFT 7.526, FLASH 1.2.11, and ViReMa 0.29. Command line parameters, reference genome version, database sequence accession number list, and random seed were saved for each analysis for reproducibility.
[0074] Table 1 Performance test data of the embodiment ; Table 2 Comparative performance test data (based on the SARS-CoV-2 dataset) ; Table 3 Comparison of analysis time between the present invention and comparative process A ; Table 1 shows that the method of the present invention can operate stably under different virus types, sequencing methods, and host proportions. The analysis time is roughly proportional to the viral genome length and data volume, while the number of detected ultra-low frequency mutations and recombination breakpoints varies depending on the biological characteristics of the virus. The recombination detection coefficient of variation in all embodiments remains at a low level, indicating that the method has good reproducibility.
[0075] Table 2, compared with Example 1, clearly reveals the necessity of each standardized step: omitting any key preprocessing step (such as host removal, PCR deduplication, low-frequency filtering, or deep leveling) will lead to significant fluctuations in analysis time, an abnormal increase in the number of candidate sites or breakpoints (increased false positives), and a substantial increase in the coefficient of variation between multiple replicates, i.e., decreased result reliability. The negative impact of lacking low-frequency filtering and deep correction is particularly prominent, and the workflow without ultra-low-frequency variant output cannot provide the corresponding indicators.
[0076] Table 3 shows that the actual performance of this invention is significantly affected by the proportion of host sequences in the sample. In samples with a high proportion of host sequences, this invention significantly reduces the amount of invalid alignment data due to the pre-host removal step, resulting in a significantly shorter analysis time compared to the comparison procedure, demonstrating a clear advantage. However, in samples with an extremely low proportion of host sequences, the time savings from this step are limited, and the time consumption is similar to that of the comparison procedure. Overall, this invention exhibits higher analytical efficiency and practicality in sequencing data with severe host contamination.
[0077] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method of detecting mutations and recombination during the growth of an RNA virus, characterized in that, Includes the following steps: S1: Constructing a viral mutation database: Obtain multiple whole genome sequences of the target RNA virus, remove sequences with integrity below 95%, N base ratio above 1%, and completely repetitive sequences, and select a reference genome; perform whole genome alignment of the remaining valid genomes with the reference genome, uniformly coordinate base substitutions, insertions, and deletions, calculate the mutation frequency with the number of valid genomes with identifiable bases at the corresponding sites as the denominator and the number of valid genomes with the corresponding mutations as the numerator, and form a viral mutation database containing reference coordinates, reference bases, mutated bases or insertions / deletions, number of supporting genomes, number of identifiable genomes, and mutation frequency; S2: Obtaining valid viral data: Align the original paired-end reads of viral sequencing with the host reference genome, retaining read pairs whose R1 and R2 ends are not aligned to the host reference genome, thus obtaining host-removed paired-end data; using the identical R1 and R2 sequences of a pair of paired-end reads as the sequence-level PCR repeat criterion, retain only one pair, thus obtaining pre-deduplication data; perform quality filtering on the pre-deduplication data, retaining reads with 0 N bases, an average Phred quality value of not less than Q30, and a length of not less than 50 bp, thus obtaining valid viral data; S3: Viral mutation analysis: The effective viral data is compared with the reference genome to obtain a BAM format alignment file; PCR repeats are identified according to the paired-end read alignment coordinates and duplicate reads are actually deleted to obtain a deduplicated BAM file; Based on the deduplicated BAM file, the consistent sequence and high-frequency mutation information are obtained, and low-frequency mutation candidate sites with allele frequencies below 1% are called. For candidate sites, only bases with a base quality value of not less than Q30 and an alignment quality value of not less than 30 are counted, and the effective coverage depth of the candidate sites is not less than 500X; for candidate sites with supporting records in the viral mutation database, the number of supporting reads for the mutation is not less than 2, and both forward and reverse reads support it; for candidate sites without supporting records in the database, the number of supporting reads for the mutation is not less than 3, the mutation frequency is not less than 0.2%, and both forward and reverse reads support it, thus obtaining viral mutation information; S4: Data leveling: Calculate the average coverage depth and base coverage of the deduplicated BAM file, convert the deduplicated BAM into R1 and R2 paired-end FASTQs that maintain the paired correspondence of read names; set a target coverage depth that is not higher than the original average coverage depth, determine the initial sampling ratio according to the ratio of the target coverage depth to the original average coverage depth, use the same random seed and sample R1 and R2 synchronously according to read names; re-align the sampled data to the reference genome and calculate the actual average coverage depth. When the relative deviation between the actual average coverage depth and the target coverage depth is greater than 2%, adjust the sampling ratio according to the ratio of the target depth to the actual depth, and re-sample synchronously from the same R1 and R2 paired-end FASTQs in each round, with a maximum of 5 rounds of correction, and take the first paired-end data with a relative deviation of no more than 2% as the data with a unified effective depth; S5: Viral recombination analysis: The paired-end data of uniform effective depth are spliced together with a minimum overlap length of 10 bp; the successfully spliced reads are treated as single continuous sequences, and the unsuccessfully spliced R1 and R2 are treated as single-end sequences, and renamed according to the original read name with an end identifier, and then merged with the successfully spliced reads into a single-end FASTQ dataset; the single-end FASTQ dataset is compared with the viral reference genome for recombination breakpoint analysis, the results are merged according to the breakpoint coordinates and direction and deduplicated according to the unique read identifier, and only recombination events supported by no less than 2 unique reads and with valid alignment sequences on both sides of the breakpoint are retained; The recombination frequency of a specific recombination breakpoint is calculated by dividing the number of unique reads supporting that breakpoint by the total number of single-ended unique reads entering the recombination analysis, thus obtaining the virus recombination information.
2. The method of claim 1, wherein the method is used to detect mutations and recombination during the growth of an RNA virus. In step S1, the target viral genome is obtained from the NCBI database or RefSeq database, and the list of accession numbers of the sequences used and the database download date are saved; whole genome multiple sequence alignment is performed using MAFFT; based on the alignment results, a Python script is used to count base substitutions, insertions and deletions according to the reference genome coordinates, and after normalizing the insertions and deletions, the number of supporting genomes and the number of identifiable genomes are counted.
3. The method of claim 1, wherein the method is used to detect mutations and recombination during the growth of an RNA virus. In step S2, bowtie2 is used to align the original paired-end reads with the host reference genome and output the alignment file. Then, read pairs with both ends of R1 and R2 in an unaligned state are selected and secondary and supplementary alignments are excluded. When the target host reference genome is missing, the genome of a species of the same genus that is most closely related to the target host and has a publicly available reference genome is used, and the alternative genome is noted in the analysis record.
4. The method of claim 1, wherein the method is used to detect mutations and recombination during the growth of an RNA virus. In step S2, sequence-level PCR repeat removal was performed using FastUniq; quality filtering was performed using FastP, with the N base allowance set to 0, the average Phred quality threshold for reads set to Q30-Q40, and the shortest read length set to 50 bp. The results of the number and quality statistics of reads before and after filtering were then output.
5. The method of claim 1, wherein the method is used to detect mutations and recombination during the growth of an RNA virus. In step S3, bwa mem is used to align the valid viral data with the reference genome; samtools is used to sort read names, correct fixedmate end pairing information, and sort coordinates in sequence, and then samtools markdup -r is used to actually delete PCR repeats; snippy is used to obtain the consistent sequence and high-frequency variants with an allele frequency of not less than 50%, and LoFreq is used to call low-frequency variant candidate sites with an allele frequency of less than 1%.
6. The method of claim 1, wherein the method is used to detect mutations and recombination during the growth of an RNA virus. In step S3, samtools mpileup is used to obtain the reference base, the count of each substitution base, the base quality, and the alignment quality for each site; the allele frequency of the ultra-low frequency candidate site is the ratio of the number of mutation-supporting reads to the total number of valid reads that meet the quality conditions for that site; candidate sites with supporting records in the database meet the following requirements: effective depth not less than 500X, number of mutation-supporting reads not less than 2, and support from both forward and reverse reads; candidate sites without supporting records in the database further meet the following requirements: number of mutation-supporting reads not less than 3 and allele frequency not less than 0.2%.
7. The method for detecting mutations and recombination during the growth of RNA viruses according to claim 1, characterized in that, In steps S3 and S4, the average coverage depth D is calculated by dividing the sum of the depths of all statistically significant sites in the reference genome by the length of the reference genome, and the base coverage rate is calculated by dividing the number of reference genome sites with a coverage depth of not less than 1X by the length of the reference genome; the average coverage depth of the samples used for ultra-low frequency variant analysis is not less than 500X and the base coverage rate is not less than 95%.
8. The method of claim 1, wherein the method is used to detect mutations and recombination during the growth of an RNA virus. In step S4, the deduplicated BAM is converted into synchronized R1 and R2 dual-ended FASTQ using samtools fastq, maintaining the pairing relationship according to the read name; random sampling is performed using seqkit sample according to the sampling ratio, with R1 and R2 using the same random seed; in each round, sampling is resynchronized from the same input dual-ended FASTQ, the actual average coverage depth is recalculated, and the sampling ratio for the next round is adjusted according to p(n+1)=p(n)×Dtarget / Dmeasured, until |Dmeasured-Dtarget| / Dtarget is no greater than 2% or 5 rounds are reached.
9. A detection system for detecting mutations and recombination during the growth of an RNA virus, characterized by include: The database construction module is used to screen target RNA virus genomes in public databases for integrity, N base ratio and repetitive sequence, complete reference genome alignment, mutation coordinate normalization and statistics of the number of supporting genomes, the number of identifiable genomes and mutation frequency, and build a virus mutation database. The data preprocessing module is used to align the raw paired-end reads with the host reference genome, extract read pairs that are not aligned to the host reference genome at both ends, perform sequence-level PCR duplicate removal and read-level quality filtering to obtain valid viral data. The mutation analysis module is used to compare the effective viral data with the viral reference genome, actually delete the alignment-level PCR repeats, and filter low-frequency mutation candidate sites based on the effective site depth, base quality, alignment quality, number of mutation-supporting reads, chain support, and the viral mutation database to obtain viral mutation information. The data leveling module is used to convert the deduplicated BAM into a double-ended FASTQ that maintains the matching relationship of read names. It synchronously and randomly samples R1 and R2 according to the target coverage depth, and obtains unified effective depth data with a relative deviation of no more than 2% through re-comparison and coverage depth correction. The reassembly analysis module is used to stitch together two-end reads of unified and valid depth data. After merging the successfully stitched reads with the renamed unstitched R1 / R2 into a unified single-end FASTQ, it performs reassembly breakpoint analysis, and merges and removes duplicates according to the breakpoint coordinates, direction and unique read identifier. It also filters reassembly events based on the number of unique reads and calculates the reassembly frequency.
10. The detection system for detecting mutation and recombination during the growth of an RNA virus according to claim 9, wherein The data preprocessing module uses bowtie2 and samtools to perform host alignment and extract unaligned paired-end reads, uses FastUniq for sequence-level PCR repeat removal, and uses fastp to filter reads based on an N base count of 0, an average Phred quality value of at least Q30, and a length of at least 50 bp. The mutation analysis module uses bwa mem for viral reference alignment, uses samtools markdup to delete alignment-level PCR repeats, uses snippy and LoFreq to obtain high-frequency and low-frequency mutation candidate sites, and uses samtools mpileup to obtain site base counts. The data leveling module uses samtools fastq and seqkit sample to perform simultaneous paired-end sampling. The recombination analysis module uses FLASH to assemble paired-end reads, merges successfully assembled reads with renamed unassembled R1 / R2 reads into a unified single-end FASTQ, and uses ViReMa to calculate recombination breakpoints on the unified single-end FASTQ.
