A method and system for species identification based on mitochondrial genome assembly and multi-level database comparison.

The species identification method using mitochondrial genome assembly and multi-level database comparison solves the problems of insufficient information, false positives and low efficiency in existing technologies, and achieves efficient and reliable species identification results.

CN123120047APending Publication Date: 2026-11-17NANJING QINGJING TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611033308.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-13
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing species identification technologies based on DNA barcoding suffer from problems such as insufficient information capacity, false positives due to low-quality spliced ​​sequences, low comparison efficiency, and lack of confidence assessment mechanisms, leading to unreliable identification results or direct errors.

Method used

The method employs mitochondrial genome assembly and multi-level database alignment, including quality filtering of sequencing read data, iterative sequence extension and gap-filling assembly, construction of hierarchical reference sequence sets, and progressive alignment, combined with an exclusive confidence termination mechanism, to ensure the reliability and efficiency of the identification results.

Benefits of technology

It increases the amount of information in species identification, avoids false positives caused by low-quality spliced ​​sequences, improves identification efficiency, and ensures the reliability and accuracy of identification results through exclusive confidence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123120047A_ABST
    Figure CN123120047A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for species identification based on mitochondrial genome assembly and multi-level database comparison, relating to the fields of bioinformatics and molecular species identification. The method includes quality filtering of sequencing read data, iterative extension and gap-filling assembly of the mitochondrial genome to obtain an assembled closed sequence, followed by determination of first-to-last overlap consistency, calculation of sequencing depth discrete values, and identification of gene set integrity. Once verified, the sequence is determined as a valid sequence. The valid sequence is then sequentially input into genus-level, species-level, and haplotype reference sequence subsets for progressive global and local alignment to obtain a global similarity score matrix and local coverage intervals. Finally, the exclusivity confidence level is calculated based on the score ranking relationship and the length of the uncovered gap. Dynamic termination or final-level convergence is determined based on the confidence level, ultimately outputting the species identification result. This invention improves the accuracy and computational efficiency of species identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of bioinformatics and molecular species identification technology, and in particular to a species identification method and system based on mitochondrial genome assembly and multi-level database comparison. Background Technology

[0002] Species identification is a fundamental technical task in fields such as biological research, ecological environmental protection, import and export quarantine, forensic evidence identification, and quality control of traditional Chinese medicinal materials. Traditional species identification mainly relies on morphological characteristics, requiring the identifyrs to have professional taxonomic knowledge, and it is difficult to effectively distinguish incomplete samples, juvenile samples, or closely related species. With the rapid development of DNA sequencing technology, molecular marker-based species identification methods have gradually become mainstream, among which the technology using the mitochondrial cytochrome c oxidase subunit I (COI) gene fragment as DNA barcoding is the most widely used.

[0003] However, existing species identification technologies based on DNA barcoding have the following technical drawbacks:

[0004] (i) The information carrying capacity of a single gene fragment is limited. Because the COI barcode fragment is only 600-700 bp in length, it lacks sufficient variation sites for closely related species, making it difficult to achieve accurate species-level identification.

[0005] (ii) The quality control of sequencing data and the sequence assembly process are independent of each other. Low-quality assembled sequences directly enter the comparison and identification process, which can easily lead to false positive identification results.

[0006] (iii) The comparison database has a simple organizational structure and adopts a full-scale retrieval strategy, which leads to a continuous decrease in computational efficiency as the database size increases. At the same time, the existing scheme lacks a confidence assessment mechanism based on the comparison quality, and cannot provide reliable identification conclusions in the case of low matching quality.

[0007] (iv) The identification process lacks a closed-loop design. When the comparison results do not meet the preset threshold, an error is directly reported or there is no output, which cannot meet the actual identification needs.

[0008] Therefore, this invention proposes a species identification method and system based on mitochondrial genome assembly and multi-level database comparison to solve the problems existing in the prior art. Summary of the Invention

[0009] To address the aforementioned problems, the present invention aims to propose a species identification method and system based on mitochondrial genome assembly and multi-level database comparison. The present invention avoids the technical defects of existing technologies that output unreliable results or directly report errors under low matching quality, thereby solving the problems existing in the prior art.

[0010] To achieve the objectives of this invention, the invention is implemented through the following technical solution: a species identification method based on mitochondrial genome assembly and multi-level database comparison, comprising the following steps:

[0011] Step 1: Obtain sequencing reads of the sample to be identified;

[0012] Step 2: Perform quality filtering on the sequencing read data to obtain quality-filtered read data. The quality filtering process includes adapter sequence removal, low-quality base trimming at the ends, and sequence length screening.

[0013] Step 3: Based on the quality-filtered read data, perform iterative sequence extension and gap-filling assembly of the mitochondrial genome to obtain the assembled closed sequence;

[0014] Step 4: Perform head-to-tail overlap consistency determination, sequencing depth dispersion value calculation for each window, and mitochondrial gene set integrity identification on the assembled closed sequence. When the head-to-tail overlap consistency, sequencing depth dispersion value for each window, and mitochondrial gene set integrity all meet the preset quality conditions, the assembled closed sequence is determined to be a qualified verification sequence.

[0015] Step 5: Construct a hierarchical reference sequence set, which includes a subset of genus-level reference sequences, a subset of species-level reference sequences, and a subset of haplotype reference sequences;

[0016] Step 6: Perform progressive global and local alignments on the qualified sequence hierarchical reference sequence set to obtain the candidate classification units at each level and the corresponding global similarity score matrix and local coverage interval;

[0017] Step 7: Calculate the exclusive confidence score of the current level based on the score ranking relationship in the global similarity score matrix and the length of the uncovered gap in the local coverage interval. When the exclusive confidence score is greater than a preset first threshold, terminate the progression and determine the candidate classification unit of the current level as the target classification unit. When the exclusive confidence score is not greater than the preset first threshold and the current level is not the last level, proceed to the next level reference sequence subset for comparison. When the exclusive confidence score is not greater than the preset first threshold and the current level is the last level, determine the candidate classification unit of the last level as the target classification unit.

