A software-based method for identifying microbial species and sequences in metagenomic sequences

By combining multiple software tools to compare and convert host sequencing results, the problems of inaccurate results of metagenomic species annotation software and invisible result file formats are solved, and more accurate and intuitive identification of microbial species and sequences are achieved.

CN114882950BInactive Publication Date: 2024-11-01NORTHEAST FORESTRY UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210542553.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-18
Publication Date
2024-11-01
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The identification results of the existing metagenomic type annotation software are not accurate enough, and the output file format is not intuitive, so the output results cannot be effectively represented.

Method used

Using a combination method of multiple software tools, including bwa, samtools, bedtools, blastn, seqkit, etc., the comparison, format conversion, screening and assembly of host sequencing results with reference genomes can be generated to generate intuitive and trustworthy microbial species and sequences. document.

Benefits of technology

Improves the accuracy of microbial species identification and intuitiveness of results, removes unnecessary annotations and misassembled sequences, and generates smaller and more reliable microbial sequence files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114882950B_ABST
    Figure CN114882950B_ABST
Patent Text Reader

Abstract

The invention discloses a method for identifying microorganism species and sequences in metagenomic sequences based on software, and specifically relates to a method for identifying microorganism species and sequences in metagenomic data of ticks using software. The invention solves the problem that the identification results of metagenomic species annotation software are not accurate enough, and the output result file format cannot intuitively represent the output results. The invention uses multiple software to extract or process feature information of sequencing results, and performs multiple format conversions on the sequencing result files during processing, so that the finally obtained microorganism species file intuitively represents the species of microorganisms in the sequencing results and the classification system to which these microorganisms belong; the microorganism sequence file can intuitively represent the output results, and the file size is smaller and the data credibility is higher. The invention belongs to the field of genetic engineering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for identifying microbial species and sequences in metagenomic data, and in particular to a method for identifying microbial species and sequences in metagenomic data of ticks by using software, and belongs to the field of genetic engineering. Background Art

[0002] Gene sequencing technology, that is, the technology for determining gene sequences, is of great significance to the biological and medical industries. The first generation of gene sequencing technology usually refers to Sanger sequencing technology. With the continuous development of biotechnology, the second generation of gene sequencing technology (hereinafter referred to as second generation sequencing technology) with high throughput, high precision and low cost has gradually matured. However, the identification results of many metagenomic species annotation software are not accurate enough, inconsistent with the comparison results on NCBI, and the output result file format cannot intuitively represent the output results. Summary of the invention

[0003] In order to solve the problem that the identification results of metagenomic species annotation software are not accurate enough and the output result file format cannot intuitively represent the output results, the present invention further proposes a method for identifying microbial species and sequences in metagenomic sequences based on software.

[0004] The technical solution adopted by the present invention is:

[0005] It includes the following steps:

[0006] S1. Obtain the host sequencing results and the host reference genome, use the bwa software to create a bwa index file for the obtained host reference genome, and compare the bwa index file with the host sequencing results to generate a sam format file;

[0007] S2, using samtools software to convert the sam format files generated in S1 into bam format files, and filter and sort the bam format files to generate sorted bam format files;

[0008] S3, using bedtools software to convert the sorted bam format file generated in S2 into a fastq format file, and compress and assemble it to generate an assembly file and obtain the sequence of the assembly file;

[0009] S4, using blastn software to compare the sequence of the assembly file generated in S3 with the nt database to obtain a comparison result, screening the comparison result with a comparison length that meets the required length, and generating a file P;

[0010] S5, extracting information from the file P generated in S4, generating files u and E, and obtaining the types of all microorganisms in the sequencing results;

[0011] S6, matching the file P generated in S4 with the file E generated in S5 to generate a file s1, extracting the first column of sequence IDs in the file s1 to generate a sequence ID list m;

[0012] S7. Use seqkit software to extract the sequences in the assembly file generated in S3 that are consistent with the sequences in the sequence ID list m, generate the sequence m1 of the microorganism, and obtain the sequences of all microorganisms in the sequencing results.

[0013] Preferably, in S2, samtools software is used to convert the sam format file generated in S1 into a bam format file, and the bam format file is screened and sorted to generate a sorted bam format file. The specific process is:

[0014] S21, using samtools software to convert the sam format file generated in S1 into bam format file 1;

[0015] S22, filtering out the sequences in the bam format file 1 that have not been successfully paired with the host, and using the filtered sequences as the bam format file 2;

[0016] S23, sort the bam format file 2 to generate a sorted bam format file 3.

[0017] Preferably, the S3 uses bedtools software to convert the sorted bam format file generated in S2 into a fastq format file, compress and assemble it, generate an assembly file, and obtain the sequence of the assembly file. The specific process is:

[0018] S31, using bedtools software to convert the sorted bam format file 3 into two fastq format files, and compress them respectively to obtain two compressed fastq format files;

[0019] S32. Use megahit software to assemble the two compressed fastq format files to generate an assembly file and obtain the sequence of the assembly file.

[0020] Preferably, the comparison length of the required length in S4 is set by the user.

[0021] Preferably, in S5, information is extracted from the file P generated in S4 to generate files u and E, and the types of all microorganisms in the sequencing results are obtained. The specific process is:

[0022] S51, obtain the second column of data in file P, remove the characters on both sides of the accession number of the second column of data, sort and remove duplicates, and generate file a;

[0023] S52, using taxonkit software to compare file a with the taxonomy classification database to generate file r;

[0024] S53, searching for the line that does not contain the character Eukaryota in the file r, and removing the characters in front of the kingdom, phylum, class, order, family, genus and species, and then sorting and removing duplicates to generate a file u, and obtaining the types of all microorganisms in the sequencing results;

[0025] Find the line containing the Eukaryota character in the file r, extract the accession number corresponding to the line, and generate the file E.

[0026] Preferably, in S6, the file P generated in S4 is matched with the file E generated in S5 to generate a file s1, and the first column of sequence IDs in the file s1 is extracted to generate a sequence ID list m. The specific process is as follows:

[0027] S61, matching the file P generated in S4 with the file E, deleting the line in the file P that contains any access number of the file E, and obtaining the file P1;

[0028] S62, using the accession number in the second column of file P1 as a search condition to match the file r, outputting the line in file r containing the accession number in the second column of file P1, and removing other characters in front of the kingdom, phylum, class, order, family, genus and species in this line to generate file S;

[0029] S63, extract the first column and the third column of file P and merge them with file S into a file s1, extract the first column of sequence ID in file s1 to generate a sequence ID list m.

[0030] Beneficial effects:

[0031] The present invention firstly compares the sequencing result of the known host A metagenome (including the sequence of host A and the sequence of the microorganism carried by host A) with the corresponding reference genome of host A in the database by using bwa software, and generates a comparison file in sam format; uses samtools software to convert the sam format file into a bam format file, removes the sequence of host A in the bam format file, retains the sequence of the microorganism carried by host A, and is convenient for identifying the type and sequence of the microorganism in the sequencing result, and generates a new bam format file; uses bedtools software to convert the new bam format file into a fastq format file, compresses and assembles it, generates an assembly file, and obtains the sequence of the assembly file; uses blastn software to compare the sequence of the obtained assembly file with the nt database, screens the comparison length that meets the required length (set by the user) in the comparison result, and generates a file P (P_annotation.xls); extracts information from the file P, generates a file u (uniq_Microbe_annotation.txt, a line that does not contain Eukaryota characters) and a file E (Eurkary_accession, a line that contains Eukaryota characters), and obtains the types of all microorganisms in the sequencing result. Match file P with file E to generate file s1, extract the first column of sequence ID in file s to generate sequence ID list m (microbe_ID.txt), use seqkit software to extract the sequences in the assembly file that are consistent with the sequences in sequence ID list m, generate sequence file m1 (microbe_query.fasta) of all microorganisms, and obtain the sequences of all microorganisms in the sequencing results.

