Method and apparatus for whole genome sequencing assembly of plasmid-containing bacteria
Patent Information
- Application Number
- CN202611106061.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-24
- Publication Date
- 2026-10-13
- Estimated Expiration
- 2046-07-24
AI Technical Summary
这些同源序列的存在给组装过程带来了显著挑战
[0016]本申请提供的含质粒细菌全基因组测序拼接整合方法和装置,对含质粒细菌样品的脱氧核糖核酸测序得到长读长数据和短读长数据,将长读长数据与已知参考质粒序列进行迭代比对,基于迭代比对结果筛选质粒部分读段和染色体部分读段,迭代比对过程根据各窗口覆盖深度相对于平均值的偏离程度动态调整比对参数,使得质粒部分读段和染色体部分读段得以准确分离,避免了常规混合组装中质粒被吸收丢失或形成假的多聚体质粒构型;分别独立组装质粒和染色体,再合并并用短读长数据校正,最终获得高质量的全基因组序列;通过参考质粒序列引导迭代对比、自适应迭代参数调整和分别独立组装的组合策略,有效解决了含质粒细菌基因组中因质粒与染色体存在同源序列而导致的读段误分问题,实现了质粒与染色体的准确分离与高质量拼接整合,无需依赖单独的质粒提取测序,提高了基因组装的准确性和可靠性。
Smart Images

