# A Step-by-Step Guide to Taxonomic Classification of Long-Read Metagenomic Data: From Raw Reads to Species-Level Profiles

Long-read metagenomic sequencing produces reads that are thousands to tens of thousands of base pairs in length, and these reads carry substantially more information per molecule than the 150 to 300 base pair reads generated by short-read platforms. This information advantage makes long reads useful for taxonomic classification, yet the analysis workflow differs from short-read pipelines in several important ways. This guide walks through the complete process of classifying long reads taxonomically, from raw read quality control through species-level profiling, with specific parameter recommendations for Pacific Biosciences (PacBio) HiFi and Oxford Nanopore Technology (ONT) data. The intended reader is a biology student, researcher, or laboratory professional who has generated or plans to generate long-read metagenomic data and needs a practical, reproducible workflow for determining which organisms are present in a sample.

The workflow presented here covers two principal classification strategies: alignment-based methods that map reads to reference databases, and k-mer-based methods that compare sequence composition against indexed references. Both approaches have strengths and limitations that depend on read quality, sequencing depth, and the biological complexity of the sample. The guide also addresses quality control, database selection, parameter tuning, output interpretation, and common failure patterns, with escalation criteria for when results require professional bioinformatics support.

## At a Glance: Long-Read Taxonomic Classification Workflow

The table below summarizes the main stages of a long-read taxonomic classification pipeline, the tools commonly used at each stage, and the key decisions a researcher must make.

| Workflow Stage | Primary Tools | Key Decisions | Typical Output |
| --- | --- | --- | --- |
| Read quality control | NanoPlot, NanoFilt, chopper, HiFiAdapterFilt | Minimum read length, quality score threshold, adapter trimming | Filtered FASTQ files, read length and quality statistics |
| Reference database selection | NCBI RefSeq, NCBI nt, GTDB, SILVA | Database completeness versus computational cost, taxonomy version | Indexed database files ready for classification |
| Alignment-based classification | Minimap2, DIAMOND, MEGAN-LR | Mapping preset (map-ont vs map-hifi), minimum identity, taxonomic binning | SAM/BAM alignment files, taxonomic abundance tables |
| K-mer-based classification | Kraken2, Centrifuge, sourmash | K-mer length, confidence score, database size | Classification reports with read-level taxonomy assignments |
| Abundance estimation and filtering | Bracken, BugSeq, MetaMaps | Read count thresholds, abundance filtering, false positive control | Species-level relative abundance tables |
| Validation and reporting | Taxometer, custom scripts, R/Bioconductor packages | Cross-method agreement, ground truth comparison, rarefaction analysis | Final taxonomic profiles with confidence metrics |

The choice between alignment-based and k-mer-based methods is not mutually exclusive. Many published pipelines run both approaches and compare results, because the two strategies have different error profiles and different sensitivities to read quality. A benchmarking study of 11 taxonomic classification methods applied to mock community datasets found that long-read classifiers generally outperformed short-read methods, and that several short-read methods produced many false positives at lower abundances, required heavy filtering to achieve acceptable precision, and produced inaccurate abundance estimates. The same study found that read quality affected performance for methods relying on protein prediction or exact k-mer matching, and these methods performed better with PacBio HiFi datasets than with noisier Nanopore data.

## Understanding Long-Read Sequencing Platforms and Their Error Profiles

### PacBio HiFi Reads

PacBio HiFi sequencing produces reads with median accuracy above 99.9 percent, achieved through circular consensus sequencing where the same molecule is read multiple times and a consensus sequence is generated. HiFi reads typically range from 10 to 25 kilobases in length, though longer reads are possible. The high accuracy of HiFi reads makes them suitable for exact k-mer matching approaches and for protein-based classification methods that depend on accurate open reading frame prediction. The benchmarking study noted that methods relying on protein prediction or exact k-mer matching performed better with PacBio HiFi datasets, which reflects the lower error rate of this platform.

For taxonomic classification of HiFi data, the practical implication is that fewer quality filtering steps are needed before classification. Adapter contamination remains a concern, and tools such as HiFiAdapterFilt are designed to remove residual adapter sequences from HiFi reads. After adapter removal, most HiFi reads can be passed directly to classification tools without length or quality trimming, though very short reads below 500 base pairs may be removed to reduce spurious matches.

### Oxford Nanopore Technology Reads

ONT sequencing produces reads that can exceed 100 kilobases in length, but with a higher error rate than PacBio HiFi. Current ONT chemistry and basecalling models produce median read accuracy in the range of 95 to 99 percent, with errors concentrated in homopolymer regions and other repetitive sequences. The error profile includes both substitution errors and insertion-deletion errors, which complicates exact k-mer matching approaches.

For taxonomic classification of ONT data, quality filtering is more consequential than for HiFi data. Minimum read length thresholds are commonly set between 500 and 1,000 base pairs to remove short, low-quality reads that contribute little classification information. Quality score filtering using tools such as NanoFilt or chopper can remove the lowest-quality reads, though aggressive filtering reduces the total number of reads available for classification. The benchmarking study found that read quality affected performance for methods relying on protein prediction or exact k-mer matching, which means researchers using ONT data should expect lower performance from these methods compared to HiFi data and may need to rely more heavily on alignment-based approaches.

### Sequencing Depth Considerations

