# Functional Annotation of Long-Read Metagenomes: From Gene Prediction to Pathway Reconstruction

Long-read metagenomic sequencing produces reads spanning tens of kilobases with single-molecule accuracies exceeding 99 percent, enabling near-complete genome and gene cluster recovery without cultivation. The practical problem for researchers is that after assembly, the path from raw contigs to biological interpretation requires a functional annotation pipeline that differs from short-read workflows. This article provides a step-by-step pipeline using Prokka for gene prediction, eggNOG-mapper for orthology assignment, and KEGG pathway mapping for metabolic reconstruction, with specific attention to fragmented assemblies and long-read-specific error profiles. The target reader is a biology student, researcher, or laboratory professional who has assembled long-read metagenomic data and needs a reproducible annotation strategy with clear quality controls and interpretation limits.

## Context: Why Long-Read Metagenomes Change the Annotation Problem

Long-read sequencing platforms from Pacific Biosciences and Oxford Nanopore Technologies produce reads that are several kilobases long, allowing researchers to obtain more complete and contiguous genomic information, characterize structural variations, and study epigenetic modifications. In metagenomics, this capability transforms what can be recovered from complex microbial communities. Direct sequencing of DNA from environmental samples permanently changed microbial ecology, and the analytical tools that facilitate exploration of diversity and function in complex microbial communities have expanded accordingly. While metagenomics shapes understanding of microbial functions in ecosystems through gene-centric and genome-centric methods, annotating functions, metagenome assembly, and binning in heterogeneous samples remains challenging.

The annotation problem for long-read metagenomes differs from short-read metagenomes in several concrete ways. Short-read assemblies tend to be more fragmented, with genes frequently split across multiple contigs. Long-read assemblies produce longer contigs, sometimes recovering complete circular genomes from abundant community members. However, long-read data carry higher per-base error rates that must be managed during gene prediction. Insertions and deletions in homopolymer regions can shift reading frames, producing truncated or fused gene predictions. Base modifications, particularly in nanopore data, can also affect base calling accuracy in ways that propagate into gene prediction errors.

The development of new analysis and sequencing platforms generating high-throughput long-read sequences will aid in harnessing metagenomes to increase understanding of microbial taxonomy, function, ecology, and evolution in the environment. For the researcher, this means the annotation pipeline must be chosen with awareness of both the opportunities and the error modes. A pipeline that works well on complete genomes may fail on fragmented metagenomic assemblies, and a pipeline tuned for short reads may discard useful long-read information.

## At a Glance: Annotation Pipeline Decision Table

The following table summarizes the main pipeline stages, the tools recommended for each stage, the primary quality concern at that stage, and the decision criterion for moving forward.

| Pipeline Stage | Recommended Tool | Primary Quality Concern | Decision Criterion |
| --- | --- | --- | --- |
| Gene prediction | Prokka | Fragmented genes, frameshifts from homopolymer errors | Check proportion of hypothetical proteins, if above 50 percent, consider polishing or alternative predictors |
| Orthology assignment | eggNOG-mapper | Low-confidence hits from divergent or partial sequences | Review bit scores and coverage, flag hits below the tool's default confidence threshold |
| Pathway mapping | KEGG pathway reconstruction | Missing enzymes due to incomplete genes or annotation gaps | Compare pathway completeness against closely related reference genomes |
| Quality assessment | CheckM or BUSCO | Contamination and completeness of assembled genomes | Retain bins with completeness above 70 percent and contamination below 10 percent for downstream analysis |

## Core Principles of Functional Annotation for Long-Read Metagenomes

Functional annotation is the process of assigning biological meaning to predicted gene sequences. The pipeline proceeds from structural annotation, which identifies gene coordinates on contigs, to functional annotation, which assigns gene names, products, and orthology groups, and finally to pathway reconstruction, which places genes into metabolic context. Each stage has distinct failure modes that are amplified in metagenomic data.

### Structural Annotation: Gene Prediction on Long Contigs

Gene prediction tools identify open reading frames and assign start and stop coordinates. Prokka is a widely used prokaryotic genome annotation pipeline that integrates multiple prediction tools and adds functional annotation to predicted genes. For long-read metagenomes, Prokka offers the advantage of running on assembled contigs without requiring a reference genome, making it suitable for novel organisms.

The primary challenge in gene prediction on long-read assemblies is error profile. Long-read platforms have higher error rates than short-read platforms, particularly in homopolymer regions. Insertions or deletions in these regions can shift the reading frame, causing a single true gene to be predicted as two truncated genes or a fused gene product. Polishing the assembly with short-read data or with the long-read platform's own consensus tool before annotation reduces this problem. If polishing is not possible, the researcher should expect a higher proportion of hypothetical proteins and partial gene models.

### Functional Assignment: Orthology and Database Search

Once genes are predicted, functional assignment requires comparing protein sequences against reference databases. eggNOG-mapper assigns orthology groups using precomputed orthologous groups and phylogenies, which provides faster and more consistent results than a direct BLAST search against all proteins in a database. The eggNOG database organizes proteins into orthologous groups with functional descriptions, and eggNOG-mapper transfers annotations from these groups to query sequences.