Figure CN122619111B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of genetic engineering technology, and in particular to a method and apparatus for sequencing, splicing and integrating the whole genome of bacteria containing plasmids. Background Technology
[0002] Plasmids, as commonly used vectors, are widely applied to the expression and delivery of exogenous genes. However, traditional plasmid expression systems have limitations such as genetic instability and reliance on antibiotic selection. To overcome these shortcomings, integrating the target gene into the host chromosome has become a better strategy. Among these, homologous recombination, site-specific recombination, and transposon-mediated gene transposition techniques have been successfully applied to chromosome integration in model strains such as Escherichia coli.
[0003] For bacteria containing plasmids, conventional genome assembly procedures typically employ a hybrid assembly strategy: first, long-read sequencing data is used to construct the genome backbone, followed by base correction using short-read data. However, in practical applications, the plasmid sequences of engineered strains often contain regions highly homologous to chromosomes, such as insertion sequences, resistance genes, or metabolic pathway genes. The presence of these homologous sequences poses a significant challenge to the assembly process.
[0004] Therefore, how to effectively handle homology interference between plasmids and chromosomes and improve the accuracy and reliability of genome assembly has become a technical problem that the industry urgently needs to solve. Summary of the Invention
[0005] This application provides a method and apparatus for sequencing, assembling, and integrating a bacterial whole genome containing plasmids, which addresses the technical problem of effectively handling homology interference between plasmids and chromosomes and improving the accuracy and reliability of genome assembly.
[0006] This application provides a method for sequencing, assembling, and integrating the whole genome of bacteria containing plasmids, including: Deoxyribonucleic acid was extracted from bacterial samples containing plasmids, and long-read and short-read data were obtained after sequencing. The long read data is iteratively aligned with a known reference plasmid sequence, and plasmid partial reads and chromosome partial reads are selected based on the iterative alignment results. The iterative alignment includes: aligning the long read data with a known reference plasmid sequence, dividing the known reference plasmid sequence into continuous windows, dynamically adjusting the alignment parameters based on the deviation of the coverage depth of each window from the average coverage depth, and re-aligning until the coverage depth of each window tends to stabilize. A plasmid cycle-consistent sequence is constructed based on the plasmid partial reads, and a chromosome sequence is constructed based on the chromosome partial reads. The initial whole genome is obtained by merging the plasmid circularly consistent sequence and the chromosome sequence, and the initial whole genome is corrected based on the short read data to obtain the whole genome sequence of the plasmid-containing bacteria.
[0007] In some embodiments, the step of iteratively aligning the long read data with a known reference plasmid sequence and filtering plasmid partial reads and chromosome partial reads based on the iterative alignment results includes: The long read data is initially aligned with a known reference plasmid sequence; The known reference plasmid sequence is divided into multiple consecutive windows of a fixed size, and the coverage depth of each window is calculated. Based on the degree of deviation of the coverage depth of each window from the average coverage depth, a first abnormal region with excessively high coverage depth and a second abnormal region with excessively low coverage depth are identified. The comparison parameters for the first abnormal region and the second abnormal region are adjusted respectively, and the comparison is performed again. When the coverage depth of each window tends to stabilize, candidate reads that meet the preset conditions are selected from the final alignment results as plasmid partial reads, and the remaining reads are chromosome partial reads.
[0008] In some embodiments, determining abnormal regions with excessively high coverage depth and abnormal regions with excessively low coverage depth based on the deviation of the coverage depth of each window from the average coverage depth includes: Based on the coverage depth of each window, determine the average coverage depth and standard deviation; Based on the average coverage depth and standard deviation, a first deviation threshold and a second deviation threshold are determined; the first deviation threshold is greater than the second deviation threshold. The window with a coverage depth greater than the first deviation threshold is identified as the first abnormal region; Windows with a coverage depth less than the second deviation threshold are identified as the second abnormal region.
[0009] In some embodiments, the comparison parameters include a matching degree threshold and a maximum number of empty spaces allowed; The step of adjusting the comparison parameters for the first abnormal region and the second abnormal region respectively and re-comparing includes: For the first abnormal region, increase the matching degree threshold and decrease the maximum number of empty spaces allowed. For the second abnormal region, the matching degree threshold is lowered and the maximum number of empty slots allowed is increased.
[0010] In some embodiments, the convergence condition for the coverage depth of each window to stabilize is: The deviation between the coverage depth of each window and the average coverage depth is less than a preset threshold, or the number of iterations reaches a preset number of iterations.
[0011] In some embodiments, the preset conditions are determined based on at least one of alignment length, the proportion of the known reference plasmid sequence covered, and alignment quality value.
[0012] In some embodiments, constructing a plasmid cycle-consistent sequence based on the plasmid partial reads includes: Based on the alignment position information of the partial reads of the plasmid, the corresponding sequence information is extracted from the long read data to obtain the plasmid-related read set; The reads in the plasmid-related read set are compared pairwise to determine the overlap between reads; Using the read segments as nodes and the overlap relationships between read segments as edges, an overlap graph is constructed. In the overlap graph, strongly connected components used to form a loop path are identified. Based on the distribution of the start and end positions of each read segment, the real loop structure and the tandem repeat artifact are distinguished. Multiple sequence alignment is performed on the read segments on the loop path and consensus bases are determined. The plasmid cycle consensus sequence is output. The plasmid cycle-consistent sequence was verified based on the known reference plasmid sequence.
[0013] In some embodiments, constructing a chromosome sequence based on the partial chromosome reads includes: The chromosome partial reads are cut into a series of overlapping short segments according to a fixed base length; A network graph is constructed using the short segments as nodes; the edge between two nodes in the network graph represents the adjacent occurrence of the corresponding short segments in any partial read of a chromosome. Starting from any node in the network graph, traverse along the direction of the edge. If each node on any path has only one predecessor node and one successor node, the short segments corresponding to each node on any path are spliced together in order to obtain the initial segment. Each chromosome partial read is compared with the initial fragment set to determine the target chromosome partial read that simultaneously covers at least two initial fragments. The at least two initial fragments are then joined together based on their order in the target chromosome partial read to obtain a continuous sequence. Based on the terminal sequences of the remaining chromosome partial reads and the starting region of the initial fragment, the connection positions of the remaining chromosome partial reads in the continuous sequence are determined and connected to obtain the chromosome sequence.
[0014] In some embodiments, the correction of the initial whole genome based on the short read data includes: The short read data is mapped to the initial whole genome to generate an alignment result file containing the alignment position, alignment quality value and mismatch or gap information of each read segment in the short read data. Traverse each site on the initial whole genome, and based on the alignment result file, count the number of reads covering each site, the base types carried by the reads, and the alignment quality value to determine the pairing relationship of the reads and the length distribution of the inserted fragments; For the current site on the initial whole genome, if a single nucleotide variant or error is determined to exist at the current site based on the number of reads covering the current site, the base types carried by the reads, and the alignment quality value, base correction is performed on the current site; if a continuous insertion or deletion signal is detected in the reads covering the current site, the initial whole genome is adjusted based on the reads covering the current site. Based on the pairwise pairing information of each read segment in the short read data, the sequence assembly errors of the initial whole genome are identified and corrected; Repeat the above correction process, using the initial whole genome corrected in the current round as the initial whole genome to be corrected in the next round, until the number of correction sites detected between two consecutive rounds is less than the preset threshold, or the correction process reaches the preset number of correction rounds.
[0015] This application provides a plasmid-containing bacterial whole genome sequencing assembly and integration device, comprising: The sequencing module is used to extract deoxyribonucleic acid from bacterial samples containing plasmids, and after sequencing, long read data and short read data are obtained. The filtering module is used to iteratively align the long read data with a known reference plasmid sequence, and filter plasmid partial reads and chromosome partial reads based on the iterative alignment results. The iterative alignment includes: aligning the long read data with a known reference plasmid sequence, dividing the known reference plasmid sequence into continuous windows, dynamically adjusting the alignment parameters based on the deviation of the coverage depth of each window from the average coverage depth, and re-aligning until the coverage depth of each window tends to stabilize. The construction module is used to construct a plasmid cycle-consistent sequence based on the plasmid partial reads and to construct a chromosome sequence based on the chromosome partial reads; The correction module is used to merge the plasmid cycle-consistent sequence and the chromosome sequence to obtain an initial whole genome, and to correct the initial whole genome based on the short read data to obtain the whole genome sequence of the plasmid-containing bacteria.
[0016] The method and apparatus for assembling and integrating plasmid-containing bacterial whole genome sequencing provided in this application obtain long-read and short-read data from the deoxyribonucleic acid sequencing of plasmid-containing bacterial samples. The long-read data is iteratively compared with a known reference plasmid sequence. Based on the iterative comparison results, partial plasmid reads and partial chromosome reads are selected. The iterative comparison process dynamically adjusts the comparison parameters according to the deviation of the coverage depth of each window from the average value, ensuring accurate separation of plasmid and chromosome reads and avoiding plasmid absorption loss or the formation of false multimeric plasmid configurations in conventional mixed assembly. The plasmid and chromosome are assembled independently, then merged and corrected using short-read data to finally obtain a high-quality whole genome sequence. Through a combination of reference plasmid sequence-guided iterative comparison, adaptive iterative parameter adjustment, and independent assembly, the method effectively solves the problem of read misclassification caused by homologous sequences between plasmids and chromosomes in plasmid-containing bacterial genomes. It achieves accurate separation and high-quality assembly of plasmids and chromosomes without relying on separate plasmid extraction and sequencing, improving the accuracy and reliability of genome assembly. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0018] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating the plasmid-containing bacterial whole-genome sequencing, splicing, and integration method provided in this application.
[0020] Figure 2 This is a schematic diagram of the structure of the plasmid-containing bacterial whole genome sequencing assembly and integration device provided in this application.
[0021] Figure 3 This is a schematic diagram of the structure of the electronic device provided in this application. Detailed Implementation
[0022] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0023] It should be noted that the terms "first," "second," etc., used in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps, units, or modules is not necessarily limited to those explicitly listed, but may include other steps, units, or modules not explicitly listed or inherent to such processes, methods, products, or devices.
[0024] In related technologies, genome assembly methods are prone to incorrectly incorporating sequences shared by plasmids and chromosomes into the chromosome assembly results, leading to plasmid "absorption" and loss. Alternatively, long reads spanning multiple plasmid copies can form tandem repeats, causing assembly algorithms to incorrectly output multimeric plasmid conformations. Furthermore, the significant difference between the high coverage depth of multi-copy plasmids and chromosome coverage depth makes it difficult for many assembly tools to accurately distinguish between true multi-copy sequences and sequencing errors when processing repetitive regions, ultimately resulting in plasmid sequence breaks, deletions, or incorrect integration. Some methods require extracting plasmids for separate sequencing before combining them with chromosome sequences, relying on plasmid extraction techniques. However, in certain scenarios, such as sequencing engineered bacteria used in food raw material production, to ensure data reliability, it is necessary to sequence the strain's chromosome and plasmid together, rendering these methods of extracting plasmids first and then sequencing unsuitable.
[0025] In order to address the shortcomings of related technologies, Figure 1 This is a flowchart illustrating the plasmid-containing bacterial whole-genome sequencing, assembly, and integration method provided in this application, as shown below. Figure 1 As shown, the method includes steps 110, 120, 130 and 140.
[0026] Step 110: Extract deoxyribonucleic acid from the bacterial sample containing plasmids, and obtain long read data and short read data after sequencing.
[0027] Specifically, the entity executing the plasmid-containing bacterial whole-genome sequencing assembly and integration method provided in this application is a plasmid-containing bacterial whole-genome sequencing assembly and integration system. This system can be implemented through software, such as a plasmid-containing bacterial whole-genome sequencing assembly and integration program; or it can be a device for executing the plasmid-containing bacterial whole-genome sequencing assembly and integration method, such as a terminal, computer, or server.
[0028] Plasmid-containing bacterial samples refer to bacterial samples containing the target plasmid, such as *Escherichia coli* strains. The strain is inoculated into a suitable liquid culture medium and cultured at a suitable temperature (e.g., 37°C) for an appropriate time (e.g., 16 hours), and the bacterial cells are collected. Then, conventional deoxyribonucleic acid (DNA) extraction methods (e.g., proteinase K treatment, phenol-chloroform extraction, or commercial kit methods) are used to simultaneously extract the bacterial chromosomal DNA and plasmid DNA. After extraction, purification can be performed using a column purifier or magnetic bead purification method, and the DNA concentration can be measured using a quantitative fluorescence instrument or a nano-amplifier kit. The degree of DNA methylation can also be measured as needed.
[0029] The extracted DNA is sequenced, yielding two types of sequencing data: long-read data, obtained using third-generation sequencing technologies (such as PacBio HiFi and Oxford Nanopore), typically with individual read lengths exceeding several thousand base pairs (kb). Long-read data can span repetitive and structurally variable regions, aiding in genome assembly and structural variation detection. Short-read data, obtained using second-generation sequencing technologies (such as Illumina paired-end sequencing), features shorter individual read lengths (typically 150–300 bp, where bp represents a base pair) but higher base quality (e.g., Q30 or higher). Short-read data is primarily used for genome correction to improve sequence base accuracy.
[0030] In this step, the raw data obtained from sequencing needs to be preprocessed, including removing adapter sequences, low-quality bases (such as bases with a quality value lower than Q20), and filtering out excessively short reads (such as reads with a length of less than 500 bp) to obtain high-quality long read data and short read data.
[0031] Step 120: Iteratively align the long read data with the known reference plasmid sequence, and screen plasmid partial reads and chromosome partial reads based on the iterative alignment results; the iterative alignment includes: aligning the long read data with the known reference plasmid sequence, dividing the known reference plasmid sequence into continuous windows, dynamically adjusting the alignment parameters based on the deviation of the coverage depth of each window from the average coverage depth, and re-aligning until the coverage depth of each window tends to stabilize.
[0032] Specifically, first, a known reference plasmid sequence is selected. This sequence can be a known plasmid sequence highly homologous to or identical to the target plasmid, or a plasmid reference sequence obtained through previous experiments. The preprocessed long read data is then initially aligned with this reference plasmid sequence. The alignment algorithm can employ a local alignment algorithm based on hash indexes. The initial alignment parameters can be set to standard default parameters, such as a matching threshold (minimum sequence consistency) of 80%, a maximum allowed number of gaps of 5% of the read length, and a minimum alignment length of 1 kb. After alignment, information such as the alignment position, alignment length, and alignment quality value of each long read on the reference plasmid is obtained.
[0033] Then, the known reference plasmid sequence is divided into multiple consecutive windows of fixed size. The window size can be set according to actual conditions, such as 500 bp, 1000 bp, or 2000 bp. The depth to which each window is completely covered by reads (i.e., coverage depth, which refers to the number of long reads that can completely cover the window region, reflecting the frequency of that window region being read in the sequencing data) is calculated. The average coverage depth of all windows is then calculated. and standard deviation For each window, calculate the deviation of its coverage depth from the average coverage depth, for example, by means of a difference or ratio. If the coverage depth of a window deviates significantly from the average (e.g., higher than the average),... or below If the coverage is too high, the window is marked as an abnormal region. Regions with excessively high coverage may be due to homologous sequences on the chromosome being incorrectly aligned to the plasmid reference sequence, resulting in false high coverage; regions with excessively low coverage may be due to sequence variations (such as mutations, insertions, or deletions) in the plasmid in that region, causing the true plasmid reads to fail to align successfully.
[0034] For anomalous regions, the alignment parameters are dynamically adjusted. For windows with excessively high coverage, the matching threshold is appropriately increased (e.g., from 80% to 85%~90%), and the maximum allowed number of gaps is decreased (e.g., from 5% of the read length to 2%) to improve alignment strictness and reduce false matches from chromosomes. For windows with excessively low coverage, the matching threshold is appropriately decreased (e.g., from 80% to 75%~80%), and the maximum allowed number of gaps is increased (e.g., to 8%~10% of the read length) to improve alignment sensitivity and capture true plasmid reads that fail to match due to sequence variations. After adjusting the parameters, only the long reads containing the anomalous regions are re-aligned locally, or the entire dataset is re-aligned globally. Then, the coverage depth of each window is recalculated, and the process of anomalous region identification and parameter adjustment is repeated until the deviation of the coverage depth of all windows from the average coverage depth is less than a certain preset threshold (e.g., less than 1.5 times the standard deviation), or the number of iterations reaches a preset maximum (e.g., 5 times). At this point, the coverage depth of each window is considered to have stabilized, and the alignment result obtained in the last iteration is the high-confidence alignment result.
[0035] Reads that meet preset criteria are selected from the final alignment results and designated as plasmid partial reads. These criteria may include: alignment length exceeding a certain threshold (e.g., 1 kb), coverage of the reference plasmid sequence exceeding a certain threshold (e.g., 80%), and a Mapping Quality (MAPQ) value not lower than a certain threshold (e.g., 10). Reads meeting these criteria are considered to originate from the plasmid with high confidence and are classified as plasmid partial reads. The remaining reads that do not meet the criteria (including unaligned reads and reads with low alignment quality) are designated as chromosome partial reads for subsequent chromosome assembly.
[0036] Step 130: Construct a plasmid cycle-consistent sequence based on partial plasmid reads, and construct a chromosome sequence based on partial chromosome reads.
[0037] Specifically, for partial plasmid reads, the Overlap-Layout-Consensus (OLC) assembly algorithm can be used to construct the circularly consistent sequence of the plasmid. Specifically, firstly, based on the alignment position information of the partial plasmid reads on the reference plasmid, the corresponding sequences are extracted from the original long-read data to obtain a set of plasmid-related reads. Then, these reads are paired to identify overlapping regions between reads (requiring sufficiently long overlap lengths and high sequence consistency), constructing an overlap graph. In the overlap graph, strongly connected components that can form a circular path are searched, and the distribution of the start and end positions of the reads is analyzed to distinguish between genuine circular plasmid structures and tandem repeat artifacts. Multiple sequence alignments are performed on all reads on the circular path, using a base voting model based on Poisson distribution or simple majority voting. The base with the highest frequency at each position is selected as the consensus base, finally outputting the circularly consistent sequence of the circular plasmid. The obtained cyclically consistent sequence can also be verified, for example, by breaking it at the start point and comparing it with the reference plasmid sequence. The sequence consistency should be no less than 99% and the length deviation should not exceed 5%. The end can be checked to see if it can overlap to form a closed loop.
[0038] For the selected chromosome partial reads, a de Bruijn graph-based assembly algorithm is used to construct chromosome sequences. Specifically, the chromosome partial reads are cut into a series of overlapping short segments (k-mers) with a fixed base length (e.g., 21 bp). Using these k-mers as nodes, if two k-mers appear adjacent in any original read, a directed edge is established between the corresponding nodes, constructing a network graph reflecting the overlapping relationships between reads. In the network graph, non-branching paths (i.e., linear chains where each node has only one predecessor and one successor) are compressed to obtain initial contigs. Since repetitive sequences in the chromosome cause bifurcation in the network, breaking the initial contigs at these positions, the scalability of the original long reads is utilized to connect these contigs: each chromosome partial read is compared with the set of initial contigs to find long reads that can simultaneously cover two or more initial contigs. These long reads provide evidence of the true adjacency relationships between different initial contigs, thereby connecting the originally broken contigs into a longer continuous sequence according to the order on the long reads. For the few remaining gaps, the terminal sequences of all remaining long reads and the starting regions of the initial fragments are further extracted. Bidirectional alignment identifies pairs where the read end highly coincides with the start of one fragment and the start of another fragment highly coincides with the end of the first fragment. This indicates that the two fragments are directly adjacent on the chromosome and are then joined. Through this layer-by-layer processing, a complete chromosomal skeleton sequence covering most of the chromosome is finally obtained. Short read data can also be used for local correction and gap filling of the chromosome skeleton to improve sequence accuracy.
[0039] Step 140: Merge the plasmid circularly consistent sequence and chromosome sequence to obtain the initial whole genome, and correct the initial whole genome based on short read data to obtain the whole genome sequence of the plasmid-containing bacteria.
[0040] Specifically, the obtained plasmid circularly consistent sequence is merged with the chromosome sequence into a single sequence file to obtain the initial whole genome sequence. This initial sequence may contain some base errors (such as single nucleotide variants, insertions, and deletions) or small-scale structural errors (such as local inversions and misaligned connections). Therefore, it is subjected to multiple rounds of correction using the obtained high-precision short-read data.
[0041] The correction process is as follows: First, short read data is mapped onto the initial whole genome sequence using an alignment algorithm based on hash indexing or Burrows-Wheeler transform, generating an alignment result file containing the alignment position, alignment quality, and mismatch or gap information for each read. Then, each site on the genome is traversed, and the number of reads covering that site, the base types carried by those reads, and their sequencing quality values are counted. Simultaneously, the pairing relationships of reads and the length distribution of inserted fragments are analyzed. For each site, a statistical model based on multinomial distribution or Bayesian probability is constructed to compare the base consistency of the currently assembled sequence with that of all covered reads: if more than a certain threshold (e.g., 70%) of reads support another base, and the median sequencing quality value of that base is higher than a certain value (e.g., 20), then a single nucleotide variant or error is identified at that site and corrected; if a large number of consecutive insertions or deletions are detected in a read, the sequence is adjusted based on the local alignment of the reads. In addition, the paired-end information of reads is used to identify and correct small-scale sequence assembly errors, such as local inversions or misaligned connections. The correction process is repeated in multiple rounds (usually 3 to 5 rounds). After each round, the sequence is updated, and the updated sequence is used as the input for the next round, until the number of correction sites detected between two consecutive rounds is less than a preset threshold (e.g., less than 10) or the maximum number of rounds is reached. Finally, the corrected whole genome sequence is obtained. Sequence format verification tools can also be used to verify the corrected whole genome, confirming the absence of structural errors such as sequence overlap and reverse complementation, and ensuring that the base insertion, deletion, and mutation rates of the whole genome are lower than preset standards by statistically comparing uncovered gap regions and uncorrected variant sites (e.g., ...). At the same time, it is required that the genome coverage of short read data be no less than 99.9% and the average sequencing depth be no less than 50, in order to ensure the reliability of the correction.
[0042] This completes the sequencing, assembly, and integration of the entire genome of the plasmid-containing bacteria.
[0043] The plasmid-containing bacterial whole-genome sequencing and assembly method provided in this application involves sequencing the deoxyribonucleic acid of plasmid-containing bacterial samples to obtain long-read and short-read data. The long-read data is iteratively compared with a known reference plasmid sequence. Based on the iterative comparison results, partial plasmid and chromosomal reads are selected. The iterative comparison process dynamically adjusts the comparison parameters according to the deviation of each window's coverage depth from the average value, ensuring accurate separation of plasmid and chromosomal reads. This avoids the absorption and loss of plasmids or the formation of false multimeric plasmid configurations during conventional mixed assembly. The plasmid and chromosome are assembled independently, then merged and corrected using short-read data to finally obtain a high-quality whole-genome sequence. Through a combination of reference plasmid sequence-guided iterative comparison, adaptive iterative parameter adjustment, and independent assembly, this method effectively solves the problem of read misclassification caused by homologous sequences between plasmids and chromosomes in plasmid-containing bacterial genomes. It achieves accurate separation and high-quality assembly of plasmids and chromosomes without relying on separate plasmid extraction and sequencing, improving the accuracy and reliability of genome assembly.
[0044] It should be noted that each implementation method of this application can be freely combined, rearranged, or executed individually, and does not need to rely on or depend on a fixed execution order.
[0045] In some embodiments, long-read data is iteratively aligned with a known reference plasmid sequence, and partial plasmid reads and partial chromosome reads are screened based on the iterative alignment results, including: The long read data is initially aligned with the known reference plasmid sequence; The known reference plasmid sequence is divided into multiple consecutive windows of a fixed size, and the coverage depth of each window is calculated. Based on the deviation of the coverage depth of each window from the average coverage depth, a first abnormal region with excessively high coverage depth and a second abnormal region with excessively low coverage depth are identified. The comparison parameters for the first and second abnormal regions are adjusted respectively, and the comparison is performed again. When the coverage depth of each window tends to stabilize, candidate reads that meet the preset conditions are selected from the final alignment results as plasmid partial reads, and the remaining reads are chromosome partial reads.
[0046] Specifically, long reads are initially aligned with known reference plasmid sequences. The initial alignment uses a local alignment algorithm based on hash indexes, such as the map-hifi mode of minimap2. Initial alignment parameters can be set to standard default parameters, such as a matching threshold (minimum sequence consistency) of 80%, a maximum allowed number of gaps of 5% of the read length, and a minimum alignment length of 1 kb. Through the initial alignment, information such as the alignment position, alignment length, and alignment quality value (MAPQ) of each long read on the reference plasmid is obtained. The alignment quality value (MAPQ) is a metric that measures the reliability of the read's alignment to the reference sequence; a higher value indicates a more reliable alignment.
[0047] The known reference plasmid sequence is divided into multiple continuous, non-overlapping intervals of fixed length, each interval being called a window. The size of the window can be set according to the actual situation, for example, it can be 500 bp, 1000 bp, or 2000 bp. For each window, the number of long reads that can completely cover the window region is counted, and the coverage depth of each window is obtained. Coverage depth refers to the number of long reads that can completely cover the window region within a specific window. Coverage depth reflects the frequency of reading of this region in the sequencing data and can be used to assess whether there are any abnormalities in this region.
[0048] Calculate the average coverage depth of all windows and standard deviation The average coverage depth is the arithmetic mean of the coverage depths of all windows, used to measure the overall sequencing coverage level of the entire reference plasmid sequence. The standard deviation measures the dispersion of the coverage depth of each window relative to the mean.
[0049] Calculate the degree of deviation of the coverage depth of each window from the average coverage depth. The degree of deviation refers to the magnitude of the difference between the coverage depth of each window and the average coverage depth, which can be expressed as a difference (window coverage depth – average coverage depth) or a multiple (window coverage depth / average coverage depth).
[0050] Based on the degree of deviation, two types of anomalous regions can be identified: the first type with excessively high coverage depth and the second type with excessively low coverage depth. For each type of anomalous region, the alignment parameters are adjusted and the alignment is re-performed. The alignment parameters include at least a matching threshold and the maximum allowed number of gaps.
[0051] After adjusting the parameters, perform a new local comparison on the long read segments containing the abnormal regions, or perform a new global comparison on the entire dataset. Then, repeat the above steps to re-divide the windows and calculate the coverage depth, and proceed to the next iteration.
[0052] After each iteration, the coverage depth of each window is recalculated, and abnormal regions are identified and parameters are adjusted again based on the new coverage depth distribution until the convergence condition is met. When the convergence condition is met, the coverage depth of each window is considered to have stabilized, and the alignment result obtained in the last iteration is the final alignment result.
[0053] Candidate reads that meet preset criteria are selected from the final alignment results and designated as plasmid partial reads. These criteria may include: alignment length exceeding a certain threshold (e.g., 1 kb), coverage of the reference plasmid sequence exceeding a certain threshold (e.g., 80%), and an alignment quality value (MAPQ) not lower than a certain threshold (e.g., 10). Reads meeting these criteria are considered to originate from the plasmid with high confidence and are classified as plasmid partial reads. The remaining reads that do not meet the criteria (including unaligned reads and reads with low alignment quality) are designated as chromosome partial reads for subsequent independent chromosome assembly.
[0054] The plasmid-containing bacterial whole-genome sequencing assembly and integration method provided in this application combines initial alignment, window division, coverage depth statistics, abnormal region identification and dynamic parameter adjustment, iterative optimization until convergence, and candidate read screening based on preset conditions. It can dynamically adjust the alignment parameters according to the actual distribution of coverage depth of each window, effectively overcome the read misclassification problem caused by homologous sequences between plasmids and chromosomes, and significantly improve the specificity and sensitivity of plasmid read screening.
[0055] In some embodiments, based on the degree of deviation of the coverage depth of each window from the average coverage depth, a first abnormal region with excessively high coverage depth and a second abnormal region with excessively low coverage depth are determined, including: Based on the coverage depth of each window, determine the average coverage depth and standard deviation; Based on the average coverage depth and standard deviation, a first deviation threshold and a second deviation threshold are determined; the first deviation threshold is greater than the second deviation threshold. Windows with a coverage depth greater than the first deviation threshold are identified as the first abnormal region; Windows with a coverage depth less than the second deviation threshold are identified as the second abnormal region.
[0056] Specifically, the first abnormal region refers to windows with excessively high coverage depth. These windows have a significantly higher coverage depth than average, usually due to misalignment of homologous sequences on the chromosome to plasmid reference sequences, resulting in falsely high coverage. For example, the first deviation threshold can be set as the sum of the average coverage depth and twice the standard deviation. If the coverage depth is greater than the first deviation threshold, then the window is identified as the first abnormal region.
[0057] The second abnormal region refers to windows with excessively low coverage depth. These windows have significantly lower coverage depths than average, typically due to sequence variations (such as mutations, insertions, or deletions) in the plasmid within this region, preventing successful alignment of true plasmid reads. For example, a second deviation threshold can be set as the difference between the average coverage depth and twice the standard deviation. Windows with a coverage depth less than the second deviation threshold are identified as the second abnormal region.
[0058] The plasmid-containing bacterial whole-genome sequencing assembly and integration method provided in this application sets a first deviation threshold and a second deviation threshold based on the average coverage depth and standard deviation, and divides the window into a first abnormal region (over-coverage) and a second abnormal region (under-coverage) accordingly. It can automatically adapt to the characteristics of different sequencing depths and different plasmid sequences, making subsequent alignment parameter adjustments more accurate and effective, and improving the accuracy and robustness of plasmid read screening.
[0059] In some embodiments, the comparison parameters include a matching threshold and a maximum number of empty spaces allowed. Adjust the comparison parameters for the first and second abnormal regions respectively and re-compare, including: For the first abnormal region, increase the matching degree threshold and decrease the maximum number of empty spaces allowed. For the second abnormal region, the matching degree threshold is lowered and the maximum number of empty slots allowed is increased.
[0060] Specifically, the matching threshold refers to the minimum percentage of sequence consistency required between the read and the reference sequence during the alignment process; only alignment results that meet or exceed this threshold are accepted. The maximum allowed number of gaps refers to the maximum number of insertions or deletions allowed during the alignment process, usually expressed as a percentage or absolute number of gaps in the read length. These two parameters together control the stringency of the alignment: a higher matching threshold and a lower maximum allowed number of gaps result in a more stringent alignment with higher specificity; conversely, a more lenient alignment results in higher sensitivity.
[0061] For the first anomalous region, the matching threshold is increased. Increasing the matching threshold means requiring reads to have higher sequence consistency with the reference sequence to be matched, thus filtering out reads that have low similarity to the plasmid reference sequence but originate from chromosomes. Simultaneously, the maximum allowed number of gaps is decreased. Decreasing the maximum allowed number of gaps means fewer insertions or deletions are allowed during alignment, further increasing the strictness of the alignment so that only highly similar reads can be successfully aligned. For example, if the matching threshold is set to 80% in the initial alignment and the maximum allowed number of gaps is set to 5% of the read length, then for the first anomalous region, the matching threshold can be increased to 85%, and the maximum allowed number of gaps can be decreased to 1% of the read length. The specific magnitude of the increase and decrease can be flexibly set according to the actual situation; for example, it can be dynamically determined based on the degree to which the coverage depth deviates from the average value—the greater the deviation, the greater the adjustment.
[0062] For the second anomalous region, the matching threshold is lowered. Lowering the matching threshold means allowing reads with more differences from the reference sequence to be matched, thus giving true plasmid reads containing sequence variations a chance to be aligned to the reference sequence. Simultaneously, the maximum allowed number of vacancies is increased. Increasing the maximum allowed number of vacancies means allowing more insertions or deletions during alignment, thereby accommodating insertion and deletion variations that may exist in the plasmid sequence.
[0063] For example, if the matching threshold is set to 80% in the initial alignment and the maximum allowed number of gaps is set to 5% of the read length, then for the second abnormal region, the matching threshold can be reduced to 75% and the maximum allowed number of gaps can be increased to 1% of the read length. Similarly, the adjustment range can be dynamically determined based on the degree to which the coverage depth deviates from the average value.
[0064] The plasmid-containing bacterial whole-genome sequencing assembly and integration method provided in this application increases the matching threshold and reduces the maximum allowable number of gaps for the first abnormal region, and decreases the matching threshold and increases the maximum allowable number of gaps for the second abnormal region. It can automatically switch and adjust the direction according to the coverage abnormality type of each region. While suppressing mismatch of chromosomal homologous sequences, it can also capture true plasmid reads lost due to sequence variations, thereby improving the accuracy and completeness of plasmid read screening as a whole.
[0065] In some embodiments, the convergence condition for the coverage depth of each window to stabilize is: The deviation between the coverage depth of each window and the average coverage depth is less than a preset threshold, or the number of iterations reaches a preset number of iterations.
[0066] Specifically, the preset severity threshold is a pre-defined boundary value used to determine whether the deviation is acceptable. This threshold can be flexibly set according to actual needs; for example, it can be set as a multiple of the average coverage depth, a multiple of the standard deviation, or a fixed value. The smaller the preset severity threshold, the stricter the convergence requirement; the larger the preset severity threshold, the more lenient the convergence condition. For example, if standardized deviation is used as a measure of the degree of deviation, the preset severity threshold can be set to twice the standard deviation.
[0067] When the deviation of all windows is less than the preset threshold, it indicates that the coverage depth of each window is very close to the average level, and there are no longer any significant abnormal regions. This means that after multiple rounds of parameter adjustments, the separation of plasmid reads and chromosome reads has reached a relatively ideal state, and further iteration will not bring significant improvement, so the iteration can be terminated.
[0068] The preset number of iterations refers to the maximum allowed number of iteration rounds set in advance. This value can be flexibly set according to computing resources and actual needs, such as 3, 5, or 10 iterations. The purpose of setting an upper limit on the number of iterations is to prevent the algorithm from getting stuck in an infinite loop in some extreme cases (such as when the reference plasmid sequence and the target plasmid are too different, causing it to fail to converge), thereby ensuring the finite termination of the algorithm.
[0069] When the preset number of iterations is reached, the iteration is forcibly terminated regardless of whether the coverage depth of each window meets the deviation condition. At this point, the alignment result generated by the last iteration is used as the final alignment result for subsequent candidate segment selection.
[0070] The plasmid-containing bacterial whole-genome sequencing assembly and integration method provided in this application ensures timely stopping when the coverage depth distribution tends to be uniform by setting a deviation level condition, thus avoiding unnecessary computational overhead; and prevents infinite loops caused by non-convergence by setting an iteration number condition, thus ensuring the stability and practicality of the algorithm.
[0071] In some embodiments, the preset conditions are determined based on at least one of alignment length, the proportion of known reference plasmid sequence covered, and alignment quality value.
[0072] Specifically, the preset condition is a criterion used to determine whether a long read originates from a plasmid with high confidence. This preset condition is determined based on at least one of the following three parameters: Alignment length refers to the length of the continuous region aligned between a long read and a known reference plasmid sequence, usually measured in base pairs (bp). A longer alignment length indicates a larger area of the reference plasmid covered by the read, and a higher reliability of its plasmid origin. For example, an alignment length exceeding 1 kb may be required for a particular read to align with the reference plasmid sequence.
[0073] The coverage ratio of a known reference plasmid sequence refers to the percentage of a long read that aligns to the reference plasmid out of the read's total length, or the percentage of the aligned region of the read out of the total length of the reference plasmid sequence. A higher ratio indicates that a large portion of the read matches the reference plasmid, and the greater the likelihood that it originated from the plasmid. For example, if a read is 15 kb in total length and aligns to a 12 kb length on the reference plasmid, the coverage ratio is 80%. It is permissible to require a coverage ratio exceeding 80%.
[0074] The Mapping Quality (MAPQ) score measures the reliability of a read's alignment to a reference sequence. It is typically expressed on the Phred scale and ranges from 0 to 60. A higher MAPQ indicates a lower probability of error and a more reliable alignment. For example, MAPQ=10 means an error probability of approximately 1 / 10, while MAPQ=60 indicates an extremely low error probability. A MAPQ score of at least 10 can be required.
[0075] The preset conditions can be any one of the three parameters mentioned above used alone, or a combination of multiple parameters. When used in combination, all parameters can be required to meet their respective thresholds, or a weighted scoring method can be used for comprehensive judgment. The specific selection and threshold settings can be flexibly adjusted according to actual needs.
[0076] The plasmid-containing bacterial whole-genome sequencing assembly and integration method provided in this application allows for the selection of single or multiple parameters according to actual needs. This ensures rigorous screening to exclude interference from chromosomal homologous sequences while maintaining sensitivity to capture true plasmid reads, thus providing high-quality input data for subsequent plasmid cycle-consistent sequence construction.
[0077] In some embodiments, constructing a plasmid cycle-consistent sequence based on partial plasmid reads includes: Based on the alignment position information of partial plasmid reads, the corresponding sequence information is extracted from long read data to obtain a set of plasmid-related reads; Pairwise comparisons were performed on the reads in the plasmid-related read set to determine the overlap between reads; An overlap graph is constructed using read segments as nodes and the overlap relationships between read segments as edges. Strongly connected components used to form loop paths are identified in the overlap graph. Based on the distribution of the start and end positions of each read segment, the true loop structure and tandem repeat artifacts are distinguished. Multiple sequence alignment is performed on read segments on the loop path to determine consensus bases and output the plasmid cycle consensus sequence. The plasmid cycle-consistent sequence was validated based on a known reference plasmid sequence.
[0078] Specifically, the selected plasmid partial reads were identified as originating from the plasmid with high confidence, and their alignment positions on known reference plasmid sequences were recorded, including the start and end positions, and alignment direction. For each plasmid partial read, the complete read sequence was retrieved and extracted from the original long-read data file based on its read identifier. These extracted reads were then aggregated to form a plasmid-related read set. This read set contains all long reads believed to originate from the plasmid.
[0079] Overlapping relationships refer to two read segments that share a common, highly similar region in their sequence, and this region is located at the end or inside of the two read segments, allowing the two read segments to be joined together through this overlapping region.
[0080] Pairwise alignment can employ fast alignment algorithms based on hash indexes or suffix arrays to efficiently handle large numbers of read segments. During alignment, the identified overlapping regions must have a certain length and sequence consistency to ensure the reliability of the overlap relationship. For example, a certain threshold can be set for the overlap length (e.g., 500 bp), and a high level of sequence consistency (e.g., above 98%) can be achieved. Through pairwise alignment, information such as whether there is overlap between each pair of read segments, the location of the overlap, the length of the overlap, and the sequence consistency of the overlapping region can be obtained.
[0081] An overlap graph is a graph structure where each node represents a read segment, and each edge represents an overlap between two read segments. Since plasmids have a circular structure and typically exist in multiple copies, overlap graphs contain strongly connected components that can form circular paths. A strongly connected component is a subgraph in the graph where there is a bidirectional reachable path between any two nodes. In plasmid assembly scenarios, strongly connected components typically correspond to a set of read segments that cover the circular structure of the plasmid.
[0082] After identifying all strongly connected components in the overlap map, it is necessary to distinguish between genuine loop plasmid structures and tandem repeat artifacts. Tandem repeat artifacts are false loop structures formed by multiple reads repeatedly covering the same region, and are not genuine plasmid loops. The distinction is made based on the distribution of the start and end positions of each read: in a genuine loop structure, the start and end positions of the reads should be evenly distributed across the loop, and the reads should be oriented in the same direction; while in tandem repeat artifacts, the start and end positions of the reads are often concentrated in a specific region, forming a repetitive stack. By statistically analyzing the distribution patterns of the start and end positions of the reads, the genuine loop path can be accurately identified.
[0083] After selecting the true circular path, multiple sequence alignment (MSA) is performed on all reads along that path. MSA aligns multiple reads in the same coordinate system to identify the base distribution at each position. Based on the alignment results, the consensus base at each position is determined. Methods for determining the consensus base can employ base voting models, such as those based on Poisson distribution or simple majority voting: at each position, the base types and frequencies appearing in all reads at that position are counted, and the base with the highest frequency is selected as the consensus base. Optionally, the corresponding consensus quality value can be calculated. By traversing all positions along the circular path, a complete circular sequence, i.e., the plasmid circular consensus sequence, is finally obtained.
[0084] After obtaining the circularly consistent plasmid sequence, it needs to be validated to ensure its accuracy and integrity. Validation is achieved by comparing the constructed circular sequence with a known reference plasmid sequence. Specifically, the circular sequence can be broken at any point (e.g., the starting point) to form a linear sequence, which is then compared globally or locally with the reference plasmid sequence. Validation can include sequence consistency (e.g., not less than 99%), length deviation (not exceeding 5%), and circularity (whether the ends of the circular sequence can naturally overlap to form a closed loop).
[0085] If validation passes, the circularly consistent plasmid sequence is considered an accurate plasmid sequence and can be used for subsequent genome-wide merging. If validation fails, previous steps (such as readjusting alignment parameters or reassembling) can be returned for optimization.
[0086] The plasmid-containing bacterial whole-genome sequencing and assembly method provided in this application fully utilizes the length advantage and overlapping information of long read data, can accurately reconstruct the circular structure of plasmids, effectively avoids tandem duplication errors caused by multiple copies of plasmids, and provides high-quality plasmid sequences for subsequent whole-genome integration.
[0087] In some embodiments, constructing a chromosome sequence based on partial chromosome reads includes: Chromosome reads are cut into a series of overlapping short segments according to a fixed base length; A network graph is constructed using short segments as nodes; the edge between two nodes in the network graph represents the adjacent occurrence of the corresponding short segments in any chromosome partial read. Starting from any node in the network graph, traverse along the direction of the edge. If each node on any path has only one predecessor node and one successor node, the short segments corresponding to each node on any path are spliced together in order to obtain the initial segment. Each chromosome partial read is compared with the initial fragment set to determine the target chromosome partial read that simultaneously covers at least two initial fragments. Based on the order of the at least two initial fragments in the target chromosome partial read, the at least two initial fragments are connected to obtain a continuous sequence. Based on the terminal sequences of the remaining chromosome partial reads and the starting region of the initial fragment, the connection positions of the remaining chromosome partial reads in the continuous sequence are determined and connected to obtain the chromosome sequence.
[0088] Specifically, each chromosome partial read is cut into a series of overlapping short fragments according to a fixed base length (i.e., k-mer size). The fixed base length can be set according to actual needs, such as 21 bp, 25 bp, or 31 bp. A sliding window method can be used during cutting, starting from the beginning of the read and taking a fixed-length fragment every other base (or every fixed step size), with overlapping areas between adjacent fragments. In this way, each chromosome partial read is transformed into an ordered set of overlapping short fragments.
[0089] A network graph is constructed using short segments obtained from cutting all chromosome partial reads as nodes. In this network graph, if two different short segments appear consecutively adjacent within a chromosome partial read (i.e., the end of the first short segment immediately follows the beginning of the second), a directed edge is created between the corresponding two nodes, pointing from the first short segment to the second. By aggregating the adjacency relationships across all chromosome partial reads, a complex network graph reflecting the overlapping relationships between all reads is ultimately constructed. This network graph is essentially a directed graph, where nodes represent short segments and edges represent the adjacency relationships between short segments.
[0090] In a network graph, traversal is performed starting from any node and following the edges. For a traversal path, if each node on the path has exactly one predecessor node (i.e., only one edge points to that node) and one successor node (i.e., only one edge originates from that node), then this path is called a non-branching path or a branchless linear chain. Such a path means that the corresponding short segments exhibit unique adjacency relationships across all chromosome partial reads, without branches or forks, and therefore can be reliably assembled into a continuous sequence.
[0091] For each non-branching path, the short segments corresponding to all nodes on the path are sequentially spliced together in the order they appear on the path to form an initial segment. During splicing, since there are overlapping regions between adjacent short segments, the overlapping parts need to be removed, retaining only the unique sequence portion of each short segment, thus obtaining a continuous DNA sequence. By traversing the entire network graph, the initial segments corresponding to all non-branching paths can be extracted, forming an initial segment set. These initial segments represent continuous regions in the chromosome that are free from repetitive interference.
[0092] Because of the repetitive sequences in chromosomes, branches will appear in the network graph at the repetitive regions (i.e., a node has multiple predecessors or multiple successors), causing the initial segments to be interrupted at these positions. In order to connect adjacent initial segments across repetitive regions, the traversal capability of the original long reads needs to be utilized.
[0093] Specifically, each chromosome partial read is aligned with the initial set of fragments. During alignment, a local alignment algorithm can be used to match each long read with all initial fragments. For long reads that simultaneously cover two or more initial fragments (called target chromosome partial reads), they provide evidence of the true adjacency between these initial fragments. For example, if the first half of a long read aligns to initial fragment A and the second half aligns to initial fragment B, it indicates that initial fragments A and B are adjacent on the chromosome, with A preceding B.
[0094] Based on the information provided by these target chromosome partial reads, the originally broken initial fragments are joined together in the order they appear on the long reads to form a longer, continuous sequence. If multiple target chromosome partial reads provide inconsistent joining information, voting or consistency analysis can be used to determine the most reliable joining method. This step allows multiple initial fragments to be joined into a longer, continuous sequence across repetitive regions, significantly reducing the number of gaps in the sequence.
[0095] After the above connections, there may still be a few gaps, meaning that some initial segments have not yet been connected. These remaining gaps can be filled using the end sequence information of the remaining long reads (i.e., long reads that have not yet been used for connections).
[0096] Specifically, the terminal sequences (e.g., the last 500 bases) of all remaining chromosomal partial reads are extracted, along with the start region sequences of all initial fragments (or ligated contiguous sequences). Through bidirectional alignment, pairings are identified where the terminal sequence of a long read is highly consistent with the start region of an initial fragment, and simultaneously, the start sequence of that long read is highly consistent with the terminal region of another initial fragment. This pairing indicates that the two initial fragments are directly adjacent on the chromosome, and the gap between them can be covered by the long read.
[0097] Based on the identified pairing information, the two corresponding initial fragments (or consecutive sequences) are connected to fill the gaps. This process is repeated until all possible gaps are filled, ultimately yielding a complete skeletal sequence covering most of the chromosome, i.e., the chromosome sequence.
[0098] The plasmid-containing bacterial whole-genome sequencing assembly and integration method provided in this application can effectively handle complex repetitive structures in chromosomes and ultimately obtain high-quality, highly continuous chromosome sequences by cutting partial chromosome reads into short fragments to construct a network graph, compressing non-branched paths to obtain initial fragments, using long reads to connect the initial fragments across repetitive regions, and then using the end information of the remaining reads to fill gaps.
[0099] In some embodiments, the initial whole genome is corrected based on short read data, including: The short read data is mapped to the initial whole genome to generate an alignment result file containing the alignment position, alignment quality value and mismatch or gap information of each read in the short read data. Traversing all sites on the initial whole genome, based on the alignment result file, the number of reads covering each site, the base types carried by the reads, and the alignment quality value are statistically analyzed to determine the pairing relationship of the reads and the length distribution of the inserted fragments; For the current site on the initial whole genome, if a single nucleotide variant or error is determined to exist at the current site based on the number of reads covering the current site, the base types carried by the reads, and the alignment quality value, base correction is performed on the current site; if a continuous insertion or deletion signal is detected in the reads covering the current site, the initial whole genome is adjusted based on the reads covering the current site. Based on the pairwise pairing information of each read segment in the short read data, identify and correct sequence assembly errors in the initial whole genome; Repeat the above correction process, using the initial whole genome corrected in the current round as the initial whole genome to be corrected in the next round, until the number of correction sites detected between two consecutive rounds is less than the preset threshold, or the correction process reaches the preset number of correction rounds.
[0100] Specifically, it can acquire high-precision short read data, such as Illumina paired-end 150 bp reads with a base quality value of no less than Q30. Simultaneously, it can acquire the merged initial whole genome sequence, which includes plasmid circularly consistent sequences and chromosome sequences.
[0101] Short read data are mapped onto the initial whole genome sequence using an alignment algorithm. Alignment algorithms can include hash-index-based local alignment algorithms. After alignment, an alignment result file is generated, which records the alignment information for each short read, including the alignment position (the start and end coordinates of the read on the initial whole genome), alignment quality value, and mismatch or gap information (the specific location and number of base mismatches, insertions, or deletions between the read and the reference sequence).
[0102] The algorithm iterates through every base site (i.e., each position) on the initial whole genome. For each site, it extracts information on all short reads covering that site from the alignment results file. Specific statistics include the number of covered reads (how many short reads cover the site), the base types carried by the reads (the bases displayed at that position by each read covering the site), and the alignment quality value (the base quality value of each read at that site).
[0103] In addition, it is necessary to analyze the pairing relationships of reads and the distribution of inserted fragment lengths (i.e., the fragment lengths between paired reads). This information can be used to identify small-scale structural assembly errors, such as local inversions or misalignments. Normally, paired reads should be aligned to the reference sequence in the correct orientation and at the expected distance; abnormal pairing orientations or distances may indicate assembly errors.
[0104] For each locus, based on the statistical results, determine whether correction is needed. Correction is divided into two cases: The first scenario involves correction of single nucleotide variants or errors. If a significant majority (e.g., more than a certain percentage, such as 70%) of the reads covering the current site support a different base than the currently assembled sequence, and the median base quality value of these reads at that site is high (e.g., above 20), then a single nucleotide variant or error is identified at the current site. In this case, the bases in the currently assembled sequence are corrected to the majority of bases supported by the reads.
[0105] The second scenario involves correction of insertions or deletions. If a large number of consecutive insertion or deletion signals are detected in the reads covering the current site—that is, if insertion or deletion markers frequently appear in a certain region in the read alignment results—it indicates that the initial whole genome may contain deleted or redundant bases in that region. In this case, the initial whole genome sequence is adjusted based on the local alignment information of the reads: if a read has an insertion relative to the reference sequence, the corresponding base may be inserted into the reference sequence; if a read has a deletion relative to the reference sequence, the redundant bases in the reference sequence may be deleted. For example, if multiple reads consistently have 3 extra bases relative to the initial whole genome in a certain region, these 3 bases should be inserted at the corresponding position in the initial whole genome; conversely, if multiple reads consistently have 3 missing bases, the corresponding 3 bases should be deleted from the initial whole genome.
[0106] In addition, it is necessary to utilize paired-end pairing information to identify and correct small-scale sequence assembly errors, such as local inversions, translocations, or misaligned connections. The specific method is as follows: For each paired-end read, check whether the alignment directions of its R1 and R2 are as expected (typically, R1 and R2 should align to the positive and negative strands of the reference sequence, respectively, and in opposite directions), and whether the inserted fragment length is within the expected distribution range. If a large number of reads are found to have abnormal pairing directions in a certain region (e.g., R1 and R2 both align to the same strand) or abnormal inserted fragment lengths (e.g., much larger or smaller than expected), it indicates that there may be assembly errors in that region.
[0107] A single round of correction may not be sufficient to completely eliminate all errors, therefore multiple rounds of iterative correction are required. The updated whole-genome sequence is obtained in the current round of correction. This updated sequence is then used as input for the next round of correction, and the alignment, statistical, and correction steps are repeated. After each round of correction, the number of correction sites performed in that round is recorded (including the sum of single-base corrections, insertion or deletion corrections, and structural corrections).
[0108] The iteration termination condition is one of the following two conditions: Condition 1: Correction site number threshold. If the number of correction sites detected between two consecutive rounds is less than the preset threshold (e.g., less than 10), it indicates that the correction has basically converged, and the benefit of continuing the iteration is minimal, so it can be terminated.
[0109] Condition 2: Preset number of calibration rounds. If the number of calibration rounds has reached the preset maximum number of rounds (e.g., 3 or 5 rounds), the process should be forcibly terminated even if the number of calibration sites has not yet dropped below the threshold to avoid over-calculation.
[0110] Through multiple rounds of iterative correction, errors in the initial whole genome are gradually eliminated, ultimately yielding a high-fidelity whole genome sequence.
[0111] After correction, sequence format verification tools can be used to verify the corrected whole genome, confirming the absence of structural errors such as sequence overlap and reverse complementation. By statistically analyzing uncovered gap regions and uncorrected variant sites during alignment, it can be ensured that the genome's insertion, deletion, and mutation rates are below a preset standard (e.g., 1×10⁻⁶). -5 At the same time, it is required that the genome coverage of short read data be no less than 99.9% and the average sequencing depth be no less than 50, in order to ensure the reliability of the correction.
[0112] The plasmid-containing bacterial whole genome sequencing assembly and integration method provided in this application fully utilizes the high precision advantage of short read data, effectively eliminates various errors remaining in the initial assembly, significantly improves the base accuracy and structural integrity of the whole genome sequence, and finally obtains a complete genome sequence that meets high precision requirements.
[0113] In a specific embodiment, the specific steps of the method provided in this application are as follows: Step 1: Obtain the sample and extract plasmid DNA and chromosomal DNA.
[0114] Step 101: Mix the Escherichia coli strain containing the target plasmid with LB solid medium containing ampicillin and kanamycin at a ratio of 1:100, and incubate at 37°C for 16 hours to form a bacterial film.
[0115] Step 102: Take an appropriate amount of bacterial culture, treat it with proteinase K for 30 minutes, extract plasmid DNA and chromosomal DNA, and purify it using a column purifier to obtain purified DNA.
[0116] Step 103: Use the nano-ammonia kit to determine the DNA concentration and use an enzyme-free method to determine the degree of DNA methylation.
[0117] Step 2: Use long read data for preliminary screening and stratification, the core of which is the adaptive iterative comparison parameter adjustment algorithm.
[0118] Step 201: Perform whole-genome sequencing using a high-throughput sequencing platform to obtain long read data, with read lengths ranging from 10 to 25 kb.
[0119] Step 202: Use a sequence preprocessing algorithm to process the read data, remove adapter sequences and low-quality bases (bases with quality values lower than Q20), and filter short reads with a length of less than 500 bp.
[0120] Step 203: Adaptive iterative comparison and parameter adjustment algorithm, the specific process is as follows: Step 203a, Initial Alignment: A local alignment algorithm based on hash indexes (such as the map-hifi mode of minimap2) is used to align the preprocessed long read with the known reference plasmid sequence. The initial alignment parameters are set as follows: the matching threshold (i.e., minimum sequence consistency) is 80%, the maximum allowed number of gaps is 5% of the read length, and the minimum alignment length is 1kb.
[0121] Step 203b, Coverage Calculation and Window Division: Divide the reference plasmid sequence into multiple consecutive regions (windows) according to a fixed window size (1000 bp). For each window, count the number of reads that can completely cover the window to obtain the initial coverage depth of each window. Calculate the average coverage depth μ and standard deviation σ of the entire plasmid.
[0122] Step 203c, Abnormal Region Identification: For each window, if its coverage depth... or If the coverage is too high, it is marked as an abnormal region. Regions with excessive coverage are usually caused by mismatches of chromosomal homologous sequences; regions with insufficient coverage may be due to sequence variations, low complexity, or loss of subclones in the region.
[0123] Step 203d: Dynamically adjust comparison parameters: For abnormal areas, adjust the comparison parameters and then re-perform a local comparison. The specific adjustment strategy is as follows: For areas with excessively high coverage ( ): Increase the matching threshold to 85%-90% and reduce the number of allowed gaps (e.g., adjust the maximum number of gaps to 2% of the read length) to improve the specificity of the alignment and reduce false matches from chromosomes.
[0124] For areas with low coverage ( ): Lower the matching threshold to 75%-80% and increase the number of allowed gaps (e.g., adjust the maximum number of gaps to 8% of the read length) to improve the sensitivity of the alignment and capture true plasmid reads that fail to match due to sequence variations.
[0125] Step 203e, Iterative Optimization: Re-align using the adjusted parameters and recalculate the coverage depth of each window. Repeat steps 203c-203e until one of the following convergence conditions is met: (1) The absolute value of the deviation between the coverage depth of all windows and the average coverage depth is less than 1.5 times the standard deviation; (2) The number of iterations reaches the preset maximum value (e.g., 5 times). Record the alignment result generated by the last iteration.
[0126] Step 204: Select high-confidence candidate reads: From the final alignment results, retain reads that meet the following conditions: alignment length exceeds 1kb, coverage of the reference sequence exceeds 80%, and alignment quality value (MAPQ) ≥ 10. These reads are high-confidence candidate reads.
[0127] Step 3: Construct a plasmid cycle-consistent sequence.
[0128] Step 301: Based on the alignment position information of candidate reads, extract the corresponding sequence information from the original long read data to obtain the plasmid-related read set.
[0129] Step 302: Construct a cycle-consistent sequence for the plasmid using an assembly algorithm based on Overlap-Layout-Consensus (OLC). The algorithm principle is as follows: Overlap detection: All extracted read segments are compared pairwise, and overlapping regions between read segments are quickly identified using hash indexes or suffix arrays. The overlap length is required to be at least 500 bp and the sequence consistency is ≥98%.
[0130] Layout Construction: An overlapping graph is constructed by treating read segments as nodes and overlapping relationships as edges. Strongly connected components capable of forming loop paths are identified within the graph. Since the plasmid is copied multiple times, the graph may contain cascading repeating structures where multiple read segments cover the same region. The algorithm identifies true loop paths by analyzing the distribution of the start and end positions of the read segments.
[0131] Consensus generation: Multiple sequence alignments are performed on all reads along the circular path. A base voting model based on the Poisson distribution is used to select the most frequent base at each position as the consensus base, and the consensus quality value is calculated. The final output is the circularly consistent sequence of the circular plasmid.
[0132] Step 303: Verify the cyclic consistency of the sequence: Break the constructed circular sequence at its starting point and compare it with the original plasmid reference sequence. The sequence consistency should be ≥99%, and the length of the circular sequence should not deviate from the length of the reference plasmid by more than 5%. At the same time, check whether the ends of the circular sequence can overlap to form a closed loop.
[0133] Step 4: Assemble the chromosome sequence.
[0134] Step 401: The long reads (i.e., the remaining reads) that did not match plasmids after step 2 are used for independent chromosome assembly using an assembly algorithm based on the de Bruijn graph. Algorithm principle: The reads are divided into fixed-length k-mers (k=15-31), a k-mer graph is constructed, and initial fragments (contigs) are obtained by compressing non-branching paths. Then, the initial fragments are connected by using long reads to cross repetitive regions to obtain the chromosome backbone sequence.
[0135] Step 402: Using an alignment algorithm based on the Burrows-Wheeler transform (BWT), short read data (such as Illumina 150bp paired-end reads) are aligned to the plasmid sequence obtained in Step 3 and the chromosome backbone sequence obtained in Step 401, respectively, to identify and correct insertions, deletions, and single-base errors. The correction parameters are set to allow a maximum of two mismatches.
[0136] Step 403: Use another short sequence assembly algorithm based on de Bruin diagram (using a smaller k-mer such as 13-21) to locally reassemble the corrected reads, fill the small gaps in the chromosome backbone, and obtain the complete chromosome sequence.
[0137] Step 5: Merge and correct the assembly results.
[0138] Step 501: Merge the plasmid cycle-consistent sequence constructed in step 3 with the chromosome sequence obtained in step 4 to obtain the whole genome sequence file.
[0139] Step 502: Perform genome-wide correction using a variant detection algorithm based on a Bayesian probabilistic model. This algorithm calculates the base distribution, sequencing quality value, and alignment quality value for each locus to establish a posterior probability model and determine the true bases at that locus. Parameters are set as follows: minimum base quality 20, minimum coverage depth 10, filtering out low-quality variant sites.
[0140] Step 503: Use a sequence format verification tool to verify the merged whole genome, confirming that there are no structural errors such as sequence overlap or reverse complementation, and that the base insertion, deletion, and mutation rates of the whole genome are less than [value missing]. .
[0141] In another specific embodiment, the specific steps of the method provided in this application are as follows: Step 1: Obtain the sample and extract plasmid DNA and chromosomal DNA.
[0142] Step 101: Mix Escherichia coli BL21(DE3) strain containing the target plasmid with LB solid medium containing ampicillin, kanamycin and streptomycin at a ratio of 1:50, and incubate at 37°C for 12 hours to form a bacterial film.
[0143] Step 102: Take an appropriate amount of bacterial culture, treat it with proteinase K for 15 minutes, extract plasmid DNA and chromosomal DNA, and purify it using magnetic bead purification method to obtain purified DNA.
[0144] Step 103: Use a fluorescence quantitative quantitation instrument to determine the DNA concentration and use a specific kit to determine the degree of DNA methylation.
[0145] Step 2: Perform preliminary screening and stratification using long read data, and use a sliding window for adaptive adjustment.
[0146] Step 201: Perform whole-genome sequencing using the Ion Torrent S5XL platform to obtain 200bp single-end reads (this is an example; in practice, long-read data will be the primary source, and PacBio or ONT data can be substituted).
[0147] Step 202: Use the platform's matching map alignment algorithm to preprocess the sequence data, removing adapter sequences and low-quality bases.
[0148] Step 203: Perform the first round of alignment using a sequence similarity comparison algorithm, setting initial parameters: a matching threshold of 85% and a minimum alignment length of 500 bp. Then, use a sliding window (window size 500 bp, step size 100 bp) to calculate the coverage depth of each window. For windows with a coverage depth significantly higher than the global average depth (greater than 3 standard deviations), dynamically increase the alignment strictness: raise the matching threshold to 92% and add a penalty for end-of-read pruning. For windows with a coverage depth significantly lower than the global average depth (less than 0.5 standard deviations), dynamically decrease the alignment strictness: lower the matching threshold to 80% and allow more gaps (maximum gaps are 10% of the read length). Re-align after each adjustment, iterating 3 times.
[0149] Step 204: Retain candidate reads that meet the requirements of alignment length greater than or equal to 500 bp and coverage greater than or equal to 85% in the final alignment, resulting in approximately 500,000 high-confidence candidate reads.
[0150] Step 3: Construct a plasmid cycle-consistent sequence.
[0151] Step 301: Use sequence processing tools to extract the sequence information of candidate reads to obtain a plasmid-related read set.
[0152] Step 302: Construct a plasmid circular consensus sequence using an assembly algorithm based on Overlapping Layout Consensus (OLC). Unlike the previous embodiment, this step uses multiple rounds of consensus iteration: the first round uses fast OLC to generate an initial circular sequence, then all reads are aligned to this sequence, reads in uncovered areas are extracted for secondary assembly, and finally all consensus results are merged.
[0153] Step 303: Verify the cycle consistency of the sequence, requiring a cycle consistency coverage of ≥95%.
[0154] Step 4: Assemble the chromosome sequence.
[0155] Step 401: The unmatched plasmid reads are assembled into chromosomes independently using an assembly algorithm based on the de Bruijn graph (such as the Eulerian path algorithm) to obtain chromosome sequences.
[0156] Step 402: Use the alignment algorithm based on Burrows-Wheeler transform (BWT) to correct the plasmid cycle-consistent sequence and chromosome sequence, setting parameters to allow a certain number of mismatches and gaps.
[0157] Step 403: Use another assembly algorithm based on de Bruin graphs to further assemble the chromosome sequence to obtain the chromosome sequence.
[0158] Step 5: Merge and correct the assembly results.
[0159] Step 501: Use sequence correction and merging tools to merge the plasmid cycle-consistent sequence with the chromosome sequence to obtain the whole genome sequence.
[0160] Step 502: Perform genome-wide correction using variant detection software based on a Bayesian probability model, and set parameters to filter out low-quality variant sites.
[0161] Step 503: Use sequence alignment and validation tools to validate the merged whole genome, confirming that the base insertion, deletion, and mutation rates are less than [value missing]. .
[0162] The apparatus provided in the embodiments of this application is described below. The apparatus described below can be referred to in correspondence with the method described above.
[0163] Figure 2 This is a schematic diagram of the structure of the plasmid-containing bacterial whole genome sequencing assembly and integration device provided in this application, as shown below. Figure 2 As shown, the device includes: Sequencing module 210 is used to extract deoxyribonucleic acid from bacterial samples containing plasmids, and after sequencing, long read data and short read data are obtained; The screening module 220 is used to iteratively align long read data with known reference plasmid sequences, and to screen plasmid partial reads and chromosome partial reads based on the iterative alignment results. The iterative alignment includes: aligning long read data with known reference plasmid sequences, dividing the known reference plasmid sequences into continuous windows, dynamically adjusting the alignment parameters based on the deviation of the coverage depth of each window from the average coverage depth, and re-aligning until the coverage depth of each window tends to stabilize. Module 230 is used to construct plasmid cycle-consistent sequences based on plasmid partial reads and chromosome sequences based on chromosome partial reads. The correction module 240 is used to merge the plasmid circularly consistent sequence and the chromosome sequence to obtain the initial whole genome, and to correct the initial whole genome based on the short read data to obtain the whole genome sequence of the plasmid-containing bacteria.
[0164] The plasmid-containing bacterial whole-genome sequencing and assembly device provided in this application provides long-read and short-read data from the deoxyribonucleic acid sequencing of plasmid-containing bacterial samples. The long-read data is iteratively compared with a known reference plasmid sequence. Based on the iterative comparison results, partial plasmid and chromosomal reads are selected. The iterative comparison process dynamically adjusts the comparison parameters according to the deviation of each window's coverage depth from the average value, ensuring accurate separation of plasmid and chromosomal reads. This avoids the absorption and loss of plasmids or the formation of false multimeric plasmid configurations during conventional mixed assembly. The plasmid and chromosome are assembled independently, then merged and corrected using short-read data to finally obtain a high-quality whole-genome sequence. Through a combination of reference plasmid sequence-guided iterative comparison, adaptive iterative parameter adjustment, and independent assembly, this device effectively solves the problem of read misclassification caused by homologous sequences between plasmids and chromosomes in plasmid-containing bacterial genomes. It achieves accurate separation and high-quality assembly of plasmids and chromosomes without relying on separate plasmid extraction and sequencing, improving the accuracy and reliability of genome assembly.
[0165] Figure 3 This is a schematic diagram of the structure of the electronic device provided in this application, such as... Figure 3 As shown, the electronic device may include: a processor 310, a communications interface 320, a memory 330, and a communications bus 340, wherein the processor, communications interface, and memory communicate with each other via the communications bus. The processor can invoke logical commands stored in the memory to execute the methods described in the above embodiments, for example: Deoxyribonucleic acid (DNA) was extracted from plasmid-containing bacterial samples, and sequenced to obtain long-read and short-read data. The long-read data was iteratively aligned with known reference plasmid sequences. Based on the alignment results, partial plasmid and chromosomal reads were selected. The iterative alignment included: aligning the long-read data with known reference plasmid sequences, dividing the known reference plasmid sequences into continuous windows, dynamically adjusting alignment parameters based on the deviation of each window's coverage depth from the average coverage depth, and re-aligning until the coverage depth of each window stabilized; constructing a plasmid cycle-consistent sequence based on the plasmid partial reads, and constructing a chromosome sequence based on the chromosome partial reads; merging the plasmid cycle-consistent sequence and chromosome sequence to obtain the initial whole genome, and correcting the initial whole genome based on the short-read data to obtain the whole genome sequence of the plasmid-containing bacteria.
[0166] Furthermore, the logical commands in the aforementioned memory can be implemented as software functional units and sold or used as independent products, and can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several commands to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0167] The processor in the electronic device provided in this application embodiment can call logical instructions in the memory to implement the above method. Its specific implementation method is the same as the aforementioned method implementation method and can achieve the same beneficial effect, which will not be repeated here.
[0168] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the methods provided in the above embodiments.
[0169] The specific implementation method is the same as the aforementioned method implementation method and can achieve the same beneficial effects, so it will not be repeated here.
[0170] This application provides a computer program product, including a computer program that, when executed by a processor, implements the method described above.
[0171] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0172] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0173] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for assembling and integrating whole genome sequencing data of plasmid-containing bacteria, characterized in that, include: Deoxyribonucleic acid was extracted from bacterial samples containing plasmids, and long-read and short-read data were obtained after sequencing. The long read data is iteratively compared with a known reference plasmid sequence, and plasmid partial reads and chromosome partial reads are selected based on the iterative comparison results. The iterative alignment includes: aligning the long read data with a known reference plasmid sequence, dividing the known reference plasmid sequence into continuous windows, dynamically adjusting the alignment parameters based on the deviation of the coverage depth of each window from the average coverage depth, and re-aligning until the coverage depth of each window tends to stabilize. A plasmid cycle-consistent sequence is constructed based on the plasmid partial reads, and a chromosome sequence is constructed based on the chromosome partial reads. The initial whole genome is obtained by merging the plasmid circularly consistent sequence and the chromosome sequence, and the initial whole genome is corrected based on the short read data to obtain the whole genome sequence of the plasmid-containing bacteria; The comparison parameters include the matching degree threshold and the maximum number of empty spaces allowed; The dynamic adjustment of comparison parameters based on the deviation of the coverage depth of each window from the average coverage depth includes: Based on the degree of deviation of the coverage depth of each window from the average coverage depth, a first abnormal region and a second abnormal region are determined; the first abnormal region refers to windows with excessively high coverage depth; the second abnormal region refers to windows with excessively low coverage depth. For the first abnormal region, increase the matching degree threshold and decrease the maximum number of empty spaces allowed. For the second abnormal region, the matching degree threshold is lowered and the maximum number of empty slots allowed is increased.
2. The method for sequencing, assembling, and integrating plasmid-containing bacterial whole genomes according to claim 1, characterized in that, The step of iteratively aligning the long read data with a known reference plasmid sequence, and screening plasmid partial reads and chromosome partial reads based on the iterative alignment results, includes: The long read data is initially aligned with a known reference plasmid sequence; The known reference plasmid sequence is divided into multiple consecutive windows of a fixed size, and the coverage depth of each window is calculated. Based on the degree of deviation of the coverage depth of each window from the average coverage depth, a first abnormal region with excessively high coverage depth and a second abnormal region with excessively low coverage depth are identified. The comparison parameters for the first abnormal region and the second abnormal region are adjusted respectively, and the comparison is performed again. When the coverage depth of each window tends to stabilize, candidate reads that meet the preset conditions are selected from the final alignment results as plasmid partial reads, and the remaining reads are chromosome partial reads.
3. The method for sequencing, assembling, and integrating plasmid-containing bacterial whole genomes according to claim 2, characterized in that, The determination of a first abnormal region with excessively high coverage depth and a second abnormal region with excessively low coverage depth based on the deviation of the coverage depth of each window from the average coverage depth includes: Based on the coverage depth of each window, determine the average coverage depth and standard deviation; Based on the average coverage depth and standard deviation, a first deviation threshold and a second deviation threshold are determined; the first deviation threshold is greater than the second deviation threshold. The window with a coverage depth greater than the first deviation threshold is identified as the first abnormal region; Windows with a coverage depth less than the second deviation threshold are identified as the second abnormal region.
4. The method for sequencing, assembling, and integrating plasmid-containing bacterial whole genomes according to claim 2, characterized in that, The convergence condition for the coverage depth of each window to stabilize is: The deviation between the coverage depth of each window and the average coverage depth is less than a preset threshold, or the number of iterations reaches a preset number of iterations.
5. The method for sequencing, assembling, and integrating plasmid-containing bacterial whole genomes according to claim 2, characterized in that, The preset conditions are determined based on at least one of the following: alignment length, proportion of the known reference plasmid sequence covered, and alignment quality value.
6. The method for sequencing, assembling, and integrating plasmid-containing bacterial whole genomes according to any one of claims 1 to 5, characterized in that, The construction of a plasmid cycle-consistent sequence based on the plasmid partial reads includes: Based on the alignment position information of the partial reads of the plasmid, the corresponding sequence information is extracted from the long read data to obtain the plasmid-related read set; The reads in the plasmid-related read set are compared pairwise to determine the overlap between reads; Using the read segments as nodes and the overlap relationships between read segments as edges, an overlap graph is constructed. In the overlap graph, strongly connected components used to form a loop path are identified. Based on the distribution of the start and end positions of each read segment, the real loop structure and the tandem repeat artifact are distinguished. Multiple sequence alignment is performed on the read segments on the loop path and consensus bases are determined. The plasmid cycle consensus sequence is output. The plasmid cycle-consistent sequence was verified based on the known reference plasmid sequence.
7. The method for sequencing, assembling, and integrating plasmid-containing bacterial whole genomes according to any one of claims 1 to 5, characterized in that, The construction of chromosome sequences based on the partial reads of the chromosome includes: The chromosome partial reads are cut into a series of overlapping short segments according to a fixed base length; A network graph is constructed using the short segments as nodes; the edge between two nodes in the network graph represents the adjacent occurrence of the corresponding short segments in any partial read of a chromosome. Starting from any node in the network graph, traverse along the direction of the edge. If each node on any path has only one predecessor node and one successor node, the short segments corresponding to each node on any path are spliced together in order to obtain the initial segment. Each chromosome partial read is compared with the initial fragment set to determine the target chromosome partial read that simultaneously covers at least two initial fragments. The at least two initial fragments are then joined together based on their order in the target chromosome partial read to obtain a continuous sequence. Based on the terminal sequences of the remaining chromosome partial reads and the starting region of the initial fragment, the connection positions of the remaining chromosome partial reads in the continuous sequence are determined and connected to obtain the chromosome sequence.
8. The method for sequencing, assembling, and integrating plasmid-containing bacterial whole genomes according to any one of claims 1 to 5, characterized in that, The correction of the initial whole genome based on the short read data includes: The calibration process is as follows: The short read data is mapped to the initial whole genome to generate an alignment result file containing the alignment position, alignment quality value and mismatch or gap information of each read segment in the short read data. Traverse each site on the initial whole genome, and based on the alignment result file, count the number of reads covering each site, the base types carried by the reads, and the alignment quality value to determine the pairing relationship of the reads and the length distribution of the inserted fragments; For the current site on the initial whole genome, if a single nucleotide variant or error is determined to exist at the current site based on the number of reads covering the current site, the base types carried by the reads, and the alignment quality value, base correction is performed on the current site; if a continuous insertion or deletion signal is detected in the reads covering the current site, the initial whole genome is adjusted based on the reads covering the current site. Based on the pairwise pairing information of each read segment in the short read data, the sequence assembly errors of the initial whole genome are identified and corrected; The correction process is repeated, using the initial whole genome corrected in the current round as the initial whole genome to be corrected in the next round, until the number of correction sites detected between two consecutive rounds is less than a preset threshold, or the correction process reaches a preset number of correction rounds.
9. A device for assembling and integrating plasmid-containing bacterial whole genome sequencing, characterized in that, include: The sequencing module is used to extract deoxyribonucleic acid from bacterial samples containing plasmids, and after sequencing, long read data and short read data are obtained. The filtering module is used to iteratively compare the long read data with known reference plasmid sequences, and filter plasmid partial reads and chromosome partial reads based on the iterative comparison results; The iterative alignment includes: aligning the long read data with a known reference plasmid sequence, dividing the known reference plasmid sequence into continuous windows, dynamically adjusting the alignment parameters based on the deviation of the coverage depth of each window from the average coverage depth, and re-aligning until the coverage depth of each window tends to stabilize. The construction module is used to construct a plasmid cycle-consistent sequence based on the plasmid partial reads and to construct a chromosome sequence based on the chromosome partial reads; The correction module is used to merge the plasmid cycle-consistent sequence and the chromosome sequence to obtain an initial whole genome, and to correct the initial whole genome based on the short read data to obtain the whole genome sequence of the plasmid-containing bacteria; The comparison parameters include the matching degree threshold and the maximum number of empty spaces allowed; The dynamic adjustment of comparison parameters based on the deviation of the coverage depth of each window from the average coverage depth includes: Based on the degree of deviation of the coverage depth of each window from the average coverage depth, a first abnormal region and a second abnormal region are determined; the first abnormal region refers to windows with excessively high coverage depth; the second abnormal region refers to windows with excessively low coverage depth. For the first abnormal region, increase the matching degree threshold and decrease the maximum number of empty spaces allowed. For the second abnormal region, the matching degree threshold is lowered and the maximum number of empty slots allowed is increased.
Citation Information
Patent Citations
Method, device, and computer program for assembling pieces of chromosomes from one or several organisms
CN106471509A
Method, device and system for detecting aneuploidy of chromosome
CN108629152A