The depth of sequencing required for taxonomic classification depends on the goals of the study. Detecting abundant community members requires less depth than detecting rare species. A 2025 study that applied 148 billion base pairs of Nanopore long-read data and 122 billion base pairs of Illumina short-read data to a single forest soil sample reconstructed 837 metagenome-assembled genomes, including 466 that met high- and medium-quality standards. The same study used rarefaction and k-mer analyses to show that even at this depth, only a fraction of the extant diversity was captured, with nonparametric models projecting that more than 10 trillion base pairs of sequencing data would be required to approach saturation. This finding has a direct implication for taxonomic classification: the absence of a species from a classification report does not prove the species is absent from the sample. It may simply be below the detection limit given the sequencing depth.

For practical purposes, a researcher should decide before sequencing whether the goal is to identify dominant community members, which may require only 1 to 5 gigabases of long-read data, or to recover rare species, which may require tens to hundreds of gigabases. The benchmarking study found that the top-performing long-read methods detected all species down to the 0.1 percent abundance level with high precision in PacBio HiFi mock community datasets, which provides a reference point for detection sensitivity in controlled conditions.

## Setting Up the Computational Environment

### Hardware Requirements

Taxonomic classification of long-read metagenomic data is computationally intensive, and the hardware requirements depend on the chosen method and database size. K-mer-based classifiers such as Kraken2 and Centrifuge require substantial random access memory (RAM) to load reference databases into memory. A standard Kraken2 database built from the NCBI RefSeq database requires approximately 100 to 200 gigabytes of RAM, depending on the database version and the number of genomes included. Centrifuge has similar memory requirements. Alignment-based methods such as Minimap2 are more memory-efficient, typically requiring 10 to 50 gigabytes of RAM depending on the reference database size, but they are more CPU-intensive.

Researchers working on a shared computing cluster should check available resources before starting an analysis. The Galaxy Training Network provides accessible workflow training and analysis tutorials that can be run on public Galaxy servers, which reduces the local hardware burden. The nf-core documentation describes community pipeline standards and usage patterns that assume access to a high-performance computing environment with job scheduling. For researchers without access to such infrastructure, cloud computing instances with large memory allocations are a practical alternative.

### Software Installation and Reproducibility

Reproducibility is a central concern in bioinformatics analysis. The Bioconductor project provides official package, workflow, installation, and reproducible genomic-analysis documentation, and many taxonomic classification and downstream analysis tools are available through Bioconductor or can be integrated into R-based workflows. The Carpentries lessons offer foundational computing, data, shell, Git, and programming training that is useful for researchers who need to build the computational skills required for reproducible analysis.

A practical approach to reproducibility is to record the exact software versions used, the database versions and download dates, and all parameter settings in a lab notebook or a version-controlled file. Containerization tools such as Docker or Singularity can package the entire analysis environment, and the nf-core documentation describes how community pipelines handle software versioning and containerization. For a single-sample analysis, a simple script that records all commands and versions is often sufficient. For multi-sample or multi-project analyses, a workflow management system such as Nextflow or Snakemake provides better reproducibility and scalability.

### Learning Resources

Researchers new to long-read metagenomic analysis should take advantage of existing training materials. The EMBL-EBI Training portal offers bioinformatics learning pathways, data-resource training, and practical analysis education that covers many of the tools and concepts used in this workflow. The Galaxy Training Network provides hands-on tutorials for metagenomic analysis that can be run without local software installation. The Carpentries lessons cover the shell, Git, and programming fundamentals that underpin reproducible bioinformatics work. These resources are particularly valuable for biology students and laboratory professionals who have strong domain knowledge but limited computational experience.

## Quality Control of Long Reads

### Assessing Read Quality and Length Distributions

The first step in any long-read taxonomic classification workflow is to assess the quality and length distribution of the raw sequencing data. Tools such as NanoPlot generate summary statistics and visualizations from FASTQ files, including read length histograms, quality score distributions, and cumulative yield plots. These summaries provide an immediate sense of whether the sequencing run met expectations and whether quality filtering is needed before classification.

Key metrics to record for each sample include the total number of reads, total number of bases, N50 read length, mean read length, median read quality score, and the number of reads above and below candidate length thresholds. These metrics should be recorded before and after filtering to document the effect of quality control on the dataset. The NCBI Data Resources provide official descriptions of sequence data formats and quality metrics that are useful for understanding the FASTQ format and quality score encoding.

### Adapter Trimming and Contamination Removal

Adapter contamination is a common issue in long-read sequencing. PacBio HiFi reads may retain adapter sequences from the circular consensus sequencing process, and ONT reads may contain adapter sequences from the library preparation. Adapter contamination causes spurious matches during classification, particularly when the adapter sequence matches a region of a reference genome.

For PacBio HiFi data, HiFiAdapterFilt is a dedicated tool that identifies and removes reads containing adapter sequences. For ONT data, Porechop and Porechop_ABI are commonly used for adapter trimming, though the choice of tool depends on the library preparation kit used. After adapter trimming, a second round of quality assessment should be performed to confirm that the filtering removed the intended sequences and did not excessively reduce the read count.

### Length Filtering

Minimum read length thresholds are a standard quality control step for long-read metagenomic data. Short reads provide less taxonomic information and are more likely to produce spurious matches. A common threshold is 500 base pairs, though some pipelines use 1,000 base pairs for ONT data to ensure that reads are long enough for reliable classification. The optimal threshold depends on the read length distribution of the sequencing run and the classification method used. Methods that rely on exact k-mer matching benefit more from length filtering than alignment-based methods, because short reads with errors may not contain enough exact k-mers to support a confident classification.

