Automatic pathogen genome phylogenetic analysis method and system based on Nextflow
The automated NextFlow-based method simplifies and automates pathogen genome phylogenetic analysis, addressing inefficiencies in traditional methods by improving resource utilization and accuracy through dynamic task scheduling and container technology.
Patent Information
- Application Number
- CN202411233837.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2024-12-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional pathogen genome phylogenetic analysis is cumbersome, prone to human errors, and requires complex manual processing of large sequencing data, which is inefficient and lacks adaptability in dynamic task scheduling.
An automated analysis method based on NextFlow workflow, including data preprocessing, sequence alignment and assembly, family typing, phylogenetic analysis, and result visualization, utilizing NextFlow's dynamic task scheduling and container technology for efficient and accurate pathogen genome phylogeny analysis.
Simplifies complex computing processes, reduces programming difficulty, enhances resource utilization, and ensures accurate and efficient pathogen genome data processing, revealing genetic diversity and evolutionary relationships for disease prevention and biomedical research.
Smart Images

Figure CN119132410A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of metagenomic sequencing in high-throughput sequencing, and specifically relates to an automated analysis method and system for pathogen genome phylogeny based on NextFlow. Background Art
[0002] In pathogen prevention and control and biomedical research, understanding the genetic diversity and evolutionary relationships of pathogens is crucial for disease prevention, traceability, and vaccine development. The traditional pathogen genome phylogenetic analysis process is cumbersome, requires manual processing of large amounts of sequencing data, and is prone to human errors. With the development of high-throughput sequencing technology, the acquisition of pathogen genome data has become faster and more efficient, but the corresponding data processing and analysis have also become more complex. In recent years, bioinformatics tools and frameworks have played an important role in data analysis.
[0003] CN106886689A discloses a bioinformatics pipeline and annotation system for microbial gene analysis, and proposes that the bioinformatics pipeline can be organized based on snakemake workflow. Although Snakemake provides workflow definition and execution, it usually requires users to have certain programming skills, and has limitations on adaptability to dynamic task scheduling and multi-environment execution. Summary of the invention
[0004] In order to solve the deficiencies in the prior art, the present invention provides an automated analysis technology for pathogen genome phylogeny based on NextFlow.
[0005] The technical solution of the present invention is:
[0006] A Nextflow-based pathogen genome phylogeny automated analysis method, the method is based on the Nextflow workflow and includes the following steps:
[0007] Step 1: Create a pathogen reference genome database;
[0008] Step 2: Data preprocessing: preprocess, filter and quality control the raw data obtained by high-throughput sequencing to obtain clean data;
[0009] Step 3: sequence alignment and assembly;
[0010] Compare the preprocessed sequence data with the host reference genome to extract the genome sequence information of the pathogen; among them, after obtaining the sequence that cannot be compared to the human reference genome, perform de novo assembly to obtain the complete genome sequence of the pathogen;
[0011] Step 4: Family typing;
[0012] Analyze the extracted pathogen genome sequence information to confirm the pathogen's pedigree typing;
[0013] Step 5: Integrate multi-sample results
[0014] Using nextflow's automated management, all samples were subjected to pedigree typing analysis and the results were integrated;
[0015] Step 6: Phylogenetic analysis: construct a phylogenetic tree of the pathogen based on the integrated genetic information;
[0016] Step 7: Result output and visualization.
[0017] According to an embodiment of the present invention, in the step 1, the pathogen reference genome data is crawled and integrated from the public database using python crawler technology to create the pathogen reference genome database.
[0018] According to an embodiment of the present invention, in step 2, during the filtering process, the low-quality base percentage threshold is defined as 30 in the sequence, the retention quality is greater than 20, and the sequences containing 10 or more N bases are removed. Sequences containing a large amount of uncertainty (N bases) and data with low quality due to sequencing errors are removed, which reduces the ineffective occupation of computing and storage resources, retains high-quality management sequences that are more likely to represent real biological characteristics, and thus enhances the biological significance of the research results.
[0019] According to an embodiment of the present invention, in step 4, during the typing process, the sequences are re-aligned and sorted according to sequence similarity. If the similarity of the sample sequence to the typing is as high as 99.9%, it is identified as that typing.
[0020] According to an embodiment of the present invention, in step six, during the phylogenetic analysis, a whole genome development tree is constructed based on the NJ method.
[0021] According to an embodiment of the present invention, in step seven, HTML technology is used to construct a basic layout framework, and then the visualization result is embedded therein to achieve a real-time data update function.
[0022] Another aspect of the present invention provides a Nextflow pathogen genome phylogeny automated analysis system, comprising: a Nextflow workflow framework, a pathogen reference genome database module, a data preprocessing module, a sequence alignment module, a sequence assembly module, a pathogen family typing analysis module, a Nextflow multi-sample typing integration module, a phylogeny analysis module, and a result output and visualization module arranged under the framework;
[0023] The pathogen reference genome database module stores common pathogen reference genome data and can be continuously updated and expanded;
[0024] The data preprocessing module can preprocess the raw sequence data obtained by high-throughput sequencing and filter it;
[0025] The sequence comparison module can compare the preprocessed sequence data with the host reference genome to extract the genome sequence information of the pathogen;
[0026] The sequence assembly module can assemble the sequence to obtain a complete genome sequence;
[0027] The pathogen pedigree typing analysis module can perform pedigree typing on pathogen genome sequences to determine the genetic relationship and kinship between different samples;
[0028] The nextflow multi-sample typing integration module can integrate the pedigree typing results of all samples to form a database containing the genetic information of all samples;
[0029] The phylogenetic analysis module can construct a phylogenetic tree of the pathogen based on the integrated genetic information;
[0030] The result output and visualization module can output and visualize the results of phylogenetic analysis.
[0031] According to an embodiment of the present invention, in the data preprocessing module, during filtering, a low-quality base percentage threshold is defined in the sequence as 30, a retention quality greater than 20, and sequences containing 10 or more N bases are removed.
[0032] According to an embodiment of the present invention, the pathogen family typing analysis module can sort the samples after re-alignment according to sequence similarity. If the typing similarity of the sample sequence is as high as 99.9%, it is identified as that typing.
[0033] According to an embodiment of the present invention, the phylogenetic tree analysis module constructs a whole genome phylogenetic tree based on the NJ method.
[0034] Compared with the prior art, the present invention has the following beneficial effects:
[0035] The analysis method of this application, based on the Nextflow workflow, can simplify the definition of complex computing processes, reduce programming difficulty, and be user-friendly. In addition, the Nextflow dynamic task scheduling system optimizes resource utilization and processing speed. Native container technology integration simplifies environment configuration and enhances the portability and repeatability of workflows.
[0036] The present invention applies NextFlow to the phylogenetic analysis of pathogen genomes, which can realize the automated processing and analysis of pathogen genome sequencing data, including key steps such as data preprocessing, sequence alignment, assembly, family typing, and phylogenetic tree construction. It can realize parallel processing of multi-sample data, ensure the accuracy and efficiency of data processing, and can efficiently and accurately reveal the genetic diversity and evolutionary relationship of pathogen genomes, providing a scientific basis for disease prevention, control, and tracing. In addition, combined with the regulation of corresponding parameters, the analysis efficiency is improved, human errors are reduced, and it is of great significance to public health and biomedical research. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 It is a technical flow chart of an embodiment of the present invention;
[0038] Figure 2 A summary table of pedigree typing results according to an embodiment of the present invention;
[0039] Figure 3 A schematic diagram of a phylogenetic tree of an embodiment of the present invention;
[0040] Figure 4 4 is a structural diagram of an analysis system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0041] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. The preferred embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive.
[0042] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0043] Unless otherwise specified, the reagents, materials, and equipment used in the examples of the present invention are all commercially available; the experimental methods, unless otherwise specified, are all conventional experimental methods in the art.
[0044] The present invention provides a method for automated analysis of pathogen genome phylogeny based on nextflow workflow, the method specifically comprising the following steps:
[0045] Step 1: Create a common pathogen reference genome database
[0046] In order to support subsequent analysis work, the present invention can use Python crawler technology to crawl and integrate pathogen reference genome data from public databases (such as gcpathogen database, NCBI database, etc.) to create a pathogen reference genome database. This database can be continuously updated and expanded to provide rich reference data for phylogenetic analysis of pathogen genomes.
[0047] Step 2: Data preprocessing
[0048] The raw data (fastq files) obtained by high-throughput sequencing are preprocessed, filtered and quality-controlled to obtain clean data, including the removal of low-quality sequences, adapter contamination, short sequences and sequences containing too many N bases. Through the nextflow workflow framework, parallel processing of multi-sample data is achieved to ensure the accuracy and efficiency of data processing. Trimmomatic tools can be used for preprocessing and filtering.
[0049] Step 3: Sequence alignment and assembly
[0050] Next, use appropriate alignment tools to align the preprocessed sequence data with the host reference genome to extract the pathogen's genome sequence information. For sequences that cannot be directly aligned to the reference genome, assembly software is used to assemble them to obtain a more complete genome sequence. Tools such as Bowtie2 can be used for alignment, samtools tools for host filtering, and MetaSPAdes tools for assembly.
[0051] Step 4: Family typing
[0052] After obtaining the genome sequence of the pathogen, the alignment software is used to perform pedigree typing to determine the genetic relationship and kinship between different samples, providing a basis for subsequent phylogenetic analysis. The Blast tool is usually selected for pedigree typing analysis. The samples after re-alignment can be sorted according to sequence similarity. If the sample sequence has a typing similarity of up to 99.9%, it is identified as that typing.
[0053] Step 5: Integrate multi-sample results
[0054] The pedigree typing results of all samples are integrated to form a database (folder) containing the genetic information of all samples. The accuracy and consistency of the data can be ensured through the automated management of nextflow.
[0055] Step 6: Phylogenetic Analysis
[0056] Based on the integrated genetic information, phylogenetic analysis software (such as Mega) is used to construct a phylogenetic tree of pathogens. The phylogenetic tree can intuitively display the evolutionary relationship and genetic differences between different pathogens, providing a scientific basis for disease prevention, tracing and vaccine development.
[0057] Step 7: Result output and visualization
[0058] Finally, the results of phylogenetic analysis are output and visualized in the form of graphics, tables, etc. The accuracy and readability of the results are ensured through the automated management of NextFlow. At the same time, a wealth of result interpretation and analysis functions are provided to facilitate users to intuitively understand and use the analysis results.
[0059] The following is further described in conjunction with the embodiments:
[0060] Example 1
[0061] This example uses 64 whole genome sequencing samples extracted from human nasopharyngeal swabs to perform phylogenetic automated analysis based on the NCBI public database. Figure 1 , the specific steps are as follows:
[0062] Step 1: Create a genome database
[0063] Use Python crawler technology to crawl the specific information of common pathogens in the gcpathogen database, then jump to the NCBI database to crawl and create a common pathogen reference genome database. During the database construction process, 168 common pathogen reference genomes were crawled in real time.
[0064] Step 2: Data preprocessing
[0065] The high-throughput sequencing data of pathogen genomes were preprocessed by the Trimmomatic tool, filtered, and quality controlled to obtain clean data. During the filtering process, the low-quality base percentage threshold in the sequence was defined as 30, the retention quality was greater than 20, and sequences containing 10 or more N bases were removed. Before and after filtering, Q30 increased from 89.0% to 92.5%.
[0066] After passing the quality control, the clean_data file was aligned to the human reference genome to filter the host gene sequence. The total length of the sequence before and after filtering was reduced from 2126422bp to 1753522bp. At the same time, the clean_data file was obtained, which reduced the ineffective occupation of computing and storage resources and retained high-quality management sequences that are more likely to represent real biological characteristics, thereby enhancing the biological significance of the research results.
[0067] Step 3: Sequence alignment and assembly
[0068] Bowtie2 was used for alignment, samtools was used for host filtering, and the preprocessed sequence data was aligned with the host reference genome to extract the genome sequence information of the pathogen. For sequences that could not be directly aligned to the reference genome, the assembly software MetaSPAdes was used for assembly to obtain a more complete genome sequence.
[0069] During the assembly process, 24 CPU processes were used with the options '--k-min 21--k-max 79--k-step10'. After assembly, the total length of all contigs was 30200 bp, N50 was 29775 bp, and the complete viral genome sequence fasta file was obtained.
[0070] Step 4: Family typing
[0071] After obtaining the genome sequence of the pathogen, Blast is used for family typing to determine the genetic relationship and kinship between different samples, providing a basis for subsequent phylogenetic analysis. During the typing process, the sequences are re-aligned and sorted according to sequence similarity. If the sample sequence has a typing similarity of up to 99.9%, it is identified as that typing. Taking sample SRR15599128 as an example, the typing is identified as B.1.526.
[0072] Step 5: Integrate multi-sample results
[0073] Based on the automated management of NextFlow, all samples are subjected to pedigree typing analysis and the results are integrated. Figure 2 shown.
[0074] Step 6: Phylogenetic Analysis
[0075] The fasta files of all samples were aligned with clustalW multiple sequences, and the best nucleotide substitution model was obtained as TN92. Finally, the whole genome development tree was constructed by Mega software based on the NJ method. The constructed phylogenetic tree is shown in the figure. Figure 3 shown.
[0076] Step 7: Result output and visualization
[0077] Based on the automated management of nextflow, the visualization results of the entire analysis process are integrated into a web report. In the process of integrating the report, HTML technology is used to build a basic layout framework, and then the visualization results are embedded in it to achieve real-time data update function, creating an intuitive and highly interactive friendly interface for users.
[0078] Example 2
[0079] refer to Figure 2 , an automated pathogen genome phylogeny analysis system based on Nextflow, comprising: a nextflow workflow framework, a pathogen reference genome database module, a data preprocessing module, a sequence alignment module, a sequence assembly module, a pathogen family typing analysis module, a multi-sample typing integration module, a phylogeny analysis module, and a result output and visualization module arranged under the framework;
[0080] The pathogen reference genome database module stores common pathogen reference genome data and can be continuously updated and expanded; it can be obtained by crawling common public datasets such as the gcpathogen database, NCBI database, etc. using Python crawler technology.
[0081] The data preprocessing module can preprocess, filter, and quality control the raw sequence data obtained by high-throughput sequencing; the Trimmomatic tool can be used for preprocessing and filtering to remove low-quality data, connector contamination, short sequences, and sequences containing too many N bases. Preferably, during filtering, the low-quality base percentage threshold is defined as 30 in the sequence, the retention quality is greater than 20, and sequences containing 10 or more N bases are removed. In this way, the Q30 before and after filtering is increased from 89.0% to 92.5%, which reduces the ineffective occupation of computing and storage resources, retains high-quality management sequences that are more likely to represent real biological characteristics, and thus enhances the biological significance of the research results.
[0082] The sequence comparison module can compare the preprocessed sequence data with the host reference genome to extract the genome sequence information of the pathogen; tools such as Bowtie2 can be used for comparison, and samtools tools can be used for host filtering.
[0083] The sequence assembly module can assemble the sequences to obtain a complete genome sequence; the MetaSPAdes tool can be used for assembly.
[0084] The pathogen pedigree typing analysis module can perform pedigree typing on pathogen genome sequences and determine the genetic relationship and kinship between different samples; the Blast tool is usually selected for pedigree typing analysis. The samples after re-alignment can be sorted according to sequence similarity. If the sample sequence has a typing similarity of up to 99.9%, it is identified as that typing.
[0085] The nextflow multi-sample typing integration module can integrate the pedigree typing results of all samples to form a database containing the genetic information of all samples;
[0086] The phylogenetic analysis module can construct a phylogenetic tree of the pathogen based on the integrated genetic information; and can construct a whole genome phylogenetic tree based on the NJ method through the mega tool.
[0087] The result output and visualization module can output and visualize the results of phylogenetic analysis. HTML technology can be used to build a basic layout framework, and then the visualization results can be embedded in it to achieve real-time data update function, with better interactive experience effect.
[0088] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0089] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A Nextflow-based automated pathogen genome phylogeny analysis method, characterized in that: The method is based on the Nextflow workflow and includes the following steps: Step 1: Create a pathogen reference genome database; Step 2: Data preprocessing: preprocess, filter, and quality control the raw data obtained by high-throughput sequencing to obtain clean data; Step 3: sequence alignment and assembly; Compare the preprocessed sequence data with the host reference genome to extract the pathogen's genome sequence information; after obtaining the sequence that cannot be compared to the human reference genome, perform de novo assembly to obtain the complete pathogen genome sequence; Step 4: Family typing; Analyze the extracted pathogen genome sequence information to confirm the pathogen's pedigree typing; Step 5: Integrate multi-sample results Using nextflow's automated management, all samples were subjected to pedigree typing analysis and the results were integrated; Step 6: Phylogenetic analysis: construct a phylogenetic tree of the pathogen based on the integrated genetic information; Step 7: Result output and visualization.
2. The method according to claim 1, characterized in that In the step 1, the pathogen reference genome data is crawled and integrated from the public database using python crawler technology to create the pathogen reference genome database.
3. The method according to claim 1, characterized in that In step 2, during the filtering process, the low-quality base percentage threshold in the sequence is defined as 30, the retention quality is greater than 20, and the sequences containing 10 or more N bases are removed.
4. The method according to claim 1, characterized in that In the step 4, during the typing process, the sequences are re-aligned and sorted according to sequence similarity. If the similarity of the sample sequence to the typing is as high as 99.9%, it is identified as the typing.
5. The method according to claim 1, characterized in that In step six, during the phylogenetic analysis, a whole genome development tree is constructed based on the NJ method.
6. The method according to claim 1, characterized in that In the step seven, HTML technology is used to construct a basic layout framework, and then the visualization results are embedded therein to achieve a real-time data update function.
7. An automated pathogen genome phylogeny analysis system based on Nextflow, characterized in that: It includes: nextflow workflow framework, pathogen reference genome database module, data preprocessing module, sequence alignment module, sequence assembly module, pathogen family typing analysis module, multi-sample typing integration module, phylogeny analysis module, result output and visualization module set under the framework; The pathogen reference genome database module stores common pathogen reference genome data and can be continuously updated and expanded; The data preprocessing module can preprocess, filter and quality control the raw sequence data obtained by high-throughput sequencing; The sequence comparison module can compare the preprocessed sequence data with the host reference genome to extract the genome sequence information of the pathogen; The sequence assembly module can assemble the sequence to obtain a complete genome sequence; The pathogen pedigree typing analysis module can perform pedigree typing on pathogen genome sequences to determine the genetic relationship and kinship between different samples; The multi-sample typing integration module can integrate the pedigree typing results of all samples to form a database containing the genetic information of all samples; The phylogenetic analysis module can construct a phylogenetic tree of the pathogen based on the integrated genetic information; the result output and visualization module can output and visualize the results of the phylogenetic analysis.
8. The system according to claim 7, characterized in that In the data preprocessing module, during filtering, a low-quality base percentage threshold of 30 is defined in the sequence, a quality greater than 20 is retained, and sequences containing 10 or more N bases are removed.
9. The system according to claim 7, characterized in that The pathogen family typing analysis module can sort the samples after re-alignment according to sequence similarity. If the similarity of the sample sequence to a typing is as high as 99.9%, it is identified as that typing.
10. The system according to claim 7, characterized in that The phylogenetic tree analysis module constructs a whole genome phylogenetic tree based on the NJ method.
Citation Information
Patent Citations
Rapid analysis method and system for genomes of pathogenic microorganisms
CN106886689A
Automatic analysis method and system for cyclic ribonucleic acid based on Nextflow
CN111243666A
SFTSV detection method based on nanopore metagenome sequencing
CN115976178A
Food pathogen bioinformatics
US20170124253A1