[0018] Step 8: Extract the taxonomic hierarchical path based on the target taxonomic unit and output the species identification results.

[0019] The further improvement lies in the following: In step three, the specific method of iterative sequence extension and gap filling assembly is as follows: k-mer frequency statistics are performed based on the quality filtered read segment data, and then extension seeds are selected based on the frequency statistics results. Finally, bidirectional sequence extension is performed starting from the extension seed until it can no longer be extended, and gap filling is performed on the uncovered gap area formed by the extension.

[0020] A further improvement is made in step four, where the discrete value of sequencing depth for each window is calculated as follows: the assembled closed sequence is divided into a preset number of sliding windows, and then the average sequencing depth and the standard deviation of sequencing depth within each sliding window are calculated.

[0021] A further improvement is that, in step five, the hierarchical reference sequence set is constructed based on the complete mitochondrial genome sequence in the public nucleic acid database, and the genus-level reference sequence subset is obtained by clustering all sequences within the genus using centrose clustering.

[0022] A further improvement is that, in step seven, the exclusivity confidence score is calculated based on the ratio of the highest score to the second highest score in the global similarity score matrix and the length of the uncovered gap in the local coverage interval.

[0023] A species identification system based on mitochondrial genome assembly and multi-level database comparison includes the following modules:

[0024] The sequencing read acquisition module is used to acquire sequencing read data of the sample to be identified;

[0025] The read quality filtering module is used to remove adapter sequences, trim low-quality bases at the ends, and screen for sequence length in sequencing read data to obtain quality filtered read data.

[0026] The mitochondrial splicing module is used to perform iterative sequence extension and gap-filling assembly of the mitochondrial genome based on quality filtered read data to obtain assembled closed sequences.

[0027] The assembly quality verification module is used to determine the consistency of the first and last overlap of the assembled closed sequence, calculate the discrete value of the sequencing depth of each window, and identify the integrity of the mitochondrial gene set. When the consistency of the first and last overlap, the discrete value of the sequencing depth of each window, and the integrity of the mitochondrial gene set all meet the preset quality conditions, the assembled closed sequence is determined to be a qualified verification sequence.

[0028] The hierarchical reference storage module is used to store a hierarchical reference sequence set, which includes a subset of genus-level reference sequences, a subset of species-level reference sequences, and a subset of haplotype reference sequences.

[0029] The progressive alignment execution module is used to perform progressive global and local alignments between the verified qualified sequences and the genus-level reference sequence subset, species-level reference sequence subset, and haplotype reference sequence subset, to obtain the candidate classification units at each level and the corresponding global similarity score matrix and local coverage interval.

[0030] The confidence assessment termination module calculates the exclusive confidence score of the current level based on the score ranking relationship in the global similarity score matrix and the length of the uncovered gap in the local coverage interval. When the exclusive confidence score is greater than a preset first threshold, the progression is terminated and the candidate classification unit of the current level is determined as the target classification unit. When the exclusive confidence score is not greater than the preset first threshold and the current level is not the last level, the progressive comparison execution module is triggered to enter the next level reference sequence subset. When the exclusive confidence score is not greater than the preset first threshold and the current level is the last level, the candidate classification unit of the last level is determined as the target classification unit.

[0031] The species classification output module is used to extract the taxonomic hierarchical path based on the target taxonomic unit and output the species identification results.

[0032] A further improvement is that the thread splicing module includes:

[0033] The seed extension submodule is used to select an extension seed based on the k-mer frequency statistics of the quality filtered read data, and to perform bidirectional sequence extension starting from the extension seed.

[0034] The gap-filling submodule is used to fill the uncovered gap regions formed after bidirectional sequence extension.

[0035] A further improvement is that the assembly quality verification module includes:

[0036] The first and last overlap determination submodule is used to determine the overlap consistency between the first and last sequences of the assembled closed sequence.

[0037] The depth distribution statistics submodule is used to divide the assembled closed sequence into a preset number of sliding windows and calculate the average sequencing depth and the standard deviation of sequencing depth within each sliding window;

[0038] The gene integrity verification submodule is used to identify whether the assembled closed sequence contains all protein-coding genes in the mitochondrial gene set.

[0039] A further improvement is that the progressive comparison execution module adopts a dynamic programming global comparison strategy when performing global comparison, and adopts a dynamic programming local comparison strategy when performing local comparison.

[0040] A further improvement is that the preset first threshold in the confidence assessment termination module includes a preset similarity ratio threshold and a preset uncovered gap length threshold. When the ratio of the highest score to the second highest score in the global similarity score matrix is ​​greater than the preset similarity ratio threshold, and the uncovered gap length in the local coverage interval is less than the preset uncovered gap length threshold, the exclusive confidence level is greater than the preset first threshold.

[0041] The beneficial effects of this invention are as follows:

[0042] (1) This invention obtains the full-length sequence of the mitochondrial genome by iteratively extending and filling gaps in the sequencing read data. The complete genetic information of the whole mitochondrial genome replaces the traditional single gene fragment as the basis for identification. The information content is more than 20 times higher than that of COI barcode fragments, which effectively solves the problem that closely related species are difficult to distinguish due to insufficient variation sites.

[0043] (2) Before the assembled closed sequence enters the comparison and identification, the present invention enforces the joint verification of three dimensions: the determination of the consistency of the first and last overlap, the calculation of the discrete value of the sequencing depth of each window, and the identification of the integrity of the mitochondrial gene set. Only sequences that meet the preset quality conditions in all three verifications can enter the subsequent comparison stage, thus avoiding false positive identification caused by low-quality spliced ​​sequences from the source of data.

[0044] (3) The present invention uses a dynamic termination mechanism driven by exclusive confidence to immediately terminate the progressive comparison when the confidence is greater than a preset first threshold, thereby avoiding the waste of computational resources of the full retrieval strategy and significantly improving the identification efficiency.