For PacBio HiFi data, where read accuracy is high, a lower length threshold of 200 to 500 base pairs may be acceptable. For ONT data, a higher threshold of 500 to 1,000 base pairs is generally recommended. These thresholds should be recorded and reported in the methods section of any publication or report.

### Quality Score Filtering

Quality score filtering removes reads with low average quality scores. For ONT data, quality scores are assigned by the basecaller and reflect the probability of base-calling errors. A minimum average quality score of 7 to 10 (corresponding to approximately 80 to 90 percent accuracy) is commonly used, though the optimal threshold depends on the downstream analysis. Aggressive quality filtering reduces the number of reads available for classification but improves the accuracy of methods that are sensitive to read errors.

For PacBio HiFi data, quality scores are typically high, and quality filtering has less impact. The main quality control concern for HiFi data is adapter contamination instead of read quality. Researchers should record the quality score distribution before and after filtering and should report the filtering thresholds in their methods.

## Reference Databases for Taxonomic Classification

### NCBI Databases

The National Center for Biotechnology Information (NCBI) maintains the primary public sequence databases used for taxonomic classification. The NCBI Data Resources provide official descriptions of the RefSeq database, the nucleotide collection (nt), and the taxonomy database. RefSeq is a curated, non-redundant collection of reference sequences that is commonly used for taxonomic classification because it provides a manageable database size with good coverage of well-characterized organisms. The nt database is larger and includes all submitted nucleotide sequences, which provides broader coverage but requires substantially more computational resources.

For long-read metagenomic classification, the choice between RefSeq and nt depends on the expected composition of the sample. Environmental samples from soil or marine ecosystems are likely to contain organisms with no close relatives in RefSeq, and the larger nt database may provide better classification rates. A 2025 soil metagenomics study found that nearly all of the reconstructed genomes lacked close relatives among cultivated taxa, which illustrates the limitation of reference databases for environmental samples. For clinical or host-associated samples, RefSeq coverage is generally adequate.

### Taxonomy Versioning

Taxonomy is not static. NCBI updates its taxonomy database regularly, and the classification of a given organism can change between versions. This creates a reproducibility challenge: the same sequencing data classified against different database versions can produce different results. Researchers should record the exact database version and download date for every analysis and should consider whether to use a frozen database version for all samples in a study.

The NCBI taxonomy database can be downloaded directly, and tools such as Kraken2 and Centrifuge provide utilities for building custom databases from NCBI data. The database building process requires significant computational resources and time, particularly for the nt database. Pre-built databases are available for common tools, but researchers should verify the database version and content before use.

### Custom and Specialized Databases

For specific research questions, custom databases may be appropriate. For example, a study focused on gut bacteriophages might build a database from the NCBI viral genome database, while a study of soil microbes might include genomes from the Genome Taxonomy Database (GTDB) in addition to NCBI RefSeq. The benchmarking study used mock community datasets with known composition, which allowed the researchers to evaluate classification accuracy against ground truth. For real samples, the absence of ground truth makes database choice more consequential, and cross-validation with multiple databases can provide confidence in the results.

The Taxometer method, described in a 2024 Nature Communications paper, improves taxonomic annotations of metagenomic contigs using contig abundance profiles and tetra-nucleotide frequencies. This method can enhance any taxonomic annotation of metagenomic contigs and was shown to increase the average share of correct species-level contig annotations of the MMSeqs2 tool from 66.6 percent to 86.2 percent on five short-read CAMI2 datasets. While Taxometer was primarily evaluated on short-read data, the authors also used it for benchmarking taxonomic classifiers on two complex long-read metagenomics datasets where ground truth was not known. This approach of using abundance information to refine taxonomic annotations is relevant for long-read data, where assembly and binning can produce contigs that benefit from abundance-based refinement.

## Alignment-Based Classification Methods

### Minimap2 for Read Mapping

Minimap2 is a versatile alignment tool that is widely used for mapping long reads to reference sequences. It supports different presets for different data types: the `map-ont` preset is optimized for ONT reads, and the `map-hifi` preset is optimized for PacBio HiFi reads. These presets adjust the k-mer size, scoring parameters, and filtering thresholds to account for the different error profiles of the two platforms.

For taxonomic classification, Minimap2 is typically used to map reads to a reference database such as NCBI RefSeq or nt. The resulting SAM or BAM file contains alignments with mapping quality scores, which can be used to assign reads to taxa. A read that maps uniquely to a single reference genome with high identity provides strong evidence for the presence of that organism. A read that maps equally well to multiple reference genomes is ambiguous and may represent a conserved region or a close relative of multiple reference organisms.

The choice of minimum identity threshold is an important parameter. For HiFi data, a minimum identity of 95 to 99 percent is reasonable, because HiFi reads are highly accurate and a lower identity threshold would allow spurious matches. For ONT data, a minimum identity of 80 to 90 percent may be more appropriate, because the higher error rate of ONT reads means that even correct alignments will have lower identity scores. The benchmarking study found that some long-read methods required moderate filtering to reduce false positives, which suggests that default parameters may produce an excess of spurious classifications that need to be filtered.

### MEGAN-LR and DIAMOND for Protein-Based Classification