For metagenomic data, the key advantage of orthology-based assignment is that it can identify functional categories even when the query sequence is divergent from any single reference genome. Direct BLAST searches may fail to find a significant hit for a highly divergent protein, while orthology assignment can place the protein in a group based on shared evolutionary ancestry. The tradeoff is that orthology assignment depends on the completeness of the underlying database, and novel protein families without representatives in the database will remain unannotated.

### Pathway Reconstruction: From Genes to Metabolism

Pathway reconstruction places annotated genes into metabolic pathways, typically using the KEGG database. The KEGG pathway maps show enzymes as nodes connected by reactions, and the researcher maps their annotated genes onto these maps to identify which pathways are present or absent in the community or in individual genomes.

The central challenge in pathway reconstruction from metagenomes is that a pathway may be distributed across multiple organisms in a community. A gene-centric approach asks which functions are present in the community, while a genome-centric approach asks which functions are present in each reconstructed genome. Both approaches are valid, but they answer different questions. For genome-centric analysis, the completeness of the genome bin directly affects pathway completeness. A genome bin that is 70 percent complete will show missing enzymes that may actually be present in the organism but absent from the bin.

## Practical Workflow: From Assembled Contigs to Annotated Pathways

The following workflow assumes the researcher has already performed quality control on raw reads, assembled the metagenome, and optionally binned the assembly into metagenome-assembled genomes. The workflow covers the annotation of both the full assembly and individual bins.

### Step 1: Assembly Polishing and Quality Assessment

Before annotation, assess the quality of the assembly. For long-read assemblies, this includes checking contig length distribution, N50, and the number of contigs. A fragmented assembly with many short contigs will produce more partial gene predictions. If the assembly was produced directly from raw long reads without polishing, consider running a polishing step using the platform-specific consensus tool or a short-read polish if paired short-read data are available.

For genome bins, run completeness and contamination assessment using a tool such as CheckM or BUSCO. These tools use lineage-specific marker genes to estimate how much of the expected genome content is present and whether sequences from multiple organisms are mixed in the bin. Retain bins that meet quality thresholds for downstream analysis. The thresholds depend on the research question, but a common standard is completeness above 70 percent and contamination below 10 percent for medium-quality bins.

### Step 2: Gene Prediction with Prokka

Run Prokka on the assembled contigs or on each genome bin. Prokka will predict genes, assign product names, and add functional annotations from its built-in databases. For metagenomic data, set the kingdom to Bacteria or Archaea based on the expected community composition. Prokka can also use a genus-specific database if the community is dominated by a known genus, which improves annotation specificity.

After running Prokka, examine the output statistics. The proportion of hypothetical proteins is a useful quality indicator. A high proportion of hypothetical proteins, above 50 percent, suggests either that the community contains many novel organisms or that the gene prediction is producing many false positives due to assembly errors. Compare the number of predicted genes per megabase of assembly to expected values for the community type. An unusually high gene density may indicate fragmented gene predictions.

### Step 3: Functional Assignment with eggNOG-mapper

Run eggNOG-mapper on the protein sequences predicted by Prokka. eggNOG-mapper accepts FASTA files of protein sequences and produces annotations including orthologous group identifiers, functional descriptions, and Gene Ontology terms. The tool can run in multiple modes, including a web server and a command-line version for batch processing.