[0045] (4) In each level of comparison, the present invention performs global comparison and local comparison simultaneously to obtain the global similarity score matrix and the local coverage interval respectively. Then, the ratio of the highest score to the second highest score and the length of the uncovered gap are coupled into two complementary dimensions as an exclusive confidence index, which overcomes the technical defect of the traditional scheme that relies on a single similarity score for judgment.

[0046] (5) The present invention sets up a fallback mechanism in the decision logic. When the exclusion confidence is still not greater than the preset first threshold after all levels are compared, the last-level candidate classification unit is directly determined as the target classification unit and the identification result is output. This ensures that each identification process can converge to a taxonomic conclusion with evidence, overcoming the technical defects of the existing technical solution that directly reports errors or has no output in the case of low matching quality. Attached Figure Description

[0047] Figure 1 This is a schematic diagram of the steps of the present invention.

[0048] Figure 2 This is a schematic diagram illustrating the principle of global and local alignment of the verification qualified sequence with the reference sequence in this invention.

[0049] Figure 3 This is a schematic diagram of the decision-making process for calculating the exclusivity confidence level and the three-level progressive termination determination of the present invention.

[0050] Figure 4This is a schematic diagram showing the judgment results of each step in the assembly quality verification of the closure sequence of the scalp sample in Embodiment 1 of the present invention.

[0051] Figure 5 This is a schematic diagram illustrating the calculation of the exclusivity confidence level of the cattle sample in the genus-level comparison hierarchy in Embodiment 1 of the present invention. Detailed Implementation

[0052] To enhance understanding of the present invention, the present invention will be further described in detail below with reference to embodiments. These embodiments are only used to explain the present invention and do not constitute a limitation on the scope of protection of the present invention.

[0053] Example 1

[0054] according to Figures 1-5 As shown, this embodiment provides a species identification method based on mitochondrial genome assembly and multi-level database comparison for mammalian muscle tissue samples. Specifically, taking a Bostaurus muscle tissue sample as an example, the method includes the following steps:

[0055] Step 1: Sample Acquisition and Sequencing Data Generation

[0056] A sample of bovine muscle tissue to be identified was taken, and total DNA was extracted from the sample using a DNA extraction kit. The extracted total DNA was then subjected to quality testing, and DNA integrity was checked using agarose gel electrophoresis. Subsequently, the purity and concentration of the DNA were determined using a UV spectrophotometer. Five ng of the qualified DNA sample was then used to construct a sequencing library using the Illumina NexteraXT DNA library preparation kit. The constructed sequencing library was subjected to paired-end sequencing on the Illumina NovaSeq 6000 high-throughput sequencing platform, with a read length of 150 bp and a sequencing depth of 100× coverage depth on average. After sequencing, raw sequencing read data was obtained and stored in FASTQ format, including forward and reverse read files. Each read file contains the read sequence and its corresponding quality score code.

[0057] Step 2: Quality Filtration Treatment

[0058] The raw sequencing reads obtained in step one undergo quality filtering. First, adapter sequences are removed. Trimmomatic software is used to identify and remove adapter sequence fragments in the reads that match the Illumina universal adapter sequence library. The maximum allowed mismatch in adapter sequence matching is 2 bases. After adapter sequence removal, low-quality bases at the ends are pruned using a sliding window strategy. The window size is set to 4 bases. When the average quality score within the window is lower than a preset quality score threshold (Q20 in this example, i.e., an error rate of no more than 1%), the window and all subsequent bases are removed from the beginning of that window. After pruning, sequence length is filtered. Reads shorter than 50 bp are deleted entirely and do not participate in subsequent assembly steps. The remaining reads longer than or equal to 50 bp constitute the quality-filtered read data.

[0059] Step 3: De novo assembly of the mitochondrial genome

[0060] Iterative sequence extension and gap-filling assembly of the mitochondrial genome was performed based on quality-filtered read data. Specifically, all read sequences in the quality-filtered read data were frequency-counted according to a k-mer length of 35, yielding the frequency distribution of all k-mers. After the statistics were completed, the k-mer with the highest frequency was selected as the initial extension seed. Starting from this initial extension seed, extension matching was performed on the 5′ and 3′ ends of the k-mer sequences in the quality-filtered read data, respectively. The extension rule was as follows: in each round of extension, one base was extended from the end of the current extension body. If the frequency of the k-mer corresponding to this base in the read data was greater than or equal to 3 and the number of reads supported by the extension in the current extension direction was greater than or equal to 5, the base was added to the extension body; otherwise, extension in that direction was stopped. Bidirectional sequence extension continued until extension in both directions could no longer proceed. After the extension is completed, an initial extended sequence is obtained. For the uncovered gap areas outside the coverage of the initial extended sequence, a gap filling operation is performed. The filling method is as follows: extract the read pairs that cross the anchor sequences at both ends of the gap in the quality filtered read data, and use the inserted fragment sequences between the read pairs to fill the gaps to obtain a complete assembled closed sequence.

[0061] Step 4: Assembly Quality Verification

[0062] The quality of the assembled closed sequence is verified in three aspects, specifically:

[0063] Firstly, the consistency of the first and last overlap is determined: the first 500 bases of the assembled closed sequence and the last 500 bases of the sequence are extracted. The last 500 bases of the sequence are reverse-complemented and then locally compared with the first 500 bases of the sequence. When the comparison results show that the overlap length of the reverse-complemented sequence of the first and last sequences is greater than or equal to 50 bases and the consistency of the overlapping region sequence is greater than or equal to 98%, the consistency of the first and last overlap is determined to meet the preset quality conditions.

[0064] Secondly, the sequencing depth discrete value of each window is calculated: the assembled closed sequence is divided into multiple sliding windows with a window size of 1000 bases and a step size of 500 bases. The quality filtered read data is compared back to the assembled closed sequence. The sequencing depth coverage value in each sliding window is calculated. Then, the arithmetic mean and standard deviation of the sequencing depth coverage values ​​of all sliding windows are calculated. When the ratio of the standard deviation to the mean is less than or equal to 0.3, the sequencing depth discrete value of each window is determined to meet the preset quality conditions.