MEGAN-LR is a long-read version of the MEGAN metagenome analyzer that performs taxonomic classification by comparing reads against a protein reference database using DIAMOND. This approach translates the read sequence in all six reading frames and compares the predicted protein sequences against a database of reference proteins. The taxonomic assignment is then made based on the lowest common ancestor of the best-matching proteins.

Protein-based classification has the advantage of being more sensitive for divergent sequences, because protein sequences are more conserved than nucleotide sequences. However, the approach depends on accurate protein prediction, which is affected by read errors. The benchmarking study found that methods relying on protein prediction performed better with PacBio HiFi datasets than with ONT data, which reflects the higher error rate of ONT reads and the resulting difficulty of accurate translation.

MEGAN-LR and DIAMOND were among the top-performing methods in the benchmarking study, displaying high precision and recall without any filtering required. This makes them a strong choice for researchers who want a classification method that produces reliable results with minimal post-processing. The computational cost of protein-based classification is higher than k-mer-based methods, because the six-frame translation and protein comparison are computationally intensive.

### BugSeq for Cloud-Based Classification

BugSeq is a cloud-based platform that provides taxonomic classification and profiling for long-read metagenomic data. In the benchmarking study, BugSeq was one of the top-performing methods, displaying high precision and recall without filtering required, and detecting all species down to the 0.1 percent abundance level with high precision in PacBio HiFi datasets. BugSeq handles the computational infrastructure, database management, and parameter optimization internally, which makes it accessible to researchers who do not have access to high-performance computing.

The tradeoff for using a cloud-based platform is reduced control over the analysis parameters and database versions. Researchers who need to document every analysis step for regulatory or publication purposes may prefer a local, open-source workflow. However, for researchers who want a reliable classification result without investing time in pipeline development, BugSeq is a practical option.

## K-Mer-Based Classification Methods

### Kraken2

Kraken2 is a k-mer-based taxonomic classifier that assigns reads to taxa by comparing the k-mers in each read against a database of k-mers from reference genomes. Each k-mer in the database is associated with the lowest common ancestor of all genomes that contain that k-mer. A read is classified by finding the root-to-leaf path in the taxonomy tree that maximizes the number of matching k-mers.

Kraken2 is widely used for both short-read and long-read metagenomic classification. For long reads, the longer read length provides more k-mers per read, which can improve classification confidence. However, the error profile of long reads affects k-mer matching: a single sequencing error in a read can disrupt multiple k-mers, reducing the number of matches to the correct reference genome. The confidence score parameter in Kraken2 controls how many k-mers must support a classification, and higher confidence scores reduce false positives at the cost of reduced sensitivity.

The benchmarking study found that Kraken2, when used with short-read classification and profiling methods, produced many false positives at lower abundances and required heavy filtering to achieve acceptable precision. This finding suggests that Kraken2 results should be interpreted with caution, particularly for low-abundance taxa, and that filtering based on read counts or abundance estimates is necessary.

### Bracken for Abundance Estimation

Bracken is a companion tool to Kraken2 that estimates species-level abundance from Kraken2 classification results. Kraken2 classifies reads at multiple taxonomic levels, and Bracken redistributes reads that were classified at higher taxonomic levels to the species level based on the expected k-mer content of each species in the database. This redistribution improves abundance estimates, particularly for species that share k-mers with other species in the database.

Bracken requires a database-specific file that is generated from the Kraken2 database, and the abundance estimation is only as good as the underlying Kraken2 classification. For long-read data, Bracken can be used with Kraken2 results, but the error profile of long reads should be considered when interpreting abundance estimates. The benchmarking study found that several short-read classification and profiling methods produced inaccurate abundance estimates, which underscores the importance of validating abundance estimates against known standards when possible.

### Centrifuge

Centrifuge is another k-mer-based classifier that uses a Burrows-Wheeler transform and Ferragina-Manzini index to achieve fast classification with a smaller memory footprint than Kraken2. Centrifuge assigns reads to taxa and provides abundance estimates directly. The tool is designed to handle large databases efficiently, making it suitable for classification against the nt database.

The benchmarking study included Centrifuge in the evaluation and found that it was among the methods that required filtering to reduce false positives. The Taxometer study found that Taxometer reduced the share of wrong species-level annotations for Centrifuge by an average of two-fold on the CAMI2 Rhizosphere dataset. This finding suggests that Centrifuge classifications can be improved by post-processing with abundance-based refinement methods.

### sourmash

sourmash is a sequence comparison tool that uses MinHash sketches to estimate sequence similarity. For taxonomic classification, sourmash compares the k-mer content of reads or assembled contigs against a database of reference genomes and reports the best-matching taxa. The MinHash approach is computationally efficient and can handle large databases with modest memory requirements.

In the benchmarking study, sourmash was one of the top-performing methods, displaying high precision and recall without filtering required, and detecting all species down to the 0.1 percent abundance level with high precision in PacBio HiFi datasets. This performance makes sourmash a strong candidate for long-read taxonomic classification, particularly for researchers who want a method that produces reliable results with minimal post-processing.

## Hybrid and Assembly-Based Approaches

### Read-Based versus Assembly-Based Classification

The classification methods described above operate directly on reads. An alternative approach is to assemble the long reads into contigs and then classify the contigs. Assembly-based classification has the advantage of producing longer sequences that contain more taxonomic information, and it enables downstream analyses such as genome binning and functional annotation. However, assembly is computationally intensive and can introduce errors, particularly for low-abundance organisms.

