A microbial classification-based integrated management method and device, a terminal, and a storage medium
Patent Information
- Application Number
- CN202611079579.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-20
- Publication Date
- 2026-08-18
AI Technical Summary
[0005]本申请提供了基于微生物分类的一体化管理方法、装置、终端及介质,以解决相关技术中网页型数据库通常适合单条名称检索,不适合对大量分类单元进行批量、可重复的谱系查询,导致查询成本较高的技术问题
[0015] The beneficial effects of this invention are as follows: The method of this embodiment obtains a data source and then obtains a wide-format classification framework based on the data source; the wide-format classification framework is converted into a long-format classification unit index, which includes: accepted name, normalized name, synonyms, order, and complete lineage; based on the long-format classification unit index, a lineage query is performed on the classification name of any order to obtain a complete lineage result matching the classification name. This application transforms the wide-format classification framework into a computable, batch-searchable, and updatable data asset through the long-format classification unit index, thereby enabling arbitrary order lineage queries. It is suitable for batch, repeatable lineage queries on a large number of classification units, reducing query costs.
Smart Images

Figure CN122594399A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of bioinformatics technology, and in particular to an integrated management method, device, terminal and storage medium based on microbial classification. Background Technology
[0002] The classification system of microbial groups is frequently updated. Microbial groups include fungi, bacteria, archaea, viruses, and others. Many groups exhibit issues such as name changes, synonyms, adjustments to taxonomic hierarchy, and inconsistencies in lineage across different literature, databases, and public data submissions. When conducting species identification, phylogenetic tree reconstruction, barcode reference database construction, or public genome sampling, researchers typically need to obtain the complete lineage of a specific taxonomic unit, the number of its subordinate groups, the availability of public genomes, and the accessibility of sequence records.
[0003] However, currently, relevant information is usually obtained by relying on web-based databases. Web-based databases are generally suitable for single-name retrieval, but not suitable for batch, repeatable genealogical annotation of a large number of taxonomic units, resulting in high query costs.
[0004] Therefore, existing technologies have shortcomings and need to be improved and developed. Summary of the Invention
[0005] This application provides an integrated management method, device, terminal, and medium based on microbial classification to solve the technical problem that web-based databases are generally suitable for single-name retrieval but not for batch, repeatable phylogenetic queries of a large number of taxonomic units, resulting in high query costs.
[0006] To achieve the above objectives, this application adopts the following technical solution: An integrated management method based on microbial classification, the method comprising: Obtain the data source and, based on the data source, obtain a wide-format classification framework; Read the wide-format classification framework line by line, traverse each classification level, and generate an index record for each non-empty acceptor name based on each classification level. Based on the predetermined symbols in the synonym field of the wide-format classification framework, synonyms are split, and an index record is generated for each synonym. A corresponding identifier field is set to generate a long-format classification unit index. The long-format classification unit index includes: accepted name, normalized name, synonym, order, and complete lineage. The normalized name is generated by a predetermined normalization function. The processing operations of the predetermined normalization function include: characterization, whitespace compression, deletion of leading and trailing whitespace, and lowercase conversion. Based on the long-format classification unit index, a genealogical query is performed on the classification name of any order to obtain a complete genealogical result matching the classification name.
[0007] In one embodiment of this application, before converting the wide-format classification framework into a long-format classification unit index, the method further includes: Read the wide-format classification framework, perform column name standardization, null value normalization, time field normalization, and character field cleaning to obtain the standardized wide-format classification framework; The standardized wide-format classification framework is validated based on preset structural check items. The structural check items include at least one of the following: column name uniqueness, existence of required fields, number of data rows, and whether the classification order field has at least one non-null value.
[0008] In one embodiment of this application, based on the long-format taxonomic unit index, a genealogical query is performed on the classification name of any order to obtain a complete genealogical result matching the classification name, including: Receive one or more arbitrary-order category names input by the user, normalize the category names to obtain normalized category names; Based on the standardized classification name, accept name priority matching is performed in the long-format classification unit index; If no matching name is found and matching synonyms is allowed, then synonym matching is performed to obtain the complete genealogical results matching the classification name.
[0009] In one embodiment of this application, based on the long-format classification unit index, a genealogical query is performed on the classification name of any order to obtain a complete genealogical result matching the classification name, which further includes: If the same category name corresponds to multiple candidate lineages, all candidate lineages are retained, and the ambiguity identifier field corresponding to the candidate lineage is assigned a true value. Obtain a preset matching priority, determine a first candidate lineage from the candidate lineages according to the matching priority, and use the first candidate lineage as the complete lineage result for matching the classification name.
[0010] In one embodiment of this application, after performing a genealogical query on the classification name of any order based on the long-format classification unit index to obtain a complete genealogical result matching the classification name, the method further includes: Parse the accepted name and order of the category name input by the user, and return the next-level category unit of the category name; Based on the complete phylogenetic results and lower-level classification units corresponding to the classification name entered by the user, the target database is retrieved to obtain public genome metadata. The genomic records of the group to which the classification name belongs are extracted by matching and filtering in the classification fields of the public genome metadata. Using the user-input category name and corresponding order as the statistical range, the quality assessment indicators of all genomes within the statistical range are obtained, and the genome coverage results corresponding to the lower-level taxa are statistically analyzed. The genomes in the genome record are classified and filtered according to the quality assessment indicators to obtain a high-quality reference genome.
[0011] In one embodiment of this application, the method further includes: If an update instruction for the wide-format classification framework is received, the updated version of the wide-format classification framework is obtained. The classification order, normalized acceptance name, and parent genealogical context of the updated version and the previous version of the wide-format classification framework are compared to identify the change type and save the change record. When searching the target database, the search results corresponding to the predefined search parameters are saved to the local cache. When searching with the same search parameters, the local cache is read. The search parameters include: the name of the target database, the search expression generated based on the category name input by the user, and the maximum number of entries returned in a single search.
[0012] This application also provides an integrated management device based on microbial classification, the device comprising: The acquisition module is used to acquire a data source and obtain a wide-format classification framework based on the data source. The reading module is used to read the wide-format classification framework line by line, traverse each level of classification order, and generate an index record for each non-empty acceptor name based on each level of classification order. The generation module is used to split synonyms based on predetermined symbols in the synonym field of the wide-format classification framework, generate an index record for each synonym, and set a corresponding identifier field to generate a long-format classification unit index. The long-format classification unit index includes: accepted name, normalized name, synonym, order, and complete lineage. The normalized name is generated by a predetermined normalization function, and the processing operations of the predetermined normalization function include: characterization, whitespace compression, deletion of leading and trailing whitespace, and lowercase conversion. The query module is used to perform a genealogical query on the classification name of any order based on the long format classification unit index, and obtain a complete genealogical result matching the classification name.
[0013] This application also provides a terminal, including: a memory, a processor, and an integrated management program based on microbial classification stored in the memory and executable on the processor, wherein the integrated management program based on microbial classification, when executed by the processor, implements the steps of the integrated management method based on microbial classification as described above.
[0014] This application also provides a computer-readable storage medium storing a computer program that can be executed to implement the steps of the integrated management method based on microbial classification as described above.
[0015] The beneficial effects of this invention are as follows: The method of this embodiment obtains a data source and then obtains a wide-format classification framework based on the data source; the wide-format classification framework is converted into a long-format classification unit index, which includes: accepted name, normalized name, synonyms, order, and complete lineage; based on the long-format classification unit index, a lineage query is performed on the classification name of any order to obtain a complete lineage result matching the classification name. This application transforms the wide-format classification framework into a computable, batch-searchable, and updatable data asset through the long-format classification unit index, thereby enabling arbitrary order lineage queries. It is suitable for batch, repeatable lineage queries on a large number of classification units, reducing query costs. Attached Figure Description
[0016] Figure 1 This is a flowchart of a preferred embodiment of the integrated management method based on microbial classification in this invention.
[0017] Figure 2 This is an overall framework diagram of a preferred embodiment of the integrated management method based on microbial classification in this invention.
[0018] Figure 3 This is a functional principle block diagram of a preferred embodiment of the integrated management device based on microbial classification in this invention.
[0019] Figure 4 This is a functional principle block diagram of a preferred embodiment of the terminal in this invention. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0021] Taking fungi as an example, researchers often rely on NCBI (National Center for Biotechnology Information) databases such as NCBI Taxonomy, MycoBank, Index Fungorum, UNITE (Unified Information Database of Fungal ITS Barcodes), SILVA (Sociosomal RNA Reference Database), GTDB (Genome-Based Prokaryotic Taxonomy Database), or manually compiled tables to obtain relevant information. While these resources can provide some classification or sequence information, they still have the following limitations: First, batch queries are inconvenient: existing web-based databases are usually suitable for single-name retrieval, but not for batch, repeatable genealogical annotation of a large number of taxonomic units in the R analysis process; Second, inconsistent classification rules: different databases handle accepted names, synonyms, and parent lineages differently, which can easily lead to the same classification name corresponding to different lineages in different analysis steps; Third, it is difficult to integrate user-built classification frameworks: fungal systematics research often relies on framework tables compiled by experts, but existing tools lack a general process for converting the framework into a searchable and computable index. Fourth, the genome sampling coverage is opaque: when constructing phylogenetic trees, researchers find it difficult to quickly determine which groups within a phylum, class, order, family, or genus have a common genome and which groups have sampling gaps; Fifth, inconsistent genome quality: Public genome records vary in assembly quality, BUSCO integrity, deletion rate, duplication rate, and classification submission information. If not screened uniformly, this may affect the results of phylogenetic and reference database construction. BUSCO is a genome integrity assessment method based on a universal single-copy orthologous gene. Sixth, the classification framework update lacks a traceability mechanism: manually maintained Excel spreadsheets are often difficult to track after multiple revisions, including additions, deletions, genealogical adjustments, changes in synonyms, and changes in metadata; Seventh, external sequence database retrieval costs are high: querying databases such as NCBI and nuccore one by one is time-consuming and prone to repeated requests, and there is a lack of a caching retrieval mechanism oriented to classification units.
[0022] Therefore, existing technologies lack an integrated management method for biological group classification frameworks, synonym indexes, public genome quality control, database retrieval, and traceable updates. In particular, there is a lack of technical solutions that can be directly invoked, pipelined, batched, and visualized in the R language (R programming language, a statistical computing and plotting programming language) data analysis environment.
[0023] This application enables timely screening and updating of the classification framework based on the latest references. This application achieves: (1) a built-in high-quality classification framework (such as a fungal classification framework) that is reviewed, manually corrected, and updated; (2) the construction of a built-in database, which consists of quality assessment indicators obtained after statistical analysis of public genomes, data which are not available in public genomes. Due to the lag and unclear quality of genomic classification information, this application forms the built-in database by pre-collecting, statistically analyzing, and processing genomic data. Furthermore, this application only requires updating an Excel spreadsheet to automatically record modification history and versions.
[0024] Taking fungi as an example, this application provides a method for fungal classification framework, lineage lookup, public genome quality control and sequence acquisition. The method uses R language packages (such as fungioutline) as the implementation carrier to unify the fungal classification framework compiled by experts, synonym fields, public fungal genome metadata, BUSCO quality assessment results and NCBI nucleic acid sequence database sequence retrieval results into a reproducible software process.
[0025] The following describes, with reference to the accompanying drawings, an integrated management method, apparatus, terminal, and storage medium based on microbial classification according to embodiments of this application. Addressing the problem mentioned in the background art that web-based databases are typically suitable for single-name retrieval but unsuitable for batch, repeatable lineage queries on a large number of taxonomic units, leading to high query costs, this application provides an integrated management method based on microbial classification. In this method, a data source is acquired, and a wide-format classification framework is obtained based on the data source. The wide-format classification framework is then converted into a long-format taxonomic unit index, which includes: accepted name, normalized name, synonyms, rank, and complete lineage. Based on the long-format taxonomic unit index, a lineage query is performed on the classification name at any rank to obtain a complete lineage result matching the classification name. This application, through the long-format taxonomic unit index, transforms the wide-format classification framework into a computable, batch-retrievalable, and updatable data asset, thereby enabling arbitrary-rank lineage queries. This is suitable for batch, repeatable lineage queries on a large number of taxonomic units, reducing query costs.
[0026] For example, taking a fungal taxonomy framework as an example, this application reads and standardizes a manually maintained fungal taxonomy framework; constructs a long-format taxonomic unit index based on accepted names and synonyms; receives arbitrary-order taxonomic names and performs accepted-name priority matching, synonym matching, and ambiguity retention; obtains the complete lineage, sub-taxonomic units, and number of each order for the matched taxonomic unit; and associates the lineage results with public genome metadata and BUSCO quality indicators; wherein, the BUSCO quality indicators are built-in data of the software in this application, not public data. High-quality genomes are screened based on quality thresholds; the manually updated Excel taxonomic framework is versioned and differences are tracked; and the number of sequence records or accession information for a specified taxonomic unit in the NCBI nucleic acid sequence database is queried in a cached manner.
[0027] Compared with traditional methods of querying databases one by one or manually maintaining tables, this invention enables arbitrary-order, batch, interpretable, traceable, and visualized fungal classification and genome information retrieval, significantly reducing the cost of manual queries, improving the consistency of pedigree information, the representativeness of phylogenetic sampling, the efficiency of public genome quality screening, and the reproducibility of reference database construction.
[0028] For example, this invention adopts a modular software architecture, mainly including a data reading and verification module, a taxonomic unit index construction module, a lineage matching module, a lower-level classification statistics module, a genome metadata association module, a BUSCO quality assessment module, a traceable update module, an NCBI retrieval cache module, and a visualization module. Each module can be called independently or combined to form a complete workflow from taxonomic framework maintenance, lineage query, sampling evaluation to result visualization. The architecture is shown in Table 1. Table 1
[0029] Please see Figure 1 The integrated management method based on microbial classification described in this embodiment of the invention includes the following steps: Step S100: Obtain the data source and obtain a wide-format classification framework based on the data source.
[0030] In one embodiment, the data source includes: a taxonomic framework field corresponding to a microbial group and a genome metadata field.
[0031] For example, taking the fungal framework as an example, two core data sources are read: First, an Excel file of the fungal classification framework compiled by experts, containing 10,686 records and 21 fields; second, an Excel file of public fungal genome metadata, containing 22,880 records and 54 fields. The classification framework fields include kingdom, subkingdom, subkingdom synonyms, phylum, phylum synonyms, subphylum, subphylum synonyms, class, class synonyms, subclass, subclass synonyms, order, order synonyms, family, family synonyms, genus, genus synonyms, updated time, updated type, updated note, and updated link.
[0032] The genome metadata fields include: genome label, scientific name, species identifier, genus identifier, family identifier, order identifier, class identifier, phylum, class, order, family, genus, species, accession number, assembly statistics, GC (guanine-cytosine base) statistics, BUSCO C (complete gene), S (complete single copy gene), D (complete multiple copy gene), F (fragmented gene), M (deleted gene), total number of BUSCO baseline genes, number of qualified BUSCO genes, suspected type strain marker, taxid, etc.
[0033] like Figure 1 As shown, the integrated management method based on microbial classification further includes the following steps: Step S200: Read the wide-format classification framework line by line, traverse each classification level, and generate an index record for each non-empty acceptor name based on each classification level. Step S300: Based on the predetermined symbols in the synonym field of the wide-format classification framework, the synonyms are split, an index record is generated for each synonym, and a corresponding identifier field is set to generate a long-format classification unit index. The long-format classification unit index includes: accepted name, normalized name, synonym, order, and complete lineage. The normalized name is generated by a predetermined normalization function, and the processing operations of the predetermined normalization function include: characterization, whitespace compression, deletion of leading and trailing whitespace, and lowercase conversion.
[0034] In this embodiment of the application, before step S200, the method further includes: reading the wide-format classification framework, performing column name standardization, null value normalization, time field normalization, and character field cleaning to obtain a standardized wide-format classification framework; verifying the standardized wide-format classification framework based on preset structural check items, the structural check items including column name uniqueness, existence of required fields, number of data rows, and whether the classification order field has at least one non-null value.
[0035] For example, the system reads the original classification framework using the fungal classification data reading function `read_fungi_outline()`, and performs column name standardization, null value normalization, time field normalization, and character field cleaning using the data standardization function `standardize_outline()`. The standardized column names are in the `snake_case` format for stable referencing within the Tidyverse pipeline (a set of packages in R for data preparation, pipeline processing, and visualization). The classification outline data validation function `validate_fungi_outline()` performs a structural check on the standardized framework, including column name uniqueness, the existence of required fields, the number of data rows, and whether the classification rank field has at least one non-null value. When a fatal check fails, the system can abort the process and return a structured error message, thus preventing erroneous input from entering subsequent indexing and query steps.
[0036] For example, the system converts a wide-format taxon framework into a long-format index using the taxon index building function `build_taxon_index()`. For each row of the taxon framework, the system iterates through taxonomic ranks such as kingdom, subkingdom, phylum, subphylum, class, subclass, order, family, genus, and optional species, generating a searchable index record for each non-empty acceptor name.
[0037] For synonym fields such as phylum_syn, class_syn, family_syn, and genus_syn, the system separates synonyms using either English or Chinese semicolons and generates an index record marked as a synonym (is_synonym = TRUE) for each synonym. Each index record retains the following information: taxon name, normalized taxon name, accepted name, normalized accepted name, rank, whether it is a synonym (is_synonym), corresponding accepted name number (synonym_of), source row number (source_row_id), update time (updated_time), update type (update_type), update note (update_note), update link (update_link), and complete parent genealogy.
[0038] The normalized names in the index are generated by the category name normalization function fo_normalize_taxon_name(), which includes characterization, whitespace compression, leading and trailing whitespace removal, and lowercase conversion. This design enables the system to achieve case-insensitive and whitespace-stable matching while preserving the original names.
[0039] like Figure 1 As shown, the integrated management method based on microbial classification further includes the following steps: Step S400: Based on the long-format classification unit index, perform a genealogical query on the classification name of any order to obtain a complete genealogical result matching the classification name.
[0040] In this embodiment of the application, step S400 specifically includes: receiving one or more arbitrary order classification names input by the user, normalizing the classification names to obtain normalized classification names; performing acceptor name priority matching in the long format classification unit index based on the normalized classification names; if no acceptor name is matched and matching is allowed for homonyms, then performing homonym matching to obtain a complete genealogical result matching the classification names.
[0041] For example, a user can input one or more arbitrary order classification names through the lineage retrieval function `get_lineage()`. The system first normalizes the input names, then performs acceptor name priority matching in the index; if no acceptor name is found and matching synonyms (`match_synonym`) is allowed, then synonym matching is performed.
[0042] This application improves the accuracy of classification retrieval and the interpretability of results by accepting name-priority and homonymous secondary matching.
[0043] In one embodiment of this application, step S400 further includes: if the same input classification name corresponds to multiple candidate lineages, then all candidate lineages are retained, and the ambiguity identifier field corresponding to the candidate lineage is assigned a true value; a preset matching priority is obtained, and a first candidate lineage is determined in the candidate lineages according to the matching priority, and the first candidate lineage is used as the complete lineage result of matching the classification name.
[0044] For example, if the same input name corresponds to multiple candidate lineages, the system retains all candidate lineages and sets a name ambiguous flag (is_ambiguous = TRUE); if the user sets a best match flag (best_match = TRUE), the system prioritizes each candidate lineage according to its accepted name and lower-level classification rank, and selects the candidate lineage ranked first. This design ensures that ambiguity is not hidden and can output auditable candidate results when needed.
[0045] Additionally, for existing sample tables or candidate classification lists, the lineage supplementation function `add_lineage()` supports two tidy-evaluation input methods: bare column names and string column names, such as `add_lineage(df, taxon_col = genus)` or `add_lineage(df, taxon_col = "genus")`. The output preserves the original row order and appends the match type, acceptance name, classification rank, and lineage fields for each level.
[0046] This application improves the accuracy of classification retrieval and the interpretability of results through an ambiguity retention mechanism.
[0047] In this embodiment, after step S400, the method further includes: parsing the accepted name and order of the user-input classification name, and returning the lower-level classification unit of the classification name; searching the target database based on the complete phylogenetic results and lower-level classification units corresponding to the user-input classification name, obtaining public genome metadata, performing matching and filtering in the classification fields at all levels of the public genome metadata, and extracting the genome records of the group to which the classification name belongs; using the user-input classification name and its corresponding order as the statistical range, obtaining the quality assessment indicators of all genomes within the statistical range, and statistically analyzing the genome coverage results corresponding to the lower-level groups; and classifying and filtering the genomes in the genome records according to the quality assessment indicators to obtain a high-quality reference genome.
[0048] Specifically, quality assessment metrics may include: BUSCO completeness, BUSCO deletion rate, BUSCO duplication rate, and qualification markers. This application pre-collects, statistically analyzes, and interprets quality assessment metrics from public genomes to form a built-in database, and then obtains quality assessment metrics for all genomes within the statistical scope from this built-in database.
[0049] For example, the system parses the accepted name and rank of the input classifier using the descendant classifier query function get_descendants(), and returns its subclassifiers. If a target classifier rank (target_rank) is specified, only the subclassifiers of that target classifier are returned; if not specified, all subclassifiers of lower ranks are returned.
[0050] The taxonomic unit counting function `count_taxa()` counts the non-empty and distinct acceptors at each order based on the results of `get_descendants()`. This function can answer questions such as "How many orders, families, and genera are there under a class?" or "How many genera under a phylum have a clear taxonomic affiliation?", providing quantitative basis for phylogenetic tree sampling and reference database construction.
[0051] This application also includes genome coverage assessment and BUSCO quality assessment. Specifically, the system reads and verifies public fungal genome metadata using the genome metadata reading function `read_genome_metadata()` and the genome metadata verification function `validate_genome_metadata()`. The genome data extraction function `get_genomes()` filters genome records belonging to the input taxonomic group from the phylum, class, order, family, genus, or species fields.
[0052] The `summarize_genomes()` function performs statistics on a specified taxonomic unit or genomic rank, including the number of genomes, the number of genomes with qualifying labels, the BUSCO integrity median, and the missing rate. The `check_genome_coverage()` function returns, for a given clade and target rank, whether each subordinate taxonomic unit has a common genome, the total number of clades (n_genomes), the number of qualifying genomes (n_ok_genomes), the best genome label (best_genome_label), the best accession number (best_accession), the best BUSCO integrity score (best_busco_c), and the best BUSCO missing score (best_busco_m).
[0053] The genome quality grading function `classify_genome_quality()` classifies genome quality based on BUSCO integrity, duplication rate, deletion rate, and qualifying markers. The genome quality screening function `filter_genomes_by_quality()` supports filtering genomes by minimum integrity, maximum deletion rate, and whether they pass the qualifying markers, thereby prioritizing high-quality reference genomes and reducing the impact of low-quality assembly and misclassification on downstream phylogenetic analysis.
[0054] This application supports the assessment of sampling integrity in phylogenetic tree reconstruction through lower-level classification statistics and genome coverage evaluation; furthermore, it reduces the impact of low-quality assembly on downstream analysis by screening high-quality reference genomes through BUSCO integrity, BUSCO deletion rate, BUSCO duplication rate and qualified markers.
[0055] In one embodiment of this application, the method further includes: if an update instruction for the wide-format classification framework is received, obtaining an updated version of the wide-format classification framework, comparing the classification order, normalized acceptance name, and parent genealogical context of the updated version and the previous version of the wide-format classification framework, identifying the change type, and saving the change record.
[0056] For example, the fungal taxonomy framework continuously changes as literature and databases are updated. The system design outlines a data update function, update_outline_data(), as a one-stop update workflow. Users can manually modify the Excel taxonomy framework file and then run this function to complete reading, standardization, validation, index building, version saving, and historical record updates.
[0057] The summary version comparison function `compare_outline_versions()` does not use Excel row numbers as a unique primary key. Instead, it compares old and new versions based on taxon, normalized acceptor name, and parent genealogy context, thus avoiding misjudgments caused by row order adjustments. This function identifies change types such as added taxons, removed taxons, changed lineages, changed synonyms, and changed metadata.
[0058] The summary version history writing function `write_outline_history()` writes historical records to a TSV, CSV, or RDS file; the summary version history reading function `read_outline_history()` reads existing historical records and completes the specified columns. Historical fields must include at least the version number (`version_id`), change time (`change_time`), change type (`change_type`), category rank (`rank`), category unit name (`taxon_name`), change field (`field`), previous value (`old_value`), new value (`new_value`), updated category (`update_type`), updated note (`update_note`), updated link (`update_link`), previous source row number (`source_row_id_old`), and new source row number (`source_row_id_new`).
[0059] This application retains the source, time, type, and description of each manual revision through versioned documents and a change history table, which facilitates auditing and reproduction.
[0060] In this embodiment of the application, the method further includes: When searching the target database, the search results corresponding to the predefined search parameters are saved to the local cache. When searching with the same search parameters, the local cache is read. The search parameters include: the name of the target database, the search expression generated based on the category name input by the user, and the maximum number of entries returned in a single search.
[0061] For example, external sequence databases are queried using the NCBI sequence count retrieval function `search_ncbi_sequence_counts()` and the NCBI sequence data retrieval function `search_ncbi_sequences()`. The default database is NCBInuccore (NCBI Nucleic Acid Core Library). The retrieval process is executed serially, and the access interval can be controlled by the delay in seconds (`delay_sec`). The API key can be read from the environment variable NCBI API key (`NCBI_API_KEY`), and the retrieval results can be saved to the local cache using the NCBI query result caching function `cache_ncbi_result()`.
[0062] The cache key is generated by parameters such as the database name, search query, and retmax. When the same search is executed again, the system prioritizes reading the cached results, reducing duplicate network requests, improving repeatability, and reducing the pressure on external database access.
[0063] This application reduces duplicate network requests and improves the repeatability of external database queries by using retrieval caching and access interval control.
[0064] In addition, the system provides a set of visualization functions that return plotting tool (ggplot) objects, including: plot_taxon_richness() for taxon richness, plot_genome_coverage() for genome coverage, plot_busco_quality() for BUSCO quality, plot_taxonomic_heatmap() for taxonomic heatmaps, plot_update_history() for version update history, plot_ncbi_sequence_counts() for NCBI sequence counts, and plot_fungioutline_framework() for fungal taxonomic frameworks. These functions do not save files by default; the saving logic is invoked only when the user provides an output path (output_path). That is, this application can display sampling gap and coverage heatmaps, BUSCO distributions, NCBI summaries, and framework diagrams.
[0065] Visualization results can be used in paper figures, supplementary materials, and database quality reports. For example, taxonomic richness maps are used to show the number of taxa at each clade, genome coverage maps are used to identify sampling gaps, BUSCO distribution maps are used to assess the quality of public genomes, and taxonomic coverage heatmaps are used to show systematic differences in genome availability within a particular clade.
[0066] For example, a typical usage flow of this application is as follows: library(fungioutline) outline<- fungioutline::fungi_outline idx<- fungioutline::fungi_taxon_index genomes<- fungioutline::fgtdb_genome_metadata lineage<- fungioutline::get_lineage("Ascomycota", taxon_index = idx) counts<- fungioutline::count_taxa("Ascomycota", taxon_index = idx) coverage<- fungioutline::check_genome_coverage( "Ascomycota", genome_metadata = genomes, target_rank = "genus", taxon_index = idx ) hq<- genomes |> fungioutline::classify_genome_quality() |> fungioutline::filter_genomes_by_quality( min_complete = 90, max_missing = 10, require_ok = TRUE ) like Figure 2 As shown, Figure 2 This is an overall architecture diagram of the R language software fungioutline. Fungioutline is a reproducible framework for fungal classification updates, genome quality filtering, sequence availability checks, and phylogenetic sampling. Figure 2 This document demonstrates a complete workflow from inputting fungal taxonomy framework and public genome metadata, to taxonomic index construction, lineage matching, genome coverage assessment, BUSCO quality screening, NCBI search caching, version history tracking, and visualization output. The BUSCO quality assessment results are built-in data constructed during the database construction process. BUSCO's S metric refers to Complete Single Copy (S): only one homologous gene of the target single copy was detected; BUSCO's D metric refers to Complete D: ≥2 homologous genes of the target single copy were detected; BUSCO's C metric refers to Total Complete Genes (C, Complete = S + D): the total number of complete genes; BUSCO's F metric refers to Fragmented Genes (F): partially matched genes with incomplete sequences; and BUSCO's M metric refers to Missing Genes (M): no corresponding homologous genes were detected. This framework is based on pipeline flow and the output of a plotting visualization tool (ggplot), supporting a reproducible workflow.
[0067] In one embodiment, the present invention is implemented as the R language package fungioutline. The package includes 30 testthat test files, 5 extended example (vignette) documents, approximately 4,999 lines of R source code, and built-in R data objects. The package's DESCRIPT file declares an R version of at least 4.1, is licensed under GPL-3, and uses dependency packages such as dplyr, tidyr, tibble, stringr, purrr, readr, readxl, rlang, cli, fs, and glue to implement tidyverse-compatible data processing logic. Details are shown in Table 2.
[0068] Table 2
[0069] This application unifies classification frameworks, synonym indexes, pedigree queries, public genome quality assessments, cached sequence database retrieval, and traceable updates into a single software workflow, specifically including: First, a long-format searchable index based on a classification framework is used, which transforms the wide-format rank fields from kingdom to genus and species into a long-format index containing accepted names, normalized names, synonyms, ranks, and complete lineages, so that the manually maintained framework can be retrieved in batches, at any rank, and repeatedly.
[0070] Second, the accept name is prioritized for matching, followed by synonyms. That is, the accept name is matched first, and if no match is found, synonyms are matched. The match type (match_type) and synonym attribution (synonym_of) fields are retained to reduce erroneous matches caused by synonyms and enhance the interpretability of the results.
[0071] Third, the ambiguity retention mechanism, that is, when an input name corresponds to multiple lineages, all candidates are retained and ambiguity markers are set. If necessary, the best match is selected according to the parameters, thereby avoiding the system from automatically covering up classification conflicts and facilitating manual review.
[0072] Fourth, the phylogenetic search is linked with genome coverage. That is, public genome metadata is automatically screened based on the matching phylogenetic lineage, and the genome coverage of lower-level taxa is statistically analyzed, providing a direct basis for the design of phylogenetic tree sampling.
[0073] Fifth, BUSCO quality grading and screening: quality classification and filtering are performed based on BUSCO complete, fragment, and missing subfields, the total number of BUSCO baseline genes (total_buscos), and qualified markers to reduce the impact of low-quality genomes on phylogeny and database construction.
[0074] Sixth, the classification framework is versioned and updated with differences. This means comparing the old and new classification frameworks and identifying additions, deletions, lineage changes, synonyms, and metadata changes, so that manually maintained classification frameworks have audit, rollback, and reproducibility capabilities.
[0075] Seventh, database retrieval caching, that is, generating cache keys by database name, search query and parameters, and reading the local cache first when retrieving repeatedly, thereby reducing duplicate requests and improving query efficiency and repeatability.
[0076] The above key points can be implemented individually, in pairs, or as a whole.
[0077] It is understood that the data storage format of this application is not limited to rds, rda, tsv, or csv. As the data scale increases further, Parquet, DuckDB, lightweight relational databases (SQLite), open-source enterprise relational databases (PostgreSQL), or other relational, columnar databases can be used as backend storage.
[0078] The classification framework of this invention is not limited to fungi, but can also be extended to plant, animal, bacterial, archaea, viral or environmental DNA reference databases, only requiring adjustment of the classification rank field, synonym field and corresponding verification rules.
[0079] External sequence databases are not limited to the NCBI Nucleic Acid Database, but can also be replaced or expanded to include the European Nucleotide Archive (ENA), the Japanese DNA Database (DDBJ), the Fungal ITS Reference Database (UNITE), the Ribosomal RNA Reference Database (SILVA), the Genome Classification Database (GTDB), the Reference Sequence Database (RefSeq), the Gene Sequence Database (GenBank), or user-built sequence databases.
[0080] Genome quality assessment indicators are not limited to BUSCO. They can also be combined with indicators such as genome integrity assessment software (CheckM), second-generation genome integrity assessment software (CheckM2), genome assembly quality assessment tool (QUAST), contig N50 value, scaffold N50 value, contamination rate, integrity rate, type strain evidence, sequencing platform evidence, and credibility of the submission source to form a comprehensive quality score.
[0081] The same-name matching strategy can be further extended to fuzzy matching, edit distance matching, regularized Latin name matching, authoritative document digital object identifier (DOI) evidence matching, or manual review rules, but the default implementation uses exact matching to prioritize accuracy.
[0082] The software implementation language is not limited to R. It can be implemented using Python, Julia, Java, C++, Rust, or a web service. As long as it implements the classification framework standardization, index construction, genealogy matching, coverage evaluation, quality screening, cache retrieval, and version tracking processes described in this invention, it is considered an equivalent or modified implementation of the present invention.
[0083] This application is applicable to fungal systematics research, phylogenetic tree reconstruction, public genome screening, reference database construction, barcode sequence sampling design, and scientific data asset management. Its core value lies in transforming expert knowledge tables into computable indexes and linking taxonomic names, synonyms, public genome availability, quality control, and external sequence availability.
[0084] In practical scientific research, classification frameworks are often maintained by experts over a long period and are frequently updated. This application, through versioning and historical tracking, ensures that every revision is recorded, supporting subsequent paper peer review, database publication, duplication analysis, and accountability.
[0085] This application can also serve as a foundational module for other systems, such as for constructing fungal reference databases, marker gene databases, genome sampling priority lists, phylogenetic tree automatic sampling tools, or web query platforms.
[0086] In one embodiment, such as Figure 3 As shown, based on the above-mentioned integrated management method based on microbial classification, the present invention also provides an integrated management device based on microbial classification, comprising: The acquisition module 100 is used to acquire a data source and obtain a wide-format classification framework based on the data source. The reading module 200 is used to read the wide-format classification framework line by line, traverse each level of classification order, and generate an index record for each non-empty acceptor name based on each level of classification order. The generation module 300 is used to split synonyms based on predetermined symbols in the synonym field of the wide-format classification framework, generate an index record for each synonym, and set a corresponding identifier field to generate a long-format classification unit index. The long-format classification unit index includes: accepted name, normalized name, synonym, order, and complete lineage. The normalized name is generated by a predetermined normalization function, and the processing operations of the predetermined normalization function include: characterization, whitespace compression, deletion of leading and trailing whitespace, and lowercase conversion. The query module 400 is used to perform a genealogical query on the classification name of any order based on the long format classification unit index, and obtain a complete genealogical result matching the classification name.
[0087] It should be noted that the foregoing explanation of the integrated management method based on microbial classification also applies to the integrated management device based on microbial classification in this embodiment, and will not be repeated here.
[0088] This invention discloses an integrated management device based on microbial classification. It acquires a data source and obtains a wide-format classification framework based on the data source. The wide-format classification framework is then converted into a long-format taxonomic unit index, which includes: accepted name, normalized name, synonyms, rank, and complete lineage. Based on the long-format taxonomic unit index, a lineage query is performed on the classification name at any rank to obtain a complete lineage result matching the classification name. This application, through the long-format taxonomic unit index, transforms the wide-format classification framework into a computable, batch-searchable, and updatable data asset, enabling arbitrary-rank lineage queries. This is suitable for batch, repeatable lineage queries on a large number of taxonomic units, reducing query costs.
[0089] Figure 4 A schematic diagram of the structure of a terminal provided in an embodiment of this application. The terminal may include: The memory 501, the processor 502, and the computer program stored on the memory 501 and capable of running on the processor 502.
[0090] When the processor 502 executes the program, it implements the integrated management method based on microbial classification provided in the above embodiments.
[0091] Furthermore, the terminal also includes: Communication interface 503 is used for communication between memory 501 and processor 502.
[0092] The memory 501 is used to store computer programs that can run on the processor 502.
[0093] The memory 501 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0094] If the memory 501, processor 502, and communication interface 503 are implemented independently, they can be interconnected via a bus to communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, only one line is used in the diagram, but this does not imply that there is only one bus or one type of bus.
[0095] Optionally, in a specific implementation, if the memory 501, processor 502, and communication interface 503 are integrated on a single chip, then the memory 501, processor 502, and communication interface 503 can communicate with each other through an internal interface.
[0096] Processor 502 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0097] This embodiment also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described integrated management method based on microbial classification.
[0098] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0099] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0100] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0101] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can read and execute instructions from or in conjunction with such an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). In addition, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically by optically scanning paper or other media, then editing, interpreting or otherwise processing them as necessary, and then storing them in computer memory.
[0102] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0103] Those skilled in the art will understand that all or part of the steps of the methods described in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it includes one or a combination of the steps of the method embodiments.
[0104] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0105] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.
Claims
1. An integrated management method based on microbial classification, characterized in that, The method includes: Obtain the data source and, based on the data source, obtain a wide-format classification framework; Read the wide-format classification framework line by line, traverse each classification level, and generate an index record for each non-empty acceptor name based on each classification level. Based on the predetermined symbols in the synonym field of the wide-format classification framework, synonyms are split, and an index record is generated for each synonym. A corresponding identifier field is set to generate a long-format classification unit index. The long-format classification unit index includes: accepted name, normalized name, synonym, order, and complete lineage. The normalized name is generated by a predetermined normalization function. The processing operations of the predetermined normalization function include: characterization, whitespace compression, deletion of leading and trailing whitespace, and lowercase conversion. Based on the long-format classification unit index, a genealogical query is performed on the classification name of any order to obtain a complete genealogical result matching the classification name.
2. The integrated management method based on microbial classification according to claim 1, characterized in that, Before converting the wide-format classification framework into a long-format classification unit index, the following steps are also included: Read the wide-format classification framework, perform column name standardization, null value normalization, time field normalization, and character field cleaning to obtain the standardized wide-format classification framework; The standardized wide-format classification framework is validated based on preset structural check items. The structural check items include at least one of the following: column name uniqueness, existence of required fields, number of data rows, and whether the classification order field has at least one non-null value.
3. The integrated management method based on microbial classification according to claim 1, characterized in that, Based on the long-format classification unit index, a genealogical query is performed on the classification name of any order to obtain a complete genealogical result matching the classification name, including: Receive one or more arbitrary-order category names input by the user, normalize the category names to obtain normalized category names; Based on the standardized classification name, accept name priority matching is performed in the long-format classification unit index; If no matching name is found and matching synonyms is allowed, then synonym matching is performed to obtain the complete genealogical results matching the classification name.
4. The integrated management method based on microbial classification according to claim 3, characterized in that, Based on the long-format classification unit index, a genealogical query is performed on the classification name of any order to obtain a complete genealogical result matching the classification name, which also includes: If the same category name corresponds to multiple candidate lineages, all candidate lineages are retained, and the ambiguity identifier field corresponding to the candidate lineage is assigned a true value. Obtain a preset matching priority, determine a first candidate lineage from the candidate lineages according to the matching priority, and use the first candidate lineage as the complete lineage result for matching the classification name.
5. The integrated management method based on microbial classification according to claim 1, characterized in that, Based on the long-format classification unit index, after performing a genealogical query on the classification name of any order to obtain the complete genealogical result matching the classification name, the process further includes: Parse the accepted name and order of the category name input by the user, and return the next-level category unit of the category name; Based on the complete phylogenetic results and lower-level classification units corresponding to the classification name entered by the user, the target database is retrieved to obtain public genome metadata. The genomic records of the group to which the classification name belongs are extracted by matching and filtering in the classification fields of the public genome metadata. Using the user-input category name and corresponding order as the statistical range, the quality assessment indicators of all genomes within the statistical range are obtained, and the genome coverage results corresponding to the lower-level taxa are statistically analyzed. The genomes in the genome record are classified and filtered according to the quality assessment indicators to obtain a high-quality reference genome.
6. The integrated management method based on microbial classification according to claim 1, characterized in that, The method further includes: If an update instruction for the wide-format classification framework is received, the updated version of the wide-format classification framework is obtained. The classification order, normalized acceptance name, and parent genealogical context of the updated version and the previous version of the wide-format classification framework are compared to identify the change type and save the change record. When searching the target database, the search results corresponding to the predefined search parameters are saved to the local cache. When searching with the same search parameters, the local cache is read. The search parameters include: the name of the target database, the search expression generated based on the category name input by the user, and the maximum number of entries returned in a single search.
7. An integrated management device based on microbial classification, characterized in that, The device includes: The acquisition module is used to acquire a data source and obtain a wide-format classification framework based on the data source. The reading module is used to read the wide-format classification framework line by line, traverse each level of classification order, and generate an index record for each non-empty acceptor name based on each level of classification order. The generation module is used to split synonyms based on predetermined symbols in the synonym field of the wide-format classification framework, generate an index record for each synonym, and set a corresponding identifier field to generate a long-format classification unit index. The long-format classification unit index includes: accepted name, normalized name, synonym, order, and complete lineage. The normalized name is generated by a predetermined normalization function, and the processing operations of the predetermined normalization function include: characterization, whitespace compression, deletion of leading and trailing whitespace, and lowercase conversion. The query module is used to perform a genealogical query on the classification name of any order based on the long format classification unit index, and obtain a complete genealogical result matching the classification name.
8. A terminal, characterized in that, include: The system includes a memory, a processor, and an integrated management program based on microbial classification stored in the memory and executable on the processor, wherein the integrated management program based on microbial classification, when executed by the processor, implements the steps of the integrated management method based on microbial classification as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that can be executed to implement the steps of the integrated management method based on microbial classification as described in any one of claims 1 to 6.