[0065] Thirdly, the integrity of the mitochondrial gene set is identified: the assembled closed sequence is compared with the feature map of the hidden Markov model (HMM) of the mitochondrial protein-coding gene set (containing 13 protein-coding genes: ND1, ND2, COI, COII, ATP8, ATP6, COIII, ND3, ND4L, ND4, ND5, ND6, CytB). When the number of identified protein-coding genes is greater than or equal to 11, the integrity of the mitochondrial gene set is determined to meet the preset quality conditions.

[0066] When the aforementioned end-to-end overlap consistency, sequencing depth dispersion values ​​for each window, and mitochondrial gene set integrity all meet the preset quality conditions, the assembled closed sequence is determined to be a valid sequence. In this embodiment, the assembled closed sequence of the cattle sample met all the conditions after verification in the above three dimensions. Its end-to-end overlap length was 72 bp, the overlap region consistency was 99.2%, the ratio of the depth coverage standard deviation to the mean was 0.18, and 13 protein-coding genes were identified, all of which met the preset quality conditions. Therefore, it was determined to be a valid sequence.

[0067] Step 5: Construct a hierarchical reference sequence set

[0068] All published mammalian mitochondrial genome sequences were downloaded from the public nucleic acid database GenBank, yielding a total of 1257 sequences. Redundancy was removed from the downloaded sequences, eliminating those with a sequence identity greater than 99.5% and retaining only non-redundant representative sequences. Based on the taxonomic annotation information of each sequence, a three-level reference sequence set was constructed, specifically:

[0069] Genus-level reference sequence subset: Clustering is performed using genus as the taxonomic unit. For all sequences within each genus, CD-HIT software is used for centroid clustering, with a cluster similarity threshold set to 95%. The centroid sequence of each cluster is selected as the representative sequence of that genus and stored in the genus-level reference sequence subset. The genus-level reference sequence subset constructed in this embodiment contains 283 representative sequences, covering major mammalian genus-level taxonomic units such as Bovidae, Cervidae, and Canidae.

[0070] Species-level reference sequence subset: Using species as the classification unit, all non-redundant sequences within each species are saved without further clustering or compression, ensuring that each species contains all known haplotype sequences, and these are stored in the species-level reference sequence subset. The species-level reference sequence subset constructed in this embodiment contains a total of 1947 sequences;

[0071] Haplotype reference sequence subset: All sequences within each species in the species-level reference sequence subset are clustered according to 100% similarity. All completely identical sequences (i.e., haplotype sequences) are retained in each cluster and stored in the haplotype reference sequence subset. The haplotype reference sequence subset constructed in this embodiment contains a total of 1947 sequences (the number is the same as the species-level subset because there are no completely duplicate sequences in this embodiment).

[0072] Step Six: Progressive Global and Local Alignment (Level 1 - Genus Level)

[0073] The verified sequences obtained in step four are input into the genus-level reference sequence subset for first-level alignment.

[0074] In the first-level alignment, two types of alignment operations are performed on each of the approximately 283 representative sequences in the subset of genus-level reference sequences that have passed verification.

[0075] Global alignment operation: The Needleman-Wunsch dynamic programming algorithm is adopted, and the matching score matrix is ​​set as follows: matching +2 points, mismatch -1 point, and gap penalty -4 points. The full length of the verified qualified sequence is globally aligned with the full length of each reference sequence. The global alignment score on each alignment path is calculated, and finally a 283-dimensional global similarity score vector is obtained, which constitutes the global similarity score matrix.

[0076] Local alignment operation: The Smith-Waterman dynamic programming algorithm is used, and the matching score matrix is ​​set as follows: matching +2 points, mismatch -1 point, gap penalty -4 points. All alignment segments with local similarity higher than the background noise are searched between the valid sequence and each reference sequence. The start and end positions of each alignment segment on the reference sequence are recorded. The position intervals of all recorded alignment segments are merged to form the total local coverage interval on the reference sequence. At the same time, the uncovered gaps (i.e., continuous regions in the reference sequence that are not covered by any alignment segments) and their lengths are identified within the coverage interval.

[0077] Based on global alignment calculations, the highest global alignment score of the verified qualified sequence in this embodiment compared to the Bovidae reference sequence in the genus-level reference sequence subset is 3724 points, the highest score compared to the Cervidae reference sequence is 2143 points, and the highest scores compared to other family and genus reference sequences are all below 1850 points. Based on local alignment calculations, the local coverage interval of the verified qualified sequence compared to the Bovidae reference sequence in this embodiment covers 96.7% of the total length of the reference sequence, with a total uncovered gap length of 312 bp (distributed across three gap regions). The local coverage interval compared to the Cervidae reference sequence covers 72.4% of the total length of the reference sequence, with a total uncovered gap length of 1458 bp. The coverage interval compared to other family and genus reference sequences is all below 55%.

[0078] Step 7: Calculation of Exclusivity Confidence and First-Level Termination Judgment

[0079] The exclusive confidence level of the first level is calculated based on the global similarity score matrix and the local coverage interval obtained from the first level comparison.

[0080] First, extract the highest score S from the global similarity score matrix. max and the second highest score S second In the first stage of this embodiment, S max = 3724 (corresponding to Bovidae), S second = 2143 (corresponding to Cervidae), calculate the ratio R = S max / S second =3724 / 2143 = 1.738.

[0081] Secondly, extract the total length of the uncovered gap (Gap) from the locally covered intervals, corresponding to the reference sequence (i.e., the bovine representative sequence) with the highest score. total In this embodiment, the first level gap total = 312 bp.

[0082] Then, calculate the exclusivity confidence level C using the following formula:

[0083] C = α × (Smax / S second ) + β × (1 - Gap total / L ref )