[0032] The microbial species file is displayed in the form of kingdom, phylum, class, order, family, genus and species corresponding to the sequences of microorganisms with high credibility and annotation in the comparison result file. The present invention uses multiple software to extract or process the feature information of the sequencing results. During the processing, the sequencing result file is converted into a format multiple times, so that the microbial species file finally obtained intuitively represents the types of microorganisms in the sequencing results and the classification system to which these microorganisms belong; the microbial sequence file finally obtained is a microbial sequence with high credibility, and unnecessary sequences annotated to eukaryotes and incorrectly assembled sequences are removed, so that the microbial sequence file can intuitively represent the output result, and the file size is smaller and the data credibility is higher. The present invention can realize the analysis of all microbial species in the metagenomic data from the original sequencing data, the extraction of microbial sequences and the generation of a more intuitive and clear comparison result file. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 is a flow chart of the present invention;

[0034] Figure 2 This is the format of the comparison result summary file blastn_nt.txt in S2;

[0035] Figure 3 This is the format diagram of file P (P_annotation.xls) in S4;

[0036] Figure 4 This is the format diagram of file a (all_accession) in S5;

[0037] Figure 5 This is the format of the file r (reformat.txt) in S5. The number before “:” is the accession number, and the number after “:” is the kingdom, phylum, class, order, family, genus and species of the species corresponding to this accession number.

[0038] Figure 6 This is the format diagram of file u (uniq_Microbe_annotation.txt) in S5;

[0039] Figure 7 This is the format diagram of file E (Eurkary_accession) in S6;

[0040] Figure 8 This is the format diagram of file S (SequenceID_reformat.txt) in S6;

[0041] Fig. 9 This is the format diagram of file s1 (sequence_annotation.txt) in S6;

[0042] Fig.10 This is the format diagram of file m (microbe_ID.txt) in S6; DETAILED DESCRIPTION

[0043] Specific implementation method 1: Combination Figure 1-Figure 10 This embodiment describes a method for identifying microbial species and sequences in a metagenomic sequence based on software, which includes the following steps:

[0044] S1. Obtain the host's sequencing results and host reference genome, use bwa software to create a bwa index file for the obtained host reference genome, and compare the bwa index file with the host's sequencing results to generate a sam format file.

[0045] Taking ticks as an example, double-end sequencing is used to extract DNA or cDNA of ticks and send it to a biological company for gene sequencing to obtain the sequencing results of the tick metagenome (including the sequence of ticks and the sequence of tick-carried microorganisms). The sequencing results are two fastq format files. At the same time, the host reference genome of the tick is downloaded from NCBI. The host reference genome is composed of the genome of ticks measured by some institutions and transmitted to NCBI. According to the host reference genome of the tick, the bwa index file of the tick (host) is established using the existing bwa software, and the bwa index file of the tick is compared with all the sequences of the obtained tick metagenome sequencing results (two fastq format files) using the bwa software. The sequence that successfully compares proves to be the sequence of the tick, otherwise it is not the sequence of the tick. The comparison result generates a sam format comparison file.

[0046] S2. Use samtools software to convert the sam format files generated in S1 into bam format files, and filter and sort the bam format files to generate sorted bam format files. The specific process is as follows:

[0047] Utilize existing samtools software to convert the sam format file generated in S1 into bam format file 1, be equivalent to carry out binary processing to sam format file, the bam format file 1 obtained occupies less than sam format file storage, guarantee faster speed during data processing. Because the present invention is to identify the microorganism species carried by the host, therefore need to remove the sequence of the host (tick) by contrast screening, then utilize samtools software to screen out the sequence that is unsuccessful in pairing with the host in bam format file 1, use the screened sequence as new bam format file 2, then utilize samtools software to sort bam format file 2 (sorting method: samtools software defaults to sorting by the sequence in the fasta file (i.e. header) and the sequence from left to right site), generate sorted bam format file 3, be convenient for subsequent processing.

[0048] S3, use bedtools software to convert the sorted bam format files generated in S2 into fastq format files, compress and assemble them, generate assembly files, and obtain the sequence of the assembly files. The specific process is as follows:

[0049] Use the existing bedtools software to automatically convert the sorted bam format file 3 into two fastq format files. At this time, most of the host (tick) sequences have been removed from the fastq files, and the two fastq format files are compressed to obtain two compressed fastq format files. At the same time, the sam format file in S1 and all bam format files in S2 are deleted. The purpose of deletion is to free up hard disk space and reduce the occupied space of stored information. Use the existing megahit software (sequence assembly software) to assemble the two compressed fastq format files according to the overlapping relationship between sequences, that is, assemble the very short sequences in the two fastq format files into a longer fasta format file. The assembled sequences will be longer and more credible when comparing, generating an assembly file and obtaining the sequences of the assembly file.