The Taxometer method is designed for taxonomy-based classification of metagenomic assembled contigs. It uses contig abundance profiles and tetra-nucleotide frequencies to improve the annotations and estimate the quality of any taxonomic classifier. The method was shown to increase the average share of correct species-level contig annotations of the MMSeqs2 tool from 66.6 percent to 86.2 percent on five short-read CAMI2 datasets, and it reduced the share of wrong species-level annotations in the CAMI2 Rhizosphere dataset by an average of two-fold for Metabuli, Centrifuge, and Kraken2. The authors also used Taxometer for benchmarking taxonomic classifiers on two complex long-read metagenomics datasets where ground truth was not known.

For researchers working with long-read data, the choice between read-based and assembly-based classification depends on the research question. If the goal is to determine which organisms are present and their relative abundances, read-based classification is faster and simpler. If the goal is to recover genomes, analyze biosynthetic gene clusters, or study structural variation, assembly-based approaches are necessary. The 2025 soil metagenomics study used hybrid assembly of Nanopore long-read data and Illumina short-read data to reconstruct 837 metagenome-assembled genomes and identify more than 11,000 biosynthetic gene clusters, over 99 percent of which had no match in current databases. This study demonstrates the power of assembly-based approaches for discovering novel microbial diversity and metabolic capacity.

### Hybrid Assembly with Long and Short Reads

Hybrid assembly combines long reads for contiguity and short reads for accuracy. The 2025 soil metagenomics study applied 148 billion base pairs of Nanopore long-read data and 122 billion base pairs of Illumina short-read data to a single forest soil sample, and the hybrid assembly reconstructed 837 metagenome-assembled genomes. This approach is particularly valuable for complex environmental samples where individual sequencing platforms have limitations.

For taxonomic classification, hybrid assembly can improve the accuracy of contig classification because the assembled contigs are longer and more accurate than individual reads. However, the computational cost of hybrid assembly is substantial, and the benefits may not justify the cost for samples where read-based classification provides sufficient resolution. Researchers should consider their research questions and available computational resources when deciding whether to pursue hybrid assembly.

### Long-Read Amplicon Denoising

For amplicon-based studies, long-read sequencing enables the analysis of complete genes or genomic regions instead of short fragments. The 2019 Nucleic Acids Research paper on long-read amplicon denoising describes methods for reconstructing true sequence variants and their associated frequencies from PacBio reads, free of sequencing error. The paper introduces two methods: Fast Amplicon Denoising (FAD), which runs nearly instantly and is very accurate for medium-length reads and high template coverage, and Robust Amplicon Denoising (RAD), which is more robust when reads are very long or coverage is lower. Both methods outperformed existing algorithms on mock virus community datasets and successfully discriminated templates that differ by a single nucleotide.

For taxonomic classification of amplicon data, denoising is a critical step because sequencing errors can be mistaken for true biological variants. The choice between FAD and RAD depends on the read length and coverage of the dataset. Researchers should record the denoising method and parameters used and should validate the results against known standards when possible.

## Parameter Recommendations for PacBio HiFi and Nanopore Reads

### PacBio HiFi Parameter Recommendations

For PacBio HiFi data, the high accuracy of the reads allows for more stringent classification parameters. The following recommendations are based on the benchmarking study and general practice in the field:

- Minimum read length: 200 to 500 base pairs. HiFi reads are highly accurate, and short reads can still provide useful classification information.
- Minimum identity for alignment-based methods: 95 to 99 percent. The high accuracy of HiFi reads means that correct alignments should have very high identity.
- Kraken2 confidence score: 0.1 to 0.5. The confidence score controls the fraction of k-mers that must support a classification. Higher scores reduce false positives.
- Bracken abundance estimation: Use the default parameters, but validate against known standards when possible.
- Protein-based classification (MEGAN-LR, DIAMOND): These methods perform well with HiFi data because accurate protein prediction is possible.

### Nanopore Parameter Recommendations

For ONT data, the higher error rate requires adjustments to the classification parameters:

- Minimum read length: 500 to 1,000 base pairs. Longer reads provide more information and are less likely to produce spurious matches.
- Minimum identity for alignment-based methods: 80 to 90 percent. The higher error rate of ONT reads means that correct alignments will have lower identity scores.
- Kraken2 confidence score: 0.1 to 0.3. Lower confidence scores may be needed to achieve acceptable sensitivity, but this increases the risk of false positives.
- Protein-based classification: Expect lower performance than with HiFi data. Consider using alignment-based or k-mer-based methods instead.
- Quality filtering: Apply quality score filtering to remove the lowest-quality reads before classification.

### Database Selection Parameters

The choice of reference database affects classification performance. For samples expected to contain well-characterized organisms, the NCBI RefSeq database is a reasonable choice. For environmental samples or samples expected to contain novel organisms, the larger nt database may provide better classification rates, though at higher computational cost. The NCBI Data Resources provide official descriptions of these databases and their contents.

Researchers should record the database version, download date, and any custom modifications for every analysis. This documentation is essential for reproducibility and for interpreting differences between studies.

## Practical Implementation Steps

### Step 1: Install Software and Download Databases

The first step is to install the required software and download the reference databases. The Bioconductor project provides official package and installation documentation for R-based tools, and the nf-core documentation describes community pipeline standards for workflow management. The Carpentries lessons provide foundational training for shell, Git, and programming that is useful for managing the computational environment.

For a typical analysis, the required software includes:

- Quality control tools: NanoPlot, NanoFilt, chopper, HiFiAdapterFilt
- Alignment tools: Minimap2, DIAMOND
- Classification tools: Kraken2, Bracken, Centrifuge, sourmash, MEGAN-LR
- Assembly tools (if needed): Flye, Raven, or other long-read assemblers
- Analysis and visualization tools: R, Bioconductor packages, or Python libraries

The database download and indexing step can take several hours to several days, depending on the database size and available bandwidth. Researchers should plan for this time and should verify the integrity of downloaded files before proceeding.

### Step 2: Assess Raw Read Quality

Run NanoPlot or a similar tool on the raw FASTQ files to generate summary statistics and visualizations. Record the following metrics:

- Total number of reads
- Total number of bases
- N50 read length
- Mean and median read length
- Mean and median quality score
- Read length distribution

These metrics provide a baseline for evaluating the effect of quality filtering.

### Step 3: Filter Reads

Apply adapter trimming and quality filtering based on the platform and the metrics from Step 2. For PacBio HiFi data, run HiFiAdapterFilt to remove adapter contamination. For ONT data, run Porechop or a similar adapter trimmer, then apply length and quality filters using NanoFilt or chopper.

Record the filtering parameters and the number of reads and bases retained after each filtering step. This documentation is essential for reproducibility.

### Step 4: Classify Reads

Run the chosen classification method or methods on the filtered reads. For alignment-based classification, map reads to the reference database using Minimap2 with the appropriate preset, then process the alignments to assign taxonomy. For k-mer-based classification, run Kraken2 or Centrifuge with the chosen parameters.

If using multiple classification methods, run them independently and compare the results. Disagreements between methods can highlight ambiguous classifications that require further investigation.

### Step 5: Estimate Abundances

For k-mer-based classification, run Bracken to estimate species-level abundances from Kraken2 results. For alignment-based classification, calculate relative abundances from the number of reads assigned to each taxon, normalized by genome size if possible.

Record the abundance estimates and the number of reads supporting each classification. Low read counts provide weak evidence for the presence of a taxon, and abundance estimates based on fewer than 10 reads should be interpreted with caution.

### Step 6: Filter and Validate Results

Apply filtering to remove likely false positives. Common filtering approaches include:

- Removing taxa supported by fewer than a minimum number of reads (e.g., 5 or 10 reads)
- Removing taxa with relative abundance below a threshold (e.g., 0.01 percent)
- Comparing results across multiple classification methods and retaining only taxa identified by multiple methods
- Using Taxometer or similar methods to refine contig-level annotations

If a mock community or other sample with known composition was sequenced, compare the classification results against the known composition to evaluate accuracy.

### Step 7: Report Results

Report the classification results with the following information:

- Software versions and database versions
- Filtering parameters and read retention statistics
- Classification parameters for each method
- The number of reads classified at each taxonomic level
- The final taxonomic profile with abundance estimates
- Any limitations or caveats, such as the detection limit given the sequencing depth

The NCBI Data Resources provide guidance on sequence data submission and reporting standards that are useful for preparing results for publication.

## Records and Measurements

### What to Record

A complete record of the analysis is essential for reproducibility and for interpreting results. The following records should be maintained for each sample:

- Sequencing platform and chemistry
- Basecalling software and version
- Raw read statistics (total reads, total bases, N50, quality scores)
- Filtering parameters and read retention at each step
- Reference database name, version, and download date
- Classification software versions and parameters
- Classification results at each taxonomic level
- Abundance estimates and supporting read counts
- Any post-processing or filtering applied

These records should be stored in a version-controlled file or lab notebook and should be referenced in any publication or report.

### Quality Metrics to Monitor

The following quality metrics should be monitored throughout the analysis:

- Read length distribution before and after filtering
- Read quality score distribution before and after filtering
- Fraction of reads classified at each taxonomic level
- Fraction of reads unclassified
- Number of taxa detected at each taxonomic level
- Abundance distribution across taxa

A sudden drop in the fraction of classified reads may indicate a problem with the database or parameters. An unusually large number of taxa detected at very low abundance may indicate false positives that require filtering.

### Validation Against Known Standards

When possible, validate the classification workflow against a mock community or other sample with known composition. The benchmarking study used mock community datasets generated using PacBio HiFi and ONT sequencing, which provides a reference for expected performance. Validation against known standards allows the researcher to calibrate filtering thresholds and to document the detection limit of the workflow.

For real samples without known composition, cross-validation with multiple classification methods provides some confidence in the results. Taxa identified by multiple independent methods are more likely to be truly present than taxa identified by a single method.

## Common Failure Patterns and Troubleshooting

### Low Classification Rates

A low fraction of classified reads can result from several causes:

- Reference database does not contain close relatives of the organisms in the sample. This is common for environmental samples, where most organisms lack cultivated representatives. The 2025 soil metagenomics study found that nearly all reconstructed genomes lacked close relatives among cultivated taxa.
- Read quality is too low for the classification method. Methods that rely on exact k-mer matching or protein prediction are particularly sensitive to read errors.
- Filtering parameters are too aggressive, removing reads that would have been classified.
- The minimum identity threshold is too high, rejecting correct alignments with lower identity due to sequencing errors.

Troubleshooting steps include checking the read quality metrics, trying a different classification method, using a larger reference database, and adjusting the filtering parameters.

### Excessive False Positives