For metagenomic data, consider running eggNOG-mapper with the metagenomic mode if available, which uses a different scoring scheme optimized for fragmented and divergent sequences. Review the output for the proportion of sequences with successful annotations. Sequences without orthology assignments may represent novel proteins or may be artifacts of gene prediction errors. The [Bioconductor project](https://bioconductor.org/) provides additional R packages for downstream analysis of functional annotation results, including visualization and statistical testing.

### Step 4: KEGG Pathway Mapping

Map the eggNOG-mapper results to KEGG pathways. eggNOG-mapper provides KEGG orthology identifiers as part of its output, and these identifiers can be used to reconstruct pathways. The KEGG database itself provides pathway maps, and several tools can project annotated genes onto these maps.

For a community-level analysis, count the presence of each KEGG orthology group across all samples and test for differential abundance between conditions. For a genome-level analysis, determine which pathways are complete in each genome bin. A pathway is typically considered present if all or most of its component enzymes are found in the genome. The completeness threshold depends on the research question, but a common approach is to require at least 80 percent of the pathway enzymes to be present.

### Step 5: Integration and Interpretation

Integrate the annotation results with taxonomic classification and abundance data. The [Galaxy Training Network](https://training.galaxyproject.org/) provides accessible workflow training for metagenomic analysis, including tutorials that cover the integration of taxonomic and functional results. The [nf-core documentation](https://nf-co.re/docs) describes community pipeline standards that support reproducible workflow configuration, which is valuable when scaling the annotation pipeline to many samples.

For interpretation, distinguish between the presence of a gene and the activity of the corresponding enzyme. Metagenomic annotation identifies genetic potential, not actual expression or activity. A gene may be present but not expressed under the sampled conditions, or the enzyme may be inactive due to post-translational regulation. Metatranscriptomics and metaproteomics provide complementary evidence for actual activity.

## Options and Tradeoffs in Tool Selection

The pipeline described above uses Prokka, eggNOG-mapper, and KEGG pathway mapping, but other tools are available and may be better suited to specific research questions. The choice of tools depends on the community composition, the available computational resources, and the desired output format.

### Alternative Gene Prediction Tools

Prokka is a convenient all-in-one tool, but it may not be optimal for all metagenomic datasets. Tools specifically designed for metagenomic gene prediction, such as MetaGeneMark or FragGeneScan, may perform better on fragmented assemblies because they use models trained on metagenomic data. However, these tools produce only structural annotation and require a separate functional annotation step.

For long-read data, some tools have been developed specifically to handle the error profile of nanopore and PacBio reads. These tools may incorporate error models into the gene prediction algorithm, reducing the number of frameshift-induced errors. The tradeoff is that these tools may be less well maintained or less widely tested than Prokka.

### Alternative Functional Annotation Approaches

eggNOG-mapper is one option for functional assignment, but other approaches include direct BLAST searches against the NCBI non-redundant database, hidden Markov model searches against Pfam or TIGRFAM, and assignment to Clusters of Orthologous Groups. The [NCBI data resources](https://www.ncbi.nlm.nih.gov/) provide access to the databases needed for these approaches, including the non-redundant protein database and the Conserved Domain Database.

Direct BLAST searches provide the most detailed annotation for individual genes but are computationally expensive for large metagenomic datasets and may produce inconsistent annotations for closely related genes. Hidden Markov model searches are more sensitive for divergent sequences but require careful interpretation of significance thresholds. Orthology-based assignment provides a middle ground, offering consistency and speed while retaining sensitivity to divergent sequences.

### Pathway Reconstruction Alternatives

KEGG is the most widely used pathway database, but it is not the only option. MetaCyc provides a complementary pathway database with a different focus on experimentally validated pathways. The choice between KEGG and MetaCyc depends on the research question and the familiarity of the researcher with the database structure. Some researchers use both databases and compare the results to identify robust pathway predictions.

The [EMBL-EBI training](https://www.ebi.ac.uk/training) resources provide learning pathways for bioinformatics data resources, including training on functional annotation and pathway analysis. These resources can help researchers understand the strengths and limitations of different databases before committing to a particular pipeline.

## Observations and Measurements: What to Record During Annotation

Systematic record keeping during the annotation process supports reproducibility and troubleshooting. The following measurements should be recorded for each sample or genome bin.

### Assembly Quality Metrics

Record the assembly statistics before annotation, including the number of contigs, total assembly size, N50, and the number of contigs longer than a threshold relevant to the research question. For long-read assemblies, also record the read length distribution and the estimated error rate of the raw reads. These metrics provide context for interpreting annotation quality.

### Gene Prediction Statistics

Record the number of genes predicted, the number of genes with functional annotations, the number of hypothetical proteins, and the gene density per megabase. Compare these statistics across samples to identify anomalies. A sample with an unusually high proportion of hypothetical proteins may have assembly errors that should be corrected before downstream analysis.

### Functional Assignment Coverage

Record the proportion of predicted proteins that receive an orthology assignment from eggNOG-mapper. Also record the distribution of confidence scores for the assignments. Low-confidence assignments should be flagged for manual review, particularly if they are involved in pathways of interest.

### Pathway Completeness Scores

For genome-centric analysis, record the completeness score for each pathway of interest in each genome bin. This allows comparison of metabolic capabilities across bins and across samples. For gene-centric analysis, record the presence and abundance of each KEGG orthology group in each sample.

## Quality Controls and Reproducibility

Reproducibility requires that the annotation pipeline can be rerun with the same inputs to produce the same outputs. This requires version control for both the software and the databases used in the pipeline. The [Carpentries lessons](https://carpentries.org/lessons) provide foundational training in shell, Git, and programming that supports reproducible computational workflows.

### Software Version Control

Record the version of every tool used in the pipeline, including Prokka, eggNOG-mapper, and any auxiliary tools. Software updates can change annotation results, so the version information is essential for interpreting results and for comparing results across studies.

### Database Version Control

Functional annotation depends on reference databases that are updated regularly. Record the version and download date of the eggNOG database, the KEGG database, and any other reference data used. A change in the database can change the annotation of a gene even when the software version is unchanged.

### Containerization and Workflow Management

Consider using containerization or workflow management tools to ensure that the pipeline runs identically across different computing environments. The [nf-core documentation](https://nf-co.re/docs) describes standards for community pipelines that include containerization and version control. These standards support reproducible workflow configuration and are applicable to custom pipelines as well as to nf-core pipelines.

### Validation with Positive and Negative Controls

Include positive and negative controls in the annotation pipeline to validate the results. A positive control could be a well-annotated reference genome that is spiked into the assembly or analyzed alongside the metagenomic samples. The annotation of the control genome should match the known annotation. A negative control could be a set of sequences that are known to lack protein-coding genes, such as intergenic regions, which should not be annotated as genes.

## Common Failure Patterns in Long-Read Metagenome Annotation

Several failure patterns recur in long-read metagenome annotation. Recognizing these patterns allows the researcher to diagnose problems and apply corrective measures.

### Fragmented Gene Predictions from Assembly Errors

The most common failure pattern is the prediction of multiple truncated genes where a single complete gene exists. This occurs when assembly errors, particularly insertions or deletions in homopolymer regions, introduce frameshifts. The gene prediction tool identifies the frameshifted sequence as two separate open reading frames. The result is an inflated gene count and a high proportion of hypothetical proteins.

The corrective measure is to polish the assembly before annotation. Polishing uses the raw reads to correct assembly errors, reducing the number of frameshifts. If polishing does not fully resolve the problem, consider using a gene prediction tool that models the error profile of long-read data.

### Overprediction of Genes in Repetitive Regions

Long-read assemblies can resolve repetitive regions that are collapsed in short-read assemblies, but the annotation of these regions can be problematic. Repetitive sequences may be annotated as genes when they are non-coding, or the same gene may be predicted multiple times in tandem repeats. This inflates the gene count and can distort functional profiles.

The corrective measure is to examine the genomic context of predicted genes in repetitive regions. If multiple identical genes are predicted in tandem, verify that they are not artifacts of assembly duplication. Compare the gene density in repetitive regions to the gene density in unique regions.

### Low Annotation Coverage for Novel Organisms

Metagenomic samples from poorly studied environments may contain organisms with little similarity to any sequenced reference. These organisms produce a high proportion of hypothetical proteins and low annotation coverage. This is not an error in the pipeline but a limitation of the reference databases.

The corrective measure is to acknowledge the limitation in the interpretation of results. Functional profiles for novel organisms will be incomplete, and the absence of a pathway should not be interpreted as evidence that the organism lacks the pathway. The [NCBI data resources](https://www.ncbi.nlm.nih.gov/) provide access to the growing collection of reference genomes, and re-annotation with updated databases may improve coverage over time.

### Cross-Contamination Between Bins

Genome bins may contain sequences from multiple organisms, particularly when closely related strains are present in the community. This contamination affects functional annotation because genes from the contaminating organism are attributed to the bin. The result is a functional profile that combines the capabilities of multiple organisms.

The corrective measure is to assess contamination before annotation using a tool such as CheckM. Bins with high contamination should be excluded from genome-centric analysis or subjected to additional binning refinement.

## Limitations of Functional Annotation from Long-Read Metagenomes

Functional annotation from metagenomic data has inherent limitations that should be communicated in any report or publication.

### Genetic Potential versus Actual Activity

Metagenomic annotation identifies the genetic potential of the community or individual genomes. It does not measure gene expression or enzyme activity. A gene may be present but not expressed under the sampled conditions, or the enzyme may be inactive due to regulation. Complementary approaches such as metatranscriptomics and metaproteomics are needed to assess actual activity.

### Incomplete Genomes and Pathways

Genome bins are rarely complete, and the missing portions may contain genes that are essential for a pathway. A pathway that appears incomplete in a genome bin may be complete in the actual organism. This limitation is particularly relevant for low-completeness bins and for organisms that are difficult to assemble due to high genomic diversity within the community.

### Database Bias

Functional annotation depends on reference databases that are biased toward well-studied organisms. Organisms from poorly studied environments are less likely to have close relatives in the databases, resulting in lower annotation coverage. This bias should be considered when comparing functional profiles across environments.

### Error Propagation from Assembly to Annotation

Errors in the assembly propagate to the annotation. A misassembled contig that joins sequences from different organisms will produce gene predictions that combine sequences from different genomes. This can produce chimeric proteins with misleading functional annotations. The quality of the assembly should be assessed before annotation, and suspicious contigs should be examined manually.

## Safety and Regulatory Context for Metagenomic Annotation

Metagenomic annotation has applications in clinical, agricultural, and environmental contexts, and the results may have safety and regulatory implications.

### Clinical Applications

Long-read metagenomic sequencing can identify pathogens and antimicrobial resistance genes in clinical samples. The [HLRMDB database](https://pubmed.ncbi.nlm.nih.gov/41207298) provides a comprehensive resource for human microbiome datasets derived from long-read and hybrid metagenomic sequencing, including antimicrobial resistance annotations. When annotation identifies a potential pathogen or resistance gene, the result should be confirmed with targeted methods before clinical action. The [NCBI data resources](https://www.ncbi.nlm.nih.gov/) provide access to reference pathogen genomes and resistance gene databases for confirmation.

### Agricultural and Environmental Applications

Metagenomic annotation of agricultural and environmental samples can identify organisms and functions relevant to soil health, plant growth, and bioremediation. The [air monitoring study using nanopore sequencing](https://pubmed.ncbi.nlm.nih.gov/39081363) demonstrates that long-read sequencing can resolve species-level annotations and specific ecosystem functions from environmental samples. When annotation results inform management decisions, such as the application of a biological amendment, the results should be validated with culture-based or targeted molecular methods.

### Data Sharing and Reporting

Metagenomic data and annotations should be shared through public repositories to support reproducibility and comparative analysis. The [NCBI data resources](https://www.ncbi.nlm.nih.gov/) provide repositories for raw sequencing data and for annotated assemblies. When reporting annotation results, include the software versions, database versions, and quality metrics so that other researchers can interpret the results in context.

## Professional Escalation Criteria

The following criteria indicate when a researcher should seek additional expertise or escalate a problem to a specialist.

### When to Consult a Bioinformatics Specialist

Consult a bioinformatics specialist when the annotation pipeline produces results that are inconsistent with biological expectations. For example, if a well-characterized organism is annotated with a completely unexpected functional profile, or if the proportion of hypothetical proteins is far outside the expected range for the community type, a specialist can help diagnose whether the problem is in the assembly, the gene prediction, or the functional assignment.

### When to Seek Additional Sequencing

If the assembly quality is poor and polishing does not resolve the problem, additional sequencing may be needed. This could include deeper long-read sequencing to improve coverage of low-abundance organisms, or short-read sequencing for hybrid assembly and polishing. The decision to seek additional sequencing should be based on the research question and the cost of sequencing relative to the value of improved annotation.

### When to Escalate to a Clinical or Regulatory Authority

In clinical applications, if annotation identifies a potential pathogen or resistance gene with public health implications, the result should be escalated to the appropriate clinical or public health authority. The escalation should include the raw data, the annotation results, and the quality metrics so that the authority can assess the reliability of the finding.

## Decision Framework: Matching Annotation Strategy to Assembly Quality and Research Question

The pipeline steps described above assume a single annotation approach applied uniformly to all assembled data. In practice, long-read metagenome assemblies vary widely in quality, completeness, and biological complexity, and the optimal annotation strategy depends on the specific characteristics of each dataset. This section provides a practical decision framework for choosing between gene-centric and genome-centric annotation, for determining when to annotate the full assembly versus individual bins, and for selecting quality thresholds that match the research question. The framework is organized around three decision points that researchers encounter after assembly and before committing to a full annotation run.

### Decision Point 1: Gene-Centric versus Genome-Centric Annotation

The first decision is whether to annotate the full assembly as a gene catalog or to annotate individual metagenome-assembled genomes. This choice determines the entire downstream analysis and should be made before running any annotation tool.

Gene-centric annotation treats the entire assembly as a pool of genes and asks which functions are present in the community. This approach is appropriate when the research question concerns community-level functional potential, such as comparing the metabolic capabilities of different environments or identifying the presence of specific functional genes across samples. Gene-centric annotation does not require binning and can be applied directly to the assembled contigs. The main limitation is that gene-centric results cannot attribute functions to specific organisms, which limits interpretation when the research question concerns the metabolic roles of particular taxa.

Genome-centric annotation assigns functions to individual reconstructed genomes and asks which organisms carry which functions. This approach requires binning before annotation and is appropriate when the research question concerns the metabolic capabilities of specific organisms, such as comparing the functional profiles of closely related strains or identifying the genetic basis of niche differentiation. Genome-centric annotation provides stronger biological interpretation but depends on the quality of the bins. Low-completeness bins will produce incomplete functional profiles, and contaminated bins will produce chimeric functional profiles that combine the capabilities of multiple organisms.

The decision between gene-centric and genome-centric annotation can be guided by the assembly characteristics. If the assembly is highly fragmented with few contigs longer than 10 kilobases, genome-centric annotation will produce many low-completeness bins and the functional profiles will be unreliable. In this case, gene-centric annotation of the full assembly is the more defensible choice. If the assembly contains many long contigs and the community is dominated by a few abundant organisms, genome-centric annotation will produce high-quality bins with interpretable functional profiles. The [review of long-read metagenomics workflows](https://pubmed.ncbi.nlm.nih.gov/38282030) notes that long-read sequencing enables more complete and contiguous genomic information, which directly improves the feasibility of genome-centric annotation.

A hybrid approach is also possible. Annotate the full assembly gene-centrically to obtain a community-level functional profile, then bin the assembly and annotate the high-quality bins genome-centrically to attribute functions to specific organisms. This approach is more computationally expensive but provides both community-level and organism-level interpretation. The hybrid approach is particularly valuable when the research question requires both perspectives, such as when comparing the functional potential of different environments while also identifying which organisms contribute specific functions.

### Decision Point 2: Quality Thresholds for Genome-Centric Annotation

When genome-centric annotation is chosen, the quality thresholds for retaining bins must be matched to the research question. The common standard of completeness above 70 percent and contamination below 10 percent is appropriate for many research questions, but it is not universally applicable.

For research questions that require high-confidence functional profiles, such as comparing the metabolic capabilities of closely related strains or identifying the genetic basis of a specific phenotype, stricter thresholds are appropriate. A completeness threshold of 90 percent and a contamination threshold of 5 percent reduce the risk of false-negative pathway predictions and false-positive functional attributions. The tradeoff is that stricter thresholds exclude more bins, reducing the number of organisms that can be analyzed.

For research questions that require broad taxonomic coverage, such as surveying the functional potential of a diverse community, more permissive thresholds are appropriate. A completeness threshold of 50 percent and a contamination threshold of 15 percent retain more bins but produce less reliable functional profiles. The interpretation of pathway presence or absence must account for the reduced completeness, and the absence of a pathway should not be interpreted as evidence that the organism lacks the pathway.

The [HLRMDB database](https://pubmed.ncbi.nlm.nih.gov/41207298) provides a useful reference for quality expectations in long-read metagenome binning. The database reports 6339 near-complete and 5609 medium-quality metagenome-assembled genomes from 1672 publicly available metagenomes, demonstrating that long-read data can produce a substantial fraction of high-quality bins. Researchers should compare their bin quality distribution to these benchmarks to assess whether their assembly and binning pipeline is performing as expected.

The decision on quality thresholds should be recorded before annotation and reported with the results. This supports reproducibility and allows other researchers to assess the reliability of the functional profiles. The thresholds should also be applied consistently across all samples in a comparative study to avoid introducing bias.

### Decision Point 3: Annotation Granularity and Database Selection

The third decision concerns the granularity of functional annotation and the choice of reference databases. The pipeline described above uses eggNOG-mapper for orthology assignment and KEGG for pathway mapping, but the granularity of the annotation should match the research question.

For research questions that require broad functional categories, such as comparing the abundance of carbohydrate metabolism genes across environments, annotation at the level of KEGG orthology groups or eggNOG orthologous groups is sufficient. This granularity provides consistent functional categories that can be compared across samples and studies.

For research questions that require specific enzyme-level resolution, such as identifying the presence of a particular antibiotic resistance gene or a specific biosynthetic pathway, annotation at the level of individual genes or protein families is required. This granularity requires additional database searches beyond eggNOG-mapper, such as hidden Markov model searches against specialized databases. The [NCBI data resources](https://www.ncbi.nlm.nih.gov/) provide access to the Conserved Domain Database and other specialized resources that support this level of annotation.

The choice of reference database also affects the annotation results. The eggNOG database is comprehensive and regularly updated, but it is biased toward well-studied organisms. For metagenomes from poorly studied environments, the annotation coverage may be low, and the functional profiles will be incomplete. The [review of metagenomic tools](https://pubmed.ncbi.nlm.nih.gov/33592536) notes that annotating functions in heterogeneous samples remains challenging, and this challenge is amplified for novel organisms with little similarity to reference databases.

For research questions that require comparison with specific reference genomes, such as comparing a metagenome-assembled genome with a cultured isolate, direct comparison against the reference genome annotation is appropriate. This comparison can identify shared and unique functions and can validate the annotation of the metagenome-assembled genome. The [EMBL-EBI training resources](https://www.ebi.ac.uk/training) provide learning pathways for comparative genomics that support this analysis.

### Record System for Annotation Decisions

The decisions made at each point in the framework should be recorded systematically to support reproducibility and interpretation. The following record system is recommended for each dataset.

Record the assembly statistics that inform the gene-centric versus genome-centric decision, including the number of contigs, the N50, the total assembly size, and the proportion of the assembly in contigs longer than 10 kilobases. Record the binning results, including the number of bins, the completeness and contamination estimates for each bin, and the number of bins retained at the chosen quality thresholds.

Record the annotation decisions, including the choice of gene-centric or genome-centric annotation, the quality thresholds applied, the annotation tools and versions, and the reference database versions. Record the annotation results, including the number of genes predicted, the proportion of genes with functional annotations, the proportion of hypothetical proteins, and the pathway completeness scores for pathways of interest.

Record the interpretation decisions, including the pathway completeness threshold used to call a pathway present, the treatment of incomplete genes, and the handling of low-confidence annotations. These records should be maintained in a structured format, such as a spreadsheet or a version-controlled text file, and should be referenced in any publication or report.

### Troubleshooting Method for Annotation Decision Failures

When the annotation results are inconsistent with biological expectations, the troubleshooting method should follow a structured diagnostic sequence instead of ad hoc exploration.

The first diagnostic step is to verify the assembly quality. Re-examine the assembly statistics and compare them to the expectations for the sequencing platform and the community type. If the assembly is more fragmented than expected, the annotation results will be unreliable regardless of the annotation tools used. The [review of computational tools for long-read metagenomics](https://pubmed.ncbi.nlm.nih.gov/40845163) provides a practical guide for tool installation and use that includes assembly quality assessment.

The second diagnostic step is to verify the bin quality for genome-centric annotation. Re-examine the completeness and contamination estimates for the bins used in the analysis. If a bin has low completeness, the functional profile will be incomplete, and the absence of a pathway should not be interpreted as evidence that the organism lacks the pathway. If a bin has high contamination, the functional profile will combine the capabilities of multiple organisms, and the attribution of functions to a single organism is unreliable.

The third diagnostic step is to verify the annotation coverage. Examine the proportion of predicted genes with functional annotations and the proportion of hypothetical proteins. If the annotation coverage is low, the functional profiles will be incomplete, and the interpretation should account for this limitation. The [NCBI data resources](https://www.ncbi.nlm.nih.gov/) provide access to updated reference databases that may improve annotation coverage over time.

The fourth diagnostic step is to verify the pathway reconstruction. Examine the pathway completeness scores and compare them to the completeness of the underlying bins. A pathway that appears incomplete in a 70 percent complete bin may be complete in the actual organism. The pathway completeness threshold should be adjusted to account for the bin completeness.

The fifth diagnostic step is to compare the annotation results with independent evidence. If metatranscriptomic or metaproteomic data are available, compare the functional profiles with the expression or abundance data. If reference genomes from closely related organisms are available, compare the functional profiles with the reference annotations. The [Galaxy Training Network](https://training.galaxyproject.org/) provides accessible workflow training that includes tutorials for integrating multiple data types.

### Common Failure Patterns in Annotation Decision Making

Several failure patterns recur when researchers apply annotation strategies without matching them to assembly quality and research questions.

The first failure pattern is applying genome-centric annotation to a fragmented assembly. When the assembly is highly fragmented, binning produces many low-completeness bins, and the functional profiles are unreliable. The researcher interprets the absence of a pathway as evidence that the organism lacks the pathway, when in fact the pathway genes are simply missing from the incomplete bin. The corrective measure is to switch to gene-centric annotation or to apply stricter quality thresholds that retain only the highest-quality bins.

The second failure pattern is applying a single quality threshold to all bins without considering the research question. A threshold that is appropriate for a broad survey may be too permissive for a detailed comparison of closely related strains. The corrective measure is to match the quality thresholds to the research question and to record the thresholds with the results.

The third failure pattern is interpreting the absence of a functional annotation as evidence of absence. A gene may lack a functional annotation because it is novel, because the reference database is incomplete, or because the gene prediction produced a truncated sequence. The absence of an annotation is not evidence that the gene has no function. The corrective measure is to report the annotation coverage and to interpret the absence of a pathway with appropriate caution.

The fourth failure pattern is failing to record the annotation decisions. Without a record of the quality thresholds, database versions, and interpretation criteria, the results cannot be reproduced or compared across studies. The corrective measure is to maintain a structured record system as described above.

### Professional Escalation Criteria for Annotation Decisions

The following criteria indicate when a researcher should seek additional expertise in the annotation decision process.

Consult a bioinformatics specialist when the assembly quality is poor and the annotation results are unreliable regardless of the annotation strategy. A specialist can help diagnose whether the problem is in the sequencing, the assembly, or the annotation, and can recommend corrective measures such as additional polishing or alternative assembly tools.

Consult a bioinformatics specialist when the bin quality distribution is far outside the expected range for long-read metagenomes. The [HLRMDB database](https://pubmed.ncbi.nlm.nih.gov/41207298) provides a reference for expected bin quality, and a specialist can help identify whether the binning pipeline is performing as expected.

Consult a domain expert when the functional profiles are inconsistent with the known biology of the community. For example, if a well-characterized environment produces a functional profile that lacks expected pathways, a domain expert can help determine whether the annotation is incorrect or whether the community is genuinely different from expectations.

Consult a clinical or regulatory authority when the annotation results have public health implications. The [air monitoring study using nanopore sequencing](https://pubmed.ncbi.nlm.nih.gov/39081363) demonstrates that long-read metagenomics can identify specific ecosystem functions from environmental samples, and the [HLRMDB database](https://pubmed.ncbi.nlm.nih.gov/41207298) includes antimicrobial resistance annotations. When annotation identifies a potential pathogen or resistance gene with public health implications, the result should be escalated to the appropriate authority with the raw data, the annotation results, and the quality metrics.

## Frequently Asked Questions

### What is the difference between structural and functional annotation?

Structural annotation identifies the coordinates of genes on assembled contigs, including start and stop positions and the predicted protein sequence. Functional annotation assigns biological meaning to those predicted genes, such as a gene name, a product description, or an orthology group. In the pipeline described here, Prokka performs structural annotation and adds some functional annotation, while eggNOG-mapper provides more detailed functional assignment through orthology groups.

### Why does my long-read metagenome have so many hypothetical proteins?

A high proportion of hypothetical proteins can result from assembly errors that create frameshifts, causing genes to be predicted incorrectly. It can also result from the presence of novel organisms with little similarity to reference databases. To distinguish these causes, examine the assembly quality and consider polishing the assembly before annotation. If the assembly is high quality and the proportion of hypothetical proteins remains high, the community likely contains many novel organisms.

### Should I annotate the full assembly or individual genome bins?

The choice depends on the research question. Gene-centric analysis of the full assembly asks which functions are present in the community. Genome-centric analysis of individual bins asks which functions are present in each organism. Both approaches are valid, and many studies use both. For genome-centric analysis, the completeness of the bins directly affects the interpretation of pathway presence or absence.

### How do I handle incomplete genes in my annotation?

Incomplete genes, where the predicted protein is truncated relative to the true protein, are common in metagenomic assemblies. These genes may receive partial functional annotations or may be annotated as hypothetical proteins. For downstream analysis, consider whether the incomplete genes affect the interpretation of pathway presence. A pathway that appears incomplete due to truncated genes may actually be complete in the organism.

### What is the best way to compare functional profiles across samples?

Functional profiles can be compared by counting the presence and abundance of KEGG orthology groups or other functional categories across samples. Statistical tests can identify functional categories that differ significantly between conditions. The [Bioconductor project](https://bioconductor.org/) provides R packages for differential abundance testing and visualization of functional profiles.

### How do I know if my pathway reconstruction is reliable?

Pathway reconstruction reliability depends on the completeness of the genome bins and the quality of the functional annotations. For genome-centric analysis, assess the completeness of each bin and consider the pathway completeness in the context of the bin completeness. A pathway that is incomplete in a 70 percent complete bin may be complete in the actual organism. For gene-centric analysis, consider the coverage of the functional annotations and the proportion of genes with confident assignments.

### Can I use the same pipeline for nanopore and PacBio data?

The pipeline described here can be used for both nanopore and PacBio data, but the error profiles differ between the platforms. PacBio HiFi data have lower error rates than nanopore data, so gene prediction may be more accurate without polishing. Nanopore data may benefit from polishing before annotation. The [review of computational tools for long-read metagenomics](https://pubmed.ncbi.nlm.nih.gov/40845163) provides a practical guide for tool installation and use across platforms.

### What should I do if my annotation results are not reproducible?

If annotation results are not reproducible, check the versions of the software and databases used in the pipeline. Software updates and database updates can change annotation results. Use version control for the pipeline code and record the versions of all tools and databases. Consider using containerization to ensure that the pipeline runs identically across different computing environments.

## Related Bioinformatics Guides

- [Functional Metagenomics: From Gene Prediction to Pathway Reconstruction](/knowledge/bioinformatics/functional-metagenomics-from-gene-prediction-to-pathway-reconstruction)
- [Long-Read Metagenome Assembly: Overcoming Challenges with Nanopore and PacBio Data](/knowledge/bioinformatics/long-read-metagenome-assembly-overcoming-challenges-with-nanopore-and-pacbio-data)
- [Evaluating Metagenomic Assembly Tools: A Benchmarking Framework for Short-Read and Long-Read Data](/knowledge/bioinformatics/evaluating-metagenomic-assembly-tools-a-benchmarking-framework-for-short-read-and-long-read-data)
- [Functional Annotation of Metagenomes: A Guide to Databases and Pipelines](/knowledge/bioinformatics/functional-annotation-of-metagenomes-a-guide-to-databases-and-pipelines)
- [Long-Read Sequencing for De Novo Assembly of Complex Genomes: Case Studies and Best Practices](/knowledge/bioinformatics/long-read-sequencing-for-de-novo-assembly-of-complex-genomes-case-studies-and-best-practices)

## References and Further Reading

- [NCBI Data Resources](https://www.ncbi.nlm.nih.gov/). National Center for Biotechnology Information.
- [EMBL-EBI Training](https://www.ebi.ac.uk/training). European Bioinformatics Institute.
- [Bioconductor](https://bioconductor.org/). Bioconductor Project.
- [Galaxy Training Network](https://training.galaxyproject.org/). Galaxy Project.
- [nf-core Documentation](https://nf-co.re/docs). nf-core.
- [The Carpentries Lessons](https://carpentries.org/lessons). The Carpentries.
- [Metagenomic tools in microbial ecology research.](https://pubmed.ncbi.nlm.nih.gov/33592536). Current opinion in biotechnology, 2021.
- [HLRMDB: a comprehensive database of the human microbiome with metagenomic assembly, taxonomic classification, and functional annotation by analysis of long-read and hybrid sequencing data.](https://pubmed.ncbi.nlm.nih.gov/41207298). Nucleic acids research, 2026.
- [Unraveling metagenomics through long-read sequencing: a comprehensive review.](https://pubmed.ncbi.nlm.nih.gov/38282030). Journal of translational medicine, 2024.
- [Air monitoring by nanopore sequencing.](https://pubmed.ncbi.nlm.nih.gov/39081363). ISME communications, 2024.
- [Computational Tools and Resources for Long-read Metagenomic Sequencing Using Nanopore and PacBio.](https://pubmed.ncbi.nlm.nih.gov/40845163). Genomics, proteomics & bioinformatics, 2025.

> This article is educational and does not replace validated analysis plans, institutional policy, clinical interpretation, or specialist review.