[0050] S4. Use the existing blastn software to compare the sequences of the assembly file generated in S3 with the existing nt database to obtain the comparison result summary file blastn_nt.txt, as Figure 2 shown: Among them, the first column is the sequence ID of the assembly file, the second column is the gi number and accession number, the third column is the comparison length, the fourth column is the e-value, the fifth column is the maximum score of the comparison, and the sixth column is the information of the species compared to. Use the blastn software to screen the comparison lengths that meet the required length (set by the user) in the comparison result summary file blastn_nt.txt to generate a new comparison result summary file P (P_annotation.xls).

[0051] S5. Extract information from the file P generated in S4 to generate file u and file E to obtain all the types of microorganisms in the sequencing results. The specific process is as follows:

[0052] Obtain the data in the second column of the file P (P_annotation.xls), and remove the other characters on both sides of the accession number (sequence identifier: the data of this sequence can be found in databases such as taxonomy through the accession number) in the second column data, as Figure 3 shown. In the figure, only the content from gi| to | in the second column is the accession number. Therefore, when obtaining the accession number, the other characters on both sides need to be deleted. At the same time, the accession numbers corresponding to many sequences are repeated, so duplicates need to be removed. In this way, when comparing the accession numbers with the taxonomy classification database to obtain the corresponding kingdom, phylum, class, order, family, genus, and species later, repeated operations can be avoided. Then perform sorting (sorting condition: sorting in the order of ASCII code) and remove duplicates to generate file a (all_accession), as Figure 4Use the existing taxonkit software to query and compare the file a (all_accession) with the taxonomy classification database to generate a file r (reformat.txt), the format of which is as follows Figure 5 Find the line that does not contain the character Eukaryota in the file r (reformat.txt), remove the characters in front of the kingdom, phylum, class, order, family, genus and species, sort it (sorting condition: sorting in the order of ASCII code), remove duplicates, and generate the file u (report file 1: uniq_Microbe_annotation.txt) to obtain the types of all microorganisms in the sequencing results, such as Figure 6 Find the line containing the Eukaryota character in the file r (reformat.txt), extract the accession number corresponding to the line, and generate the file E (Eurkary_accession, also known as a column of eukaryotic accession numbers), as shown in Figure 7 for subsequent operations.

[0053] S6, match the file P generated in S4 with the file E generated in S5 to generate a file s1, extract the first column of sequence IDs in the file s1 to generate a sequence ID list m, the specific process is:

[0054] The file P (P_annotation.xls) generated in S4 is matched with the file E to search, and the rows in the file P that contain any accession number in the file E are deleted. For example, if a row in the file P (P_annotation.xls) contains any accession number in the file E (Eurkary_accession), the row is deleted to obtain the microbial comparison result file P1. The accession number in the second column of the microbial comparison result file P1 is used as the search condition to match the file r (reformat.txt) line by line. For example, if a row in the file r (reformat.txt) contains the accession number in the second column of the microbial comparison result file P1, the row is directly output, and then other characters in front of the kingdom, phylum, class, order, family, genus and species of this row are removed to generate the file S (SequenceID_reformat.txt). Figure 8 As shown; Finally, extract the first column (sequence ID column) and the third column (alignment length) of the file P (P_annotation.xls), and merge these two columns with the file S (SequenceID_reformat.txt) to form a new format of microbial comparison result file s1 (Report 2: sequence_annotation.txt), as shown Fig. 9As shown; extract the first column of sequence ID in the new format of microbial comparison result file s1 to generate a sequence ID list m (microbe_ID.txt), such as Fig.10 shown.

[0055] S7. Use the existing seqkit software to extract the sequences in the assembly file generated in S3 that are consistent with the sequences in the sequence ID list m (microbe_ID.txt), generate the microbial sequence m1 (microbe_query.fasta), and obtain the sequences of all microorganisms in the sequencing results.

[0056] Example