A large number of taxa detected at very low abundance may indicate false positives. The benchmarking study found that several short-read classification and profiling methods produced many false positives at lower abundances, and some long-read methods required moderate filtering to reduce false positives. Common causes include:

- K-mer-based classifiers assigning reads to taxa based on a small number of matching k-mers
- Contamination in the reference database
- Misassembled reference genomes in the database
- Reads mapping to conserved regions shared by multiple taxa

Troubleshooting steps include increasing the confidence score in Kraken2, applying a minimum read count filter, and comparing results across multiple classification methods.

### Disagreement Between Classification Methods

Different classification methods often produce different results, particularly for low-abundance taxa. Disagreement can result from:

- Different reference databases
- Different classification algorithms with different error profiles
- Different filtering thresholds
- Ambiguous reads that match multiple taxa equally well

When methods disagree, the researcher should examine the specific reads or taxa in question and consider whether the disagreement reflects a genuine biological signal or a technical artifact. The Taxometer method can be used to refine contig-level annotations and to estimate the quality of taxonomic classifiers.

### Computational Resource Exhaustion

Classification against large databases can exhaust available memory or CPU resources. Common solutions include:

- Using a smaller reference database
- Using a more memory-efficient classification method
- Running the analysis on a high-performance computing cluster
- Using a cloud-based platform such as BugSeq

The nf-core documentation describes community pipeline standards for running analyses on high-performance computing infrastructure, and the Galaxy Training Network provides access to public servers for running analyses without local infrastructure.

## Limitations and Interpretation Caveats

### Detection Limits

The absence of a taxon from a classification report does not prove the taxon is absent from the sample. The detection limit depends on the sequencing depth, the abundance of the taxon, and the classification method. The benchmarking study found that the top-performing long-read methods detected all species down to the 0.1 percent abundance level with high precision in PacBio HiFi mock community datasets. The 2025 soil metagenomics study found that even with 148 billion base pairs of Nanopore data, only a fraction of the extant diversity was captured, with projections suggesting that more than 10 trillion base pairs would be required to approach saturation.

Researchers should report the sequencing depth and the expected detection limit for their study. For samples where rare species are of interest, deeper sequencing or targeted enrichment may be necessary.

### Reference Database Bias

Taxonomic classification depends on the reference database. Organisms with close relatives in the database are more likely to be classified correctly than organisms without close relatives. The 2025 soil metagenomics study found that nearly all reconstructed genomes lacked close relatives among cultivated taxa, which means that classification of soil metagenomic data is likely to miss or misclassify many organisms.

Researchers should consider whether the reference database is appropriate for their sample type and should report the database version and limitations. For environmental samples, the classification results should be interpreted as indicating the presence of organisms related to database entries, not necessarily the presence of the exact species named.

### Abundance Estimate Accuracy

Relative abundance estimates from taxonomic classification are approximations. K-mer-based methods such as Kraken2 and Bracken estimate abundance based on the number of reads assigned to each taxon, but this estimate can be biased by genome size, read length, and classification errors. The benchmarking study found that several short-read classification and profiling methods produced inaccurate abundance estimates, which underscores the need for validation.

For accurate abundance estimates, researchers should consider using methods that account for genome size and read length, and should validate against known standards when possible.

### Phage and Mobile Genetic Element Dynamics

Long-read metagenomics has revealed complex dynamics of phages and mobile genetic elements in microbial communities. A 2026 Nature study used deep long-read bulk metagenomic sequencing to track prophage integration dynamics in stool samples from six healthy individuals over a 2-year timescale. The study found that most prophages remained stably integrated into their hosts, but approximately 5 percent of phages were dynamically gained or lost from persistent bacterial hosts. The study also identified multiple instances of integration of the same phage into bacteria of different taxonomic families, challenging the dogma that phages are specific to a host of a given species or strain.

For taxonomic classification, this finding has an important implication: the presence of phage sequences in a sample does not necessarily indicate the presence of a free phage. The phage sequences may be integrated into bacterial genomes, and the taxonomic classification of these sequences may reflect the phage taxonomy instead of the host taxonomy. Researchers studying phage communities should be aware of this limitation and should consider using assembly-based approaches to distinguish integrated prophages from free phages.

## Safety and Regulatory Context

### Data Management and Privacy

Metagenomic data from human-associated samples may contain human sequences, and researchers must comply with applicable privacy regulations. The NCBI Data Resources provide guidance on data submission and access policies, including the distinction between public and controlled-access data. Researchers working with human samples should consult their institutional review board and follow applicable data protection requirements.

### Responsible Use of Classification Results

Taxonomic classification results can have implications beyond the research context. For example, the detection of a pathogen in an environmental sample may trigger public health concerns, and the detection of antibiotic resistance genes may have clinical implications. Researchers should consider the potential consequences of their findings and should report results with appropriate caveats.

### Professional Escalation Criteria

Researchers should seek professional bioinformatics support in the following situations:

- The classification results are inconsistent across multiple methods and the source of disagreement cannot be resolved
- The fraction of classified reads is unexpectedly low and troubleshooting does not identify the cause
- The computational requirements exceed available resources and the analysis cannot be completed
- The results will be used for clinical, regulatory, or public health decisions
- The analysis requires specialized expertise not available in the research group

The EMBL-EBI Training portal and the Galaxy Training Network provide pathways for developing bioinformatics skills, and the Bioconductor project provides documentation for reproducible genomic analysis. For complex analyses, collaboration with a bioinformatics core facility or a computational biology group is recommended.