[0084] Among them, L ref The total length of the current reference sequence (in this embodiment, the full length of the representative bovine sequence is 16338 bp), α and β are preset weighting coefficients, in this embodiment α = 0.6, β = 0.4, and the similarity ratio threshold in the preset first threshold is set to Rt. hreshold = 1.5, the threshold for the length of the uncovered gap is set to Gap threshold = 500 bp.

[0085] The first-level calculation in this embodiment yields:

[0086] C = 0.6 × 1.738 + 0.4 × (1 - 312 / 16338) = 1.043 + 0.4 × (1 -0.0191) = 1.043 + 0.4 × 0.9809 = 1.043 + 0.3924 = 1.435.

[0087] The decision condition is: when R > R threshold And Gap total < Gap threshold When C > the preset first threshold. In this embodiment, R = 1.738 > 1.5, and Gap total = 312 bp < 500 bp, both conditions are met simultaneously, therefore the exclusivity confidence is greater than the preset first threshold, the progression is terminated, and the current level candidate taxonomic unit, namely Bovidae, is determined as the target taxonomic unit. Subsequent species-level and haplotype-level comparisons will not proceed.

[0088] Step 8: Output species identification results

[0089] Based on the target taxonomic unit (Bovidae), the complete taxonomic hierarchy is extracted: Chordata → Mammalia → Artiodactyla → Bovidae. The system then outputs this taxonomic hierarchy as the species identification result to the user interface, along with the identification criteria: identification confidence C = 1.435 (above the threshold), termination level at the genus level, and highest matching reference sequence number NC. 006853.1(Complete mitochondrial genome of Bos taurus), highest global alignment score of 3724, total uncovered gap length of 312 bp. Total identification time (from input of raw sequencing read data to output of final identification results) was 6 minutes and 23 seconds.

[0090] It should be noted that in this embodiment, the following are involved:

[0091] The global alignment operation employs the Needleman-Wunsch dynamic programming algorithm. Its basic operation process is as follows: Construct a dynamic programming score matrix of dimension (M+1)×(N+1), where M is the length of the validated sequence and N is the length of the current reference sequence; initialize the score values ​​of the first row and first column of the matrix; fill each cell in the matrix row by row and column by column according to preset matching scores, mismatch penalties, and gap penalties, based on a recursive relationship; after the matrix is ​​filled, backtrack from the lower right cell to the upper left cell. The sequence alignment corresponding to the backtracking path is the globally optimal alignment between the validated sequence and the current reference sequence, and the cumulative score of this backtracking path is used as the global alignment score.

[0092] The local alignment operation uses the Smith-Waterman dynamic programming algorithm. Its basic operation process is as follows: Construct a dynamic programming score matrix with a dimension of (M+1)×(N+1), and initialize the score values ​​of the first row and the first column of the matrix to zero; Fill the score values ​​of each unit in the matrix row by row and column by column according to the preset matching score, mismatch penalty and empty position penalty, based on the recursive relationship. When the recursive calculation result is less than zero, the score of the unit is set to zero; After the matrix is ​​filled, the unit with the highest score in the search matrix is ​​used as the backtracking starting point. Backtracking starts from this starting point and ends at the unit with a score of zero. The sequence segment corresponding to the backtracking path is the locally optimal alignment segment between the verified qualified sequence and the current reference sequence. Record the starting position and ending position of the segment on the reference sequence.

[0093] Example 2

[0094] This embodiment provides another species identification method based on mitochondrial genome assembly and multi-level database comparison, specifically for species identification of samples with low sequencing depth. The method uses hair samples from the Tibetan antelope (Pantholops hodgsonii) as an example. The steps include:

[0095] Step 1: Sample Acquisition and Sequencing Data Generation

[0096] A sample of Tibetan antelope hair (including the hair follicle root) was collected for identification, and total DNA was extracted from the sample using a forensic DNA extraction kit. Due to the low DNA content in hair samples, the total extracted DNA, as measured by quantitative real-time analysis, was only 1.2 ng, meeting the minimum requirements for sequencing library construction. All extracted DNA samples were used to construct sequencing libraries using the MGI Easy Universal DNA Library Preparation Kit. The constructed sequencing library was then sequenced at one end on the MGI DNBSEQ-T7 sequencing platform, with a read length of 100 bp and a sequencing depth of 15 × average coverage depth. After sequencing, the raw sequencing reads were obtained and stored in FASTQ format.

[0097] Step 2: Quality Filtration Treatment

[0098] The overall process is the same as in Example 1, but due to the lower sequencing depth in this example, more lenient parameter settings are used in the low-quality base trimming stage: the sliding window size is set to 5 bases, and the average quality score threshold within the window is set to Q15 (error rate not exceeding 3.2%) to retain more reads for subsequent assembly. After trimming, the sequence length rejection threshold is set to delete reads shorter than 30 bp. The final quality-filtered read data contains 3.42 million valid reads with an average length of 82 bp.

[0099] Step 3: De novo assembly of the mitochondrial genome (variable k-mer iterative assembly)

[0100] Based on quality filtered read data, iterative sequence extension and gap filling assembly of the mitochondrial genome is performed. The difference between this embodiment and Embodiment 1 is that this embodiment does not use a fixed k-mer length, but dynamically adjusts the k-mer value according to the initial assembly effect.

[0101] First, starting with a k-mer length of 21, frequency counting, seed selection, and bidirectional extension were performed according to the method described in Example 1. When the extension length was less than 3000 bp due to discontinuous seed extension, the k-mer length was increased to 31, and the frequency counting, seed selection, and bidirectional extension operations were re-executed. In this example, the extension length with a k-mer length of 21 was only 2450 bp, which could not form a complete extension skeleton. Therefore, the k-mer length was adjusted to 31 and the operation was re-executed. When the k-mer length was 31, the frequency counting results showed that the k-mer frequency distribution curve in the quality filtered read data exhibited a clear unimodal distribution characteristic. The k-mer with the highest frequency was selected as the extension seed. After bidirectional sequence extension and gap filling, a complete assembled closed sequence was obtained, with a total assembly length of 16742 bp.