[0057] P1 and P2 are the names of tick (host) sequencing samples.

[0058]

[0059]

[0060] In the implementation case of the present invention, the first software version of the process for identifying the microbial species composition of the metagenomic sequence has been verified on the metagenomics of ticks (about 10 tick metagenomic samples), and the software in this implementation case can also be used on other species after modification.

Claims

1. A method for identifying microbial species and sequences in a metagenomic sequence based on software, characterized in that: It includes the following steps: S1. Obtain the host sequencing results and the host reference genome, use the bwa software to create a bwa index file for the obtained host reference genome, and compare the bwa index file with the host sequencing results to generate a sam format file; S2, using samtools software to convert the sam format files generated in S1 into bam format files, and filter and sort the bam format files to generate sorted bam format files; S3, using bedtools software to convert the sorted bam format file generated in S2 into a fastq format file, and compress and assemble it to generate an assembly file and obtain the sequence of the assembly file; S4, using blastn software to compare the sequence of the assembly file generated in S3 with the nt database to obtain a comparison result, screening the comparison result with a comparison length that meets the required length, and generating a file P; S5. Extract information from the file P generated in S4 to generate files u and E, and obtain the types of all microorganisms in the sequencing results, specifically: S51, obtain the second column of data in file P, remove the characters on both sides of the accession number of the second column of data, sort and remove duplicates, and generate file a; S52, using taxonkit software to compare file a with the taxonomy classification database to generate file r; S53, searching for the line that does not contain the character Eukaryota in the file r, and removing the characters in front of the kingdom, phylum, class, order, family, genus and species, and then sorting and removing duplicates to generate a file u, and obtaining the types of all microorganisms in the sequencing results; Find the line containing the Eukaryota character in the file r, extract the accession number corresponding to the line, and generate the file E; S6, matching the file P generated in S4 with the file E generated in S5 to generate a file s1, extracting the first column of sequence IDs in the file s1 to generate a sequence ID list m; S7. Use seqkit software to extract the sequences in the assembly file generated in S3 that are consistent with the sequences in the sequence ID list m, generate the sequence m1 of the microorganism, and obtain the sequences of all microorganisms in the sequencing results.

2. The method for identifying microbial species and sequences in a metagenome sequence based on software according to claim 1, characterized in that: In S2, the sam format file generated in S1 is converted into a bam format file using the samtools software, and the bam format file is screened and sorted to generate a sorted bam format file. The specific process is as follows: S21, using samtools software to convert the sam format file generated in S1 into bam format file 1; S22, filtering out the sequences in the bam format file 1 that have not been successfully paired with the host, and using the filtered sequences as the bam format file 2; S23, sort the bam format file 2 to generate a sorted bam format file 3.

3. The method for identifying microbial species and sequences in a metagenome sequence based on software according to claim 2, characterized in that: In S3, the sorted bam format file generated in S2 is converted into a fastq format file using bedtools software, and then compressed and assembled to generate an assembly file and obtain the sequence of the assembly file. The specific process is as follows: S31, using bedtools software to convert the sorted bam format file 3 into two fastq format files, and compress them respectively to obtain two compressed fastq format files; S32. Use megahit software to assemble the two compressed fastq format files to generate an assembly file and obtain the sequence of the assembly file.

4. The method for identifying microbial species and sequences in a metagenome sequence based on software according to claim 3, characterized in that: The comparison length of the required length in S4 is set by the user.

5. The method for identifying microbial species and sequences in a metagenome sequence based on software according to claim 4, characterized in that: In S6, the file P generated in S4 is matched with the file E generated in S5 to generate a file s1, and the first column of sequence IDs in the file s1 is extracted to generate a sequence ID list m. The specific process is as follows: S61, matching the file P generated in S4 with the file E, deleting the line in the file P that contains any access number of the file E, and obtaining the file P1; S62, using the accession number in the second column of file P1 as a search condition to match the file r, outputting the line in file r containing the accession number in the second column of file P1, and removing other characters in front of the kingdom, phylum, class, order, family, genus and species in this line to generate file S; S63, extract the first column and the third column of file P and merge them with file S into a file s1, extract the first column of sequence ID in file s1 to generate a sequence ID list m.