## Frequently Asked Questions

### What is the difference between alignment-based and k-mer-based taxonomic classification?

Alignment-based classification maps reads to reference sequences using alignment tools such as Minimap2 or DIAMOND, and assigns taxonomy based on the best-matching reference. K-mer-based classification compares the k-mer content of reads against a database of k-mers from reference genomes, and assigns taxonomy based on the lowest common ancestor of matching k-mers. Alignment-based methods are generally more sensitive for divergent sequences but are more computationally intensive. K-mer-based methods are faster but can produce false positives, particularly for low-abundance taxa.

### Which classification method performs best for PacBio HiFi data?

The benchmarking study found that BugSeq, MEGAN-LR with DIAMOND, and sourmash displayed high precision and recall without filtering required, and detected all species down to the 0.1 percent abundance level with high precision in PacBio HiFi datasets. Methods that rely on protein prediction or exact k-mer matching perform better with HiFi data because of the high read accuracy. The best method for a given study depends on the research question, the available computational resources, and the need for reproducibility.

### Which classification method performs best for Nanopore data?

The benchmarking study found that read quality affected performance for methods relying on protein prediction or exact k-mer matching, and these methods performed better with PacBio HiFi datasets than with Nanopore data. For Nanopore data, alignment-based methods such as Minimap2 with the map-ont preset are generally recommended, and filtering to reduce false positives may be necessary. The optimal method depends on the read quality and the research question.

### How much sequencing depth is needed for taxonomic classification?

The required sequencing depth depends on the goals of the study. Detecting dominant community members requires less depth than detecting rare species. The benchmarking study found that the top-performing long-read methods detected all species down to the 0.1 percent abundance level with high precision in PacBio HiFi mock community datasets. The 2025 soil metagenomics study found that even with 148 billion base pairs of Nanopore data, only a fraction of the extant diversity was captured. Researchers should decide before sequencing whether the goal is to identify dominant community members or to recover rare species.

### How should I choose a reference database for taxonomic classification?

The choice of reference database depends on the expected composition of the sample. The NCBI RefSeq database is a curated, non-redundant collection that is suitable for samples expected to contain well-characterized organisms. The larger nt database provides broader coverage but requires more computational resources. For environmental samples, the classification results should be interpreted with caution because most organisms lack close relatives in reference databases. The NCBI Data Resources provide official descriptions of these databases.

### What is the difference between read-based and assembly-based classification?

Read-based classification assigns taxonomy directly to individual reads, which is faster and simpler. Assembly-based classification assembles reads into contigs and then classifies the contigs, which produces longer sequences with more taxonomic information and enables downstream analyses such as genome binning and functional annotation. The Taxometer method can improve contig-level annotations using abundance profiles and tetra-nucleotide frequencies. The choice depends on the research question and available computational resources.

### How can I reduce false positives in taxonomic classification?

False positives can be reduced by increasing the confidence score in k-mer-based classifiers, applying a minimum read count filter, using a minimum identity threshold for alignment-based methods, and comparing results across multiple classification methods. The benchmarking study found that several methods required moderate to heavy filtering to reduce false positives. Taxometer can also be used to refine contig-level annotations and reduce wrong species-level annotations.

### What should I do if my classification results are inconsistent across methods?

Inconsistent results across methods can result from different reference databases, different classification algorithms, different filtering thresholds, or ambiguous reads that match multiple taxa equally well. Researchers should examine the specific reads or taxa in question and consider whether the disagreement reflects a genuine biological signal or a technical artifact. Cross-validation with multiple methods provides some confidence in the results, and taxa identified by multiple independent methods are more likely to be truly present. If the inconsistency cannot be resolved, professional bioinformatics support should be sought.

## Related Bioinformatics Guides

- [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)
- [Metagenomics Pipeline: From Raw Reads to Taxonomic and Functional Profiles](/knowledge/bioinformatics/metagenomics-pipeline-from-raw-reads-to-taxonomic-and-functional-profiles)
- [Metagenomics Data Analysis: From Raw Reads to Biological Insights](/knowledge/bioinformatics/metagenomics-data-analysis-from-raw-reads-to-biological-insights)
- [De Novo Genome Assembly with Long Reads: A Practical Workflow](/knowledge/bioinformatics/de-novo-genome-assembly-with-long-reads-a-practical-workflow)
- [RNA-Seq Data Analysis Workflow: From Raw Reads to Insights](/knowledge/bioinformatics/rna-seq-data-analysis-workflow-from-raw-reads-to-insights)

## 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.
- [Evaluation of taxonomic classification and profiling methods for long-read shotgun metagenomic sequencing datasets.](https://pubmed.ncbi.nlm.nih.gov/36513983). BMC bioinformatics, 2022.
- [Ultra-deep long-read metagenomics captures diverse taxonomic and biosynthetic potential of soil microbes.](https://pubmed.ncbi.nlm.nih.gov/41133998). GigaScience, 2025.
- [Long-read amplicon denoising.](https://pubmed.ncbi.nlm.nih.gov/31418021). Nucleic acids research, 2019.
- [Taxometer: Improving taxonomic classification of metagenomics contigs.](https://pubmed.ncbi.nlm.nih.gov/39333501). Nature communications, 2024.
- [Long-read metagenomics reveals phage dynamics in the human gut microbiome.](https://pubmed.ncbi.nlm.nih.gov/41299176). Nature, 2026.

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