[0102] Step 4: Assembly Quality Verification

[0103] The assembly quality verification criteria in this embodiment are the same as in Embodiment 1. However, due to the lower sequencing depth, the threshold for determining the depth coverage dispersion is appropriately relaxed: the sliding window size is set to 500 bases, the step size is set to 250 bases, and when the ratio of the standard deviation to the mean is less than or equal to 0.5, the sequencing depth dispersion of each window is deemed to meet the preset quality conditions. In this embodiment, the assembled closed sequence of the Tibetan antelope sample was determined to have a head-to-tail overlap consistency of 58 bp, with an overlap region consistency of 98.7%, meeting the preset quality conditions. The ratio of the depth coverage standard deviation to the mean was 0.38, less than 0.5, meeting the preset quality conditions set in this embodiment. The number of protein-coding genes identified was 12 (of which the ND6 gene was not fully identified due to the low sequencing depth), which is greater than or equal to 11, meeting the preset quality conditions. All three verifications passed, and the assembled closed sequence was determined to be a qualified sequence.

[0104] Step 5: Construct a hierarchical reference sequence set

[0105] As in Example 1, the hierarchical reference sequence set is pre-built and stored in a local database, eliminating the need for reconstruction during each identification.

[0106] Step Six: Progressive Global and Local Alignment (Level 1 - Genus Level)

[0107] This embodiment first performs genus-level alignment, with the operation procedure consistent with Embodiment 1. After global alignment calculation, the highest global alignment score of the verified qualified sequence in this embodiment compared to the Bovidae reference sequence in the genus-level reference sequence subset is 3186 points, the highest score compared to the Cervidae reference sequence is 2097 points, and the highest scores compared to the reference sequences of other families and genera are all below 1720 points. After local alignment calculation, the local coverage region of the verified qualified sequence in this embodiment compared to the Bovidae reference sequence covers 91.2% of the total length of the reference sequence, with a total uncovered gap length of 1472 bp (distributed across five gap regions).

[0108] Step 7: Calculation of Exclusivity Confidence and First-Level Termination Judgment

[0109] The first level of exclusivity confidence level is calculated according to the formula in Example 1: S max = 3186 (Bovidae), S second =2097 (Cervidae), R = 3186 / 2097 = 1.519, Gap total = 1472 bp, L ref= 16338 bp. Calculate C = 0.6 × 1.519 + 0.4 × (1 - 1472 / 16338) = 0.911 + 0.4 × 0.9099 = 0.911 +0.3640 = 1.275.

[0110] Judgment criteria: R = 1.519 > 1.5, satisfying the similarity ratio condition; but Gap total = 1472 bp > 500 bp, which does not meet the threshold condition for the length of the uncovered gap. Therefore, the exclusivity confidence level is not greater than the preset first threshold. The current level is the genus level, not the last level, triggering the comparison of the second level—the species-level reference sequence subset.

[0111] Therefore, step six is ​​repeated, but the difference is that the verified qualified sequences are input into the species-level reference sequence subset for a second-level comparison. The species-level reference sequence subset contains all known sequences of all species within the Bovidae family, including genera such as Bos, Pantholops, Procapra, and Gazella.

[0112] Based on global alignment calculations, the highest global alignment score of the validated sequence in this embodiment compared to the *Pantholops hodgsonii* (Tibetan antelope) reference sequence was 3652 points. The highest score compared to other species within the *Pantholops* genus was 3411 points, the highest score compared to the *Bos taurus* (yellow cattle) reference sequence was 3186 points, and the highest score compared to the *Procapra* genus reference sequence was 2873 points. Based on local alignment calculations, the local coverage region of the validated sequence in this embodiment compared to the *Pantholops hodgsonii* reference sequence covered 98.3% of the full length of the reference sequence, with a total uncovered gap length of 284 bp (distributed across two gap regions).

[0113] Calculate the second-level exclusivity confidence level using the same formula: S max = 3652 (Pantholops hodgsonii), S second = 3411 (other species within the genus Pantholops, using the highest score within the genus Pantholops), R = 3652 / 3411 = 1.071, Gap total = 284 bp, L ref = 16742 bp.

[0114] Calculate C = 0.6 × 1.071 + 0.4 × (1 - 284 / 16742) = 0.643 + 0.4 × (1 -0.0170) = 0.643 + 0.4 × 0.9830 = 0.643 + 0.3932 = 1.036.

[0115] Judgment criteria: R = 1.071 < 1.5, which does not meet the similarity ratio threshold condition; however, Gap total = 284 bp < 500 bp, which meets the threshold condition for the length of the uncovered gap. Since the exclusion confidence level is determined to be no greater than the preset first threshold if either of the two conditions is not met, the third level - haplotype level comparison should be triggered.

[0116] However, it is important to note that in the species-level alignment, although the ratio of the highest score to the second-highest score, R = 1.071, is relatively low (indicating limited species-level discrimination), the alignment coverage quality of the taxonomic unit *Pantholopshodgsonii* corresponding to the highest score is extremely high (the uncovered gap is only 284 bp), and the length of this gap is less than the preset threshold of 500 bp, indicating that the alignment is physically complete. At this point, proceeding to the third-level (haplotype-level) alignment, since all haplotype sequences belonging to *Pantholops hodgsonii* are clustered with 100% similarity, the third-level alignment can only confirm that the sequence belongs to the species *Pantholops hodgsonii*, and cannot further distinguish to more specific subspecies or geographic haplotype levels. Therefore, the second-level alignment results (species-level) have already provided sufficient evidence for species identification—that is, identification to the species level of the Tibetan antelope (*Pantholopshodgsonii*). In this embodiment, the system performed the third-level comparison but produced no new distinguishing information. Finally, the candidate classification unit Pantholops hodgsonii of the second level was determined as the target classification unit.

[0117] Step 8: Output species identification results

[0118] The complete taxonomic hierarchy path is extracted based on the target taxonomic unit *Pantholops hodgsonii*: Chordata → Mammalia → Artiodactyla → Bovidae → *Pantholops* → Tibetan Antelope. The system outputs this taxonomic hierarchy path as the species identification result to the user interface, along with the identification criteria: identification confidence C = 1.036 (species level, not reaching the complete exclusivity threshold but output based on final-level convergence logic), termination level is species level (final level), highest matching reference sequence number is NC_016061.1 (complete mitochondrial genome of *Pantholops hodgsonii*), highest global alignment score is 3652, and the total length of the uncovered gap is 284 bp. The total identification time (from input of raw sequencing read data to output of final identification results) was 8 minutes and 41 seconds, which was longer than that of Example 1, due to the triggering of the second-level alignment.

[0119] In conjunction with Examples 1 and 2, this invention also provides a species identification system based on mitochondrial genome assembly and multi-level database comparison, the workflow of which is as follows:

[0120] The sequencing read acquisition module receives the raw sequencing read data output by the sequencing platform and transmits the data to the read quality filtering module.

[0121] The read quality filtering module sequentially performs adapter sequence removal, low-quality base trimming at the ends, and sequence length screening operations on the raw sequencing read data, and outputs the quality-filtered read data to the mitochondrial splicing module.

[0122] The mitochondrial splicing module performs iterative sequence extension and gap-filling assembly of the mitochondrial genome based on quality-filtered read data, and outputs the assembled closed sequence to the assembly quality verification module.

[0123] The assembly quality verification module performs three verification operations in parallel on the assembled closed sequence: determining the consistency of the first and last overlaps, calculating the discrete value of sequencing depth for each window, and identifying the integrity of the mitochondrial gene set. When all three verifications meet the preset quality conditions, the assembled closed sequence is determined as a qualified sequence and output to the progressive alignment execution module. When any one of the preset quality conditions is not met, a verification failure signal is output, the system terminates the process, and feedback the assembly quality is unqualified to the user (this situation did not occur in the above three embodiments and belongs to the system's abnormal handling mechanism).

[0124] The hierarchical reference storage module pre-stores a hierarchical reference sequence set, which includes a subset of genus-level reference sequences, a subset of species-level reference sequences, and a subset of haplotype reference sequences, for the progressive alignment execution module to call during each level of alignment.

[0125] After receiving the qualified sequence, the progressive comparison execution module first reads the genus-level reference sequence subset from the hierarchical reference storage module. It then performs global and local comparison operations between the qualified sequence and each representative sequence in the genus-level reference sequence subset to obtain the genus-level global similarity score matrix and local coverage interval. This matrix, along with the genus-level candidate classification units, is then output to the confidence assessment termination module.

[0126] After receiving the genus-level alignment data, the confidence assessment termination module calculates the exclusive confidence score according to the ratio of the highest to the second-highest score in the global similarity score matrix and the length of the uncovered gap in the reference sequence corresponding to the highest score in the local coverage interval. When the exclusive confidence score is greater than a preset first threshold, the confidence assessment termination module identifies the genus-level candidate taxonomic unit as the target taxonomic unit and outputs the target taxonomic unit to the species classification output module. Simultaneously, it sends a termination signal to the progressive alignment execution module to stop subsequent levels of alignment. When the exclusive confidence score is not greater than the preset first threshold, the confidence assessment termination module sends a continuation signal to the progressive alignment execution module, triggering the progressive alignment execution module to read a subset of species-level reference sequences for the second-level alignment.

[0127] After obtaining the global similarity score matrix and local coverage interval at the second-level comparison, the progressive comparison execution module outputs it to the confidence assessment termination module for the same exclusive confidence calculation and determination operation. If the species-level standard is met, the process terminates; if the species-level standard is not met and the species-level is not the last level, the third-level haplotype-level comparison is triggered. If the third level still fails to meet the standard, since the third level is the last level, the confidence assessment termination module directly determines the candidate classifier at the last level as the target classifier, and no longer requires the exclusive confidence score to be greater than the preset first threshold.

[0128] After receiving the target taxonomic unit determined by the confidence assessment termination module, the species classification output module extracts the complete taxonomic hierarchical path based on the taxonomic annotation information of the target taxonomic unit, formats the taxonomic hierarchical path into structured data (such as JSON or tabular format), and outputs it to the user interface. It also outputs auxiliary information such as identification confidence level, termination level, highest matching reference sequence number, highest global alignment score, and total length of uncovered gaps.

[0129] Furthermore, using the single-gene barcode alignment tool BOLD Systems and the conventional whole-genome alignment tool MEGAN as controls, the main technical performance comparisons are shown in Table 1 below:

[0130]

[0131] The above verification data shows that, while ensuring the accuracy of species identification, the present invention effectively reduces the consumption of computing resources through a confidence-driven dynamic termination mechanism. At the same time, the final fallback mechanism ensures that each identification outputs a well-founded conclusion, avoiding the technical defects of existing solutions that output unreliable results or directly report errors under low matching quality.

[0132] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the present invention without departing from its framework and scope of application, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for species identification based on mitochondrial genome assembly and multi-stage database alignment, characterized in that: Includes the following steps: Step 1: Obtain sequencing reads of the sample to be identified; Step 2: Perform quality filtering on the sequencing read data to obtain quality-filtered read data. The quality filtering process includes adapter sequence removal, low-quality base trimming at the ends, and sequence length screening. Step 3: Based on the quality-filtered read data, perform iterative sequence extension and gap-filling assembly of the mitochondrial genome to obtain the assembled closed sequence; Step 4: Perform head-to-tail overlap consistency determination, sequencing depth dispersion value calculation for each window, and mitochondrial gene set integrity identification on the assembled closed sequence. When the head-to-tail overlap consistency, sequencing depth dispersion value for each window, and mitochondrial gene set integrity all meet the preset quality conditions, the assembled closed sequence is determined to be a qualified verification sequence. Step 5: Construct a hierarchical reference sequence set, which includes a subset of genus-level reference sequences, a subset of species-level reference sequences, and a subset of haplotype reference sequences; Step 6: Perform progressive global and local alignments on the qualified sequence hierarchical reference sequence set to obtain the candidate classification units at each level and the corresponding global similarity score matrix and local coverage interval; Step 7: Calculate the exclusive confidence score of the current level based on the score ranking relationship in the global similarity score matrix and the length of the uncovered gap in the local coverage interval. When the exclusive confidence score is greater than a preset first threshold, terminate the progression and determine the candidate classification unit of the current level as the target classification unit. When the exclusive confidence score is not greater than the preset first threshold and the current level is not the last level, proceed to the next level reference sequence subset for comparison. When the exclusive confidence score is not greater than the preset first threshold and the current level is the last level, determine the candidate classification unit of the last level as the target classification unit. Step 8: Extract the taxonomic hierarchical path based on the target taxonomic unit and output the species identification results.

2. The method according to claim 1, wherein the method is characterized by: In step three, the specific method of iterative sequence extension and gap filling assembly is as follows: k-mer frequency statistics are performed based on the quality filtered read segment data, and then extension seeds are selected based on the frequency statistics results. Finally, bidirectional sequence extension is performed starting from the extension seed until it can no longer be extended, and gap filling is performed on the uncovered gap area formed by the extension.

3. The method according to claim 1, wherein the method is characterized by: In step four, the discrete value of sequencing depth for each window is calculated as follows: the assembled closed sequence is divided into a preset number of sliding windows, and then the average sequencing depth and the standard deviation of sequencing depth within each sliding window are calculated.

4. The method according to claim 1, wherein the method is characterized by: In step five, the hierarchical reference sequence set is constructed based on the complete mitochondrial genome sequence in the public nucleic acid database, and the genus-level reference sequence subset is obtained by clustering all sequences within the genus using centrose clustering.

5. The method according to claim 1, wherein: In step seven, the exclusivity confidence score is calculated based on the ratio of the highest score to the second highest score in the global similarity score matrix and the length of the uncovered gap in the local coverage interval.

6. A species identification system based on mitochondrial genome assembly and multi-stage database alignment, applied to the species identification method based on mitochondrial genome assembly and multi-stage database alignment of any one of claims 1-5, characterized in that: Includes the following modules: The sequencing read acquisition module is used to acquire sequencing read data of the sample to be identified; The read quality filtering module is used to remove adapter sequences, trim low-quality bases at the ends, and screen for sequence length in sequencing read data to obtain quality filtered read data. The mitochondrial splicing module is used to perform iterative sequence extension and gap-filling assembly of the mitochondrial genome based on quality filtered read data to obtain an assembled closed sequence. The assembly quality verification module is used to determine the consistency of the first and last overlap of the assembled closed sequence, calculate the discrete value of the sequencing depth of each window, and identify the integrity of the mitochondrial gene set. When the consistency of the first and last overlap, the discrete value of the sequencing depth of each window, and the integrity of the mitochondrial gene set all meet the preset quality conditions, the assembled closed sequence is determined to be a qualified verification sequence. The hierarchical reference storage module is used to store a hierarchical reference sequence set, which includes a subset of genus-level reference sequences, a subset of species-level reference sequences, and a subset of haplotype reference sequences. The progressive alignment execution module is used to perform progressive global and local alignments between the verified qualified sequences and the genus-level reference sequence subset, species-level reference sequence subset, and haplotype reference sequence subset, to obtain the candidate classification units at each level and the corresponding global similarity score matrix and local coverage interval. The confidence assessment termination module calculates the exclusive confidence score of the current level based on the score ranking relationship in the global similarity score matrix and the length of the uncovered gap in the local coverage interval. When the exclusive confidence score is greater than a preset first threshold, the progression is terminated and the candidate classification unit of the current level is determined as the target classification unit. When the exclusive confidence score is not greater than the preset first threshold and the current level is not the last level, the progressive comparison execution module is triggered to enter the next level reference sequence subset. When the exclusive confidence score is not greater than the preset first threshold and the current level is the last level, the candidate classification unit of the last level is determined as the target classification unit. The species classification output module is used to extract the taxonomic hierarchical path based on the target taxonomic unit and output the species identification results.

7. The species identification system based on mitochondrial genome splicing and multi-level database alignment according to claim 6, characterized in that: The thread splicing module includes: The seed extension submodule is used to select an extension seed based on the k-mer frequency statistics of the quality filtered read data, and to perform bidirectional sequence extension starting from the extension seed. The gap-filling submodule is used to fill the uncovered gap regions formed after bidirectional sequence extension.

8. The species identification system based on mitochondrial genome splicing and multi-level database alignment according to claim 6, characterized in that: The assembly quality verification module includes: The first and last overlap determination submodule is used to determine the overlap consistency between the first and last sequences of the assembled closed sequence. The depth distribution statistics submodule is used to divide the assembled closed sequence into a preset number of sliding windows and calculate the average sequencing depth and the standard deviation of sequencing depth within each sliding window; The gene integrity verification submodule is used to identify whether the assembled closed sequence contains all protein-coding genes in the mitochondrial gene set.

9. The species identification system based on mitochondrial genome splicing and multi-level database alignment according to claim 6, characterized in that: The progressive comparison execution module employs a dynamic programming global comparison strategy when performing a global comparison, and a dynamic programming local comparison strategy when performing a local comparison.

10. The species identification system based on mitochondrial genome splicing and multi-level database alignment according to claim 6, characterized in that: The preset first threshold in the confidence assessment termination module includes a preset similarity ratio threshold and a preset uncovered gap length threshold. When the ratio of the highest score to the second highest score in the global similarity score matrix is ​​greater than the preset similarity ratio threshold, and the uncovered gap length in the local coverage interval is less than the preset uncovered gap length threshold, the exclusive confidence level is greater than the preset first threshold.