# How to Assemble Long-Read Metagenomes: A Practical Workflow for PacBio HiFi and Oxford Nanopore

Long-read metagenome assembly is the process of reconstructing microbial genomes from sequencing data produced by PacBio HiFi or Oxford Nanopore platforms. This workflow covers read correction, assembly with tools such as metaFlye or Canu, and binning, with specific attention to troubleshooting low-complexity communities and high-error Nanopore reads. The intended reader is a researcher or laboratory professional who has generated or plans to generate long-read metagenomic data and needs a reproducible path from raw reads to assembled genomes suitable for downstream analysis.

## Scope and Reader Context

This article addresses the practical problem of assembling metagenomes from long-read sequencing data. Many published protocols focus on isolate genomes, which are simpler because they contain a single organism. Metagenomes contain multiple species at varying abundances, which creates challenges for assembly algorithms designed for single genomes. The workflow described here applies to both PacBio HiFi and Oxford Nanopore data, with adjustments for the error profiles of each platform.

The reader should have basic familiarity with command-line tools and the Linux operating system. The [Carpentries lessons](https://carpentries.org/lessons) provide foundational training in shell, Git, and programming that will be useful before attempting metagenome assembly. The [Galaxy Training Network](https://training.galaxyproject.org/) offers accessible workflow tutorials for those who prefer a graphical interface over command-line operations.

Long-read sequencing has changed the practice of metagenomics because it produces reads that are several kilobases long, which enables more complete and contiguous genomic information compared to short-read sequencing. The two dominant platforms are Pacific Biosciences and Oxford Nanopore Technologies, each with distinct advantages and error characteristics. A comprehensive review of long-read metagenomics describes the full workflow from sample preparation through sequencing, processing, and analysis, and it introduces tools compatible with long-read data at each stage.

## At a Glance

The table below summarizes the key decisions in a long-read metagenome assembly workflow. Each row represents a stage with the primary tool options and the main consideration for choosing between them.

| Workflow Stage | Primary Tool Options | Key Decision Factor |
| --- | --- | --- |
| Read quality control | chopper, Filtlong, NanoFilt | Error rate and read length distribution of the platform |
| Read correction | Canu, Falcon, Racon | HiFi reads may need minimal correction, Nanopore reads benefit from correction |
| Assembly | metaFlye, Canu, Raven | Community complexity and expected genome sizes |
| Polishing | Racon, Medaka, Polca | Required base accuracy for downstream gene prediction |
| Binning | MetaBAT2, MaxBin2, SemiBin | Completeness and contamination thresholds for MAG recovery |
| Taxonomic annotation | GTDB-Tk, Kraken2 | Reference database availability and computational budget |

## Long-Read Sequencing Platforms and Their Data Characteristics

### PacBio HiFi Data

PacBio HiFi sequencing produces reads with high per-base accuracy because each molecule is sequenced multiple times in a circular consensus sequencing mode. The resulting reads have accuracy comparable to short reads but with lengths of several kilobases. This combination makes HiFi data well suited for metagenome assembly because the assembly graph is less ambiguous when reads are both long and accurate.

The main limitation of HiFi data is the higher cost per base compared to Nanopore and the requirement for more input DNA. For metagenomes with low biomass, this can be a practical constraint. The [NCBI data resources](https://www.ncbi.nlm.nih.gov/) provide access to deposited HiFi metagenome datasets that can be used for testing workflows before committing to a sequencing run.

### Oxford Nanopore Data

Oxford Nanopore sequencing produces reads that can be very long, often exceeding 10 kilobases, but with higher per-base error rates than HiFi. The error profile is dominated by insertion and deletion errors instead of substitutions, which has implications for assembly and polishing. Modern basecallers have improved raw read accuracy, but correction steps remain important for optimal assembly results.

Nanopore sequencing requires less input DNA than PacBio, which makes it attractive for metagenomes with limited biomass. The [NanoGalaxy toolkit](https://pubmed.ncbi.nlm.nih.gov/33068114) provides a Galaxy-based platform for Nanopore long-read analysis that includes assembly tools and workflows, making the analysis accessible to researchers without extensive command-line experience.

### Error Profiles and Their Impact on Assembly

The error profile of the sequencing platform determines the assembly strategy. HiFi reads have low error rates, so assembly algorithms can use the reads directly with minimal correction. Nanopore reads have higher error rates, and the insertion-deletion errors can confuse assemblers that assume a certain error model.

For Nanopore data, read correction is often performed before assembly. Correction can be done with the assembly tool itself, as in Canu, or with a separate correction step using tools such as Racon. The choice depends on the read depth and the expected community complexity. High-depth samples can support self-correction, while low-depth samples may benefit from correction using a reference or a hybrid approach with short reads.

## Core Principles of Long-Read Metagenome Assembly

### The Assembly Graph and Repeat Resolution

Assembly algorithms build a graph in which reads are nodes and overlaps between reads are edges. The assembler traverses the graph to produce contigs. Long reads resolve repeats more effectively than short reads because a single read can span a repeat region and connect the flanking unique sequences. This is the primary advantage of long-read assembly for metagenomes, where repeats and closely related strains create ambiguity.

In metagenomes, the graph is complicated by the presence of multiple genomes at different abundances. Highly abundant species produce many reads and deep coverage, while rare species produce few reads and shallow coverage. Assemblers must handle this dynamic range without collapsing distinct but similar genomes into a single consensus.

### Completeness and Contamination in Metagenome-Assembled Genomes

The goal of metagenome assembly is to recover metagenome-assembled genomes (MAGs) that are complete and uncontaminated. Completeness refers to the fraction of the genome that is represented in the assembly, and contamination refers to the presence of sequences from other organisms. The recovery of complete genomes from long-read metagenome data is a major advance over short-read approaches, which often produce fragmented assemblies for complex communities.

The [methods for recovery and analysis of long-read MAGs](https://pubmed.ncbi.nlm.nih.gov/37258866) describe bioinformatics workflows for recovering and characterizing complete genomes from long-read data. These workflows include complementary procedures for comparing draft genomes and gene quality obtained from short-read and long-read sequencing. The comparison is important because gene prediction accuracy depends on assembly quality, and long-read assemblies can produce complete genes that are fragmented in short-read assemblies.

### Low-Complexity Communities and Strain Heterogeneity

Low-complexity communities contain few species, which simplifies assembly but introduces a different problem. When a community contains closely related strains, the assembly graph contains bubbles that represent sequence differences between strains. The assembler must decide whether to collapse these bubbles into a single consensus or to separate them into distinct genomes.

Strain-level resolution is an active area of research. Tools such as [Floria](https://pubmed.ncbi.nlm.nih.gov/38940183) recover strain haplotypes from short and long-read metagenome data using read clustering and a network flow model. Floria can function as a standalone haplotyping method or as an end-to-end read-to-assembly pipeline for strain-level assembly. Benchmarking on synthetic metagenomes showed that Floria recovers more strain content than base-level assembly methods while being faster. Applying Floria to deeply sequenced Nanopore metagenomes identified species with consistent strain heterogeneity.

For most assembly projects, the decision is whether to accept a consensus genome that represents the dominant strain or to attempt strain separation. The choice depends on the research question. If the goal is to identify the metabolic potential of a community, consensus genomes are sufficient. If the goal is to track strain dynamics over time or between samples, strain-level resolution is necessary.

## Preparing Raw Reads for Assembly

### Basecalling and Demultiplexing

Raw sequencing data must be basecalled before assembly. For Nanopore data, basecalling is performed by Guppy or Dorado, which convert the raw electrical signal into nucleotide sequences. The basecaller also assigns quality scores to each base. For PacBio HiFi data, basecalling and circular consensus sequence generation are performed by the instrument software.

Demultiplexing is required when multiple samples are sequenced in a single run using barcodes. The demultiplexing step assigns each read to its sample of origin based on the barcode sequence. Errors in demultiplexing can introduce cross-sample contamination, so it is important to check the barcode assignment rates and to trim barcode sequences from the reads.

### Quality Control Metrics

Quality control for long reads differs from short reads. The key metrics are read length distribution, read N50, total bases, and estimated error rate. The read N50 is the length such that 50 percent of the total bases are in reads of that length or longer. A higher N50 indicates a more useful dataset for assembly.

The estimated error rate can be calculated by mapping reads to a reference genome if one is available, or by comparing overlapping reads. For metagenomes without a reference, the error rate can be estimated from the base quality scores, although these scores are not always calibrated to the true error rate.

The [EMBL-EBI training resources](https://www.ebi.ac.uk/training) provide learning pathways for sequence analysis that include quality control and data processing modules. These resources are useful for researchers who need to build their skills in evaluating sequencing data quality.

### Read Trimming and Filtering

Read trimming removes adapter sequences and low-quality bases from the ends of reads. For Nanopore data, adapters are often found at both ends of the read, and failure to remove them can create chimeric assemblies. Read filtering removes reads that are too short or have too low a quality score to be useful for assembly.

The filtering thresholds depend on the assembly tool and the community complexity. A minimum read length of 1 to 2 kilobases is common for metagenome assembly, but longer minimums may be appropriate for communities with large genomes or complex repeats. The quality score threshold is typically set to retain the majority of bases while removing the worst reads.

For Nanopore data, the high error rate means that some reads will have errors that prevent them from overlapping correctly with other reads. Filtering these reads reduces the computational cost of assembly and can improve the assembly quality by removing spurious overlaps.

## Read Correction Strategies

### Why Correct Reads Before Assembly

Read correction reduces the error rate of the reads before assembly. This is important for Nanopore data because the raw error rate can confuse assemblers and produce fragmented or incorrect assemblies. Correction can be performed by aligning reads to each other and generating a consensus, or by aligning reads to a reference genome.

For HiFi data, correction is often unnecessary because the circular consensus sequencing already produces high-accuracy reads. However, some assemblers perform a light correction step internally, and this is sufficient for HiFi data.

### Self-Correction with Canu

Canu performs read correction as part of its assembly pipeline. The correction step aligns reads to each other and generates a corrected consensus for each read. This is computationally expensive but produces high-quality corrected reads. Canu is well suited for Nanopore data with sufficient coverage, typically 30x or more per genome.

The main limitation of Canu correction is the computational cost. For large metagenomes with many genomes, the correction step can take days or weeks. The cost scales with the number of reads and the read length, so filtering to remove short and low-quality reads before correction is important.

### Mapping-Based Correction with Racon

Racon corrects reads by aligning them to an assembly or to a set of reference sequences and generating a consensus. This approach is faster than Canu correction because it uses an existing assembly as a guide. Racon is often used in an iterative polishing loop, where the assembly is corrected, then the reads are realigned to the corrected assembly, and the process is repeated.

For metagenomes, Racon correction can be applied before assembly using a preliminary assembly as the reference. This is a two-pass approach: first assemble with the raw reads to produce a draft assembly, then correct the reads by mapping them to the draft assembly, then reassemble with the corrected reads. This approach can improve assembly quality but doubles the assembly time.

### Hybrid Correction with Short Reads

Hybrid correction uses short reads to correct long reads. The short reads are aligned to the long reads, and a consensus is generated that combines the accuracy of the short reads with the length of the long reads. This approach is useful when the long-read coverage is low or when the error rate is too high for self-correction.

The [VirION2 workflow](https://pubmed.ncbi.nlm.nih.gov/33850654) demonstrates a hybrid approach for viral metagenomes that combines short and long reads. The workflow optimized library preparation to enable longer reads from less input DNA and optimized downstream informatics for improved long-read error correction and assembly. The hybrid assemblies provided significant improvements over long-read-only assemblies in the recovery of longer and more complete viral genomes.

For metagenomes with complex communities, hybrid correction can improve assembly quality but adds the cost of short-read sequencing. The decision to use hybrid correction depends on the research budget and the required assembly quality.

## Assembly with metaFlye

### Overview of metaFlye

metaFlye is a long-read assembler designed for metagenomes. It builds an assembly graph from the corrected reads and resolves repeats using the long-read information. metaFlye is specifically designed to handle the uneven coverage and repeat complexity of metagenomes, and it is one of the most widely used tools for long-read metagenome assembly.

metaFlye accepts both HiFi and Nanopore reads. For HiFi reads, metaFlye uses the high accuracy to simplify the graph. For Nanopore reads, metaFlye expects the reads to be corrected before assembly, although it can also work with raw reads if the error rate is low enough.

### Running metaFlye

The basic metaFlye command specifies the input reads, the output directory, and the sequencing platform. For metagenomes, the `--meta` flag enables the metagenome mode, which adjusts the assembly parameters for uneven coverage and multiple genomes.

The input reads should be in FASTA or FASTQ format. For large datasets, it is common to provide a file listing the read files instead of a single file. metaFlye can also take an assembly graph as input for iterative assembly, which is useful for adding new data to an existing assembly.

The runtime for metaFlye depends on the number of reads and the community complexity. A typical metagenome with 10 to 50 genomes can take several hours to a day on a server with multiple cores. The memory usage is also significant, and 64 to 128 gigabytes of RAM is recommended for complex metagenomes.

### Evaluating the metaFlye Assembly

The metaFlye output includes the assembly graph and the contigs in FASTA format. The contigs should be evaluated for length distribution and completeness. The N50 of the assembly is a useful summary statistic, but for metagenomes, the number of contigs and the fraction of reads that map back to the assembly are more informative.

The read mapping rate indicates how much of the sequencing data is represented in the assembly. A low mapping rate suggests that some reads were not assembled, which can happen for low-abundance species or for reads with high error rates. The mapping rate can be calculated by aligning the reads to the assembly with a tool such as minimap2.

## Assembly with Canu

### When to Use Canu Instead of metaFlye

Canu is a general-purpose long-read assembler that was designed for isolate genomes but can be applied to metagenomes. Canu performs read correction, trimming, and assembly in a single pipeline, which simplifies the workflow. Canu is a good choice when the metagenome has low complexity, such as a community with a few dominant species.

Canu is also useful when the read error rate is high and the coverage is sufficient for self-correction. The Canu correction step produces high-quality corrected reads that can be used for assembly or for other analyses.

### Canu Parameters for Metagenomes

Canu requires the user to estimate the genome size, which is the total amount of unique sequence in the sample. For metagenomes, this estimate is the sum of the genome sizes of all species in the community. The estimate does not need to be exact, but it affects the read depth calculation and the assembly parameters.

The Canu parameters for error rate and read length should be set based on the sequencing platform. For Nanopore data, the error rate is higher than for HiFi data, and Canu will adjust its overlap detection accordingly. The `corOutCoverage` parameter controls the depth of coverage used for correction, and a value of 40 to 60 is typical for metagenomes.

### Computational Requirements for Canu

Canu is computationally intensive, and the correction step is the most expensive part. For a metagenome with 50 gigabases of sequence data, Canu can require hundreds of gigabytes of RAM and several days of runtime. The [nf-core documentation](https://nf-co.re/docs) describes community pipeline standards for reproducible workflows, and some nf-core pipelines include Canu as an assembly option with defined resource requirements.

For researchers without access to a large compute cluster, Canu may be impractical for complex metagenomes. In this case, metaFlye with pre-corrected reads is a more efficient approach.

## Polishing the Assembly

### Why Polishing Is Necessary

Polishing corrects errors in the assembled contigs by aligning reads to the assembly and generating a consensus. This step is necessary for Nanopore assemblies because the raw read errors propagate into the assembly. Polishing improves the base accuracy, which is important for downstream gene prediction and functional annotation.

For HiFi assemblies, polishing is less critical because the reads are already accurate. However, a light polishing step can still improve the assembly by correcting rare errors.

### Polishing with Racon and Medaka

Racon is a polishing tool that aligns reads to the assembly and generates a consensus. Racon can be run in multiple iterations, with each iteration using the polished assembly as the reference for the next round. Two to three iterations are typically sufficient for Nanopore assemblies.

Medaka is a polishing tool developed by Oxford Nanopore that uses a neural network model to predict the correct base at each position. Medaka is more accurate than Racon but requires a model that matches the basecaller version used for the sequencing data. The [NanoGalaxy toolkit](https://pubmed.ncbi.nlm.nih.gov/33068114) includes Medaka as part of its polishing workflows, making it accessible through the Galaxy interface.

### Polishing with Short Reads

Short reads can be used for polishing long-read assemblies. The short reads are aligned to the assembly, and the consensus is generated from the short-read alignments. This approach is effective because short reads have high accuracy, and the alignment of millions of short reads to the assembly provides deep coverage for error correction.

The [methods for recovery and analysis of long-read MAGs](https://pubmed.ncbi.nlm.nih.gov/37258866) describe complementary procedures for comparing gene quality obtained from short-read and long-read sequencing. The comparison shows that long-read assemblies with short-read polishing can produce gene predictions that are comparable to or better than short-read-only assemblies.

## Binning the Assembly into Metagenome-Assembled Genomes

### The Purpose of Binning

Binning groups the assembled contigs into bins that represent individual genomes. The bins are called metagenome-assembled genomes (MAGs) when they meet quality thresholds for completeness and contamination. Binning is necessary because the assembly produces a mixture of contigs from all species in the community, and the contigs must be separated by genome of origin.

Binning algorithms use sequence composition and coverage information. Sequence composition refers to the GC content and k-mer frequencies of the contigs, which tend to be similar within a genome. Coverage refers to the depth of sequencing across the contig, which reflects the abundance of the genome in the community.

### Binning Tools for Long-Read Assemblies

MetaBAT2 and MaxBin2 are widely used binning tools that work with both short and long-read assemblies. These tools use tetranucleotide frequency and coverage to cluster contigs into bins. SemiBin is a newer tool that uses deep learning to improve binning accuracy.

For long-read assemblies, the contigs are longer and fewer in number than short-read assemblies, which simplifies binning. However, the uneven coverage of metagenomes can still cause problems, and manual curation of bins is often necessary.

### Evaluating Bin Quality

Bin quality is evaluated using completeness and contamination estimates. Completeness is the fraction of the expected genome that is present in the bin, and contamination is the fraction of the bin that comes from other genomes. The estimates are based on the presence of single-copy marker genes that are expected to be present in all genomes.

A bin with more than 90 percent completeness and less than 5 percent contamination is considered a high-quality draft MAG. A bin with more than 95 percent completeness and less than 5 percent contamination is considered a nearly complete MAG. The [NCBI data resources](https://www.ncbi.nlm.nih.gov/) provide access to reference genomes that can be used to validate bin quality by comparing the bin to closely related genomes.

## Troubleshooting Common Assembly Problems

### Low-Complexity Communities with High Coverage

Low-complexity communities with a few dominant species can produce assembly graphs with high coverage and complex repeat structures. The high coverage can cause the assembler to use excessive memory and runtime. The solution is to downsample the reads to a target coverage, such as 50x per genome, before assembly.

Downsampling can be performed with tools such as Filtlong or rasusa, which randomly select reads to achieve a target coverage. The downsampled reads should still represent all species in the community, so the downsampling should be performed after estimating the genome sizes and abundances.

### High-Error Nanopore Reads

High-error Nanopore reads can cause assembly failure or fragmented assemblies. The first step is to verify the basecalling quality and to re-basecall if necessary. The second step is to perform read correction before assembly, either with Canu or with a mapping-based approach.

If the error rate remains high after correction, the assembly parameters may need adjustment. metaFlye has parameters for the expected error rate, and setting a higher error rate can improve the assembly of noisy reads. The [Galaxy Training Network](https://training.galaxyproject.org/) provides tutorials for Nanopore assembly that include parameter recommendations for different error rates.

### Strain Heterogeneity and Bubbles in the Assembly Graph

Strain heterogeneity creates bubbles in the assembly graph, where two or more paths represent the sequence differences between strains. The assembler may collapse the bubbles into a single consensus, which loses the strain information, or it may produce fragmented contigs at the bubble boundaries.

The decision to collapse or separate strains depends on the research question. If strain-level resolution is needed, tools such as [Floria](https://pubmed.ncbi.nlm.nih.gov/38940183) can be used to recover strain haplotypes from the reads. If consensus genomes are sufficient, the collapsed assembly is acceptable, and the strain variation can be analyzed by mapping reads to the consensus genome.

### Low Coverage for Rare Species

Rare species with low coverage may not assemble into complete genomes. The reads from rare species may be too few to form reliable overlaps, and the assembler may discard them. The solution is to increase sequencing depth, which increases the coverage of all species in the community.

For metagenomes with many rare species, the sequencing depth required to recover all genomes can be very high. A practical approach is to target a sequencing depth that recovers the abundant species and to accept that rare species will be represented by partial assemblies or by reads that can be analyzed without assembly.

## Records and Measurements for Reproducible Assembly

### Documenting the Assembly Process

Reproducible assembly requires documentation of the software versions, parameters, and input data. The software versions should be recorded for every tool used in the workflow, including the basecaller, the assembler, and the polishing tools. The parameters should be recorded for each step, and the input data should be described with the sequencing platform, the read length distribution, and the total bases.

The [Bioconductor project](https://bioconductor.org/) provides tools for reproducible genomic analysis, including version control and workflow management. The [nf-core documentation](https://nf-co.re/docs) describes standards for community pipelines that include version tracking and parameter logging.

### Measuring Assembly Quality

Assembly quality should be measured at multiple stages. The read quality metrics include read N50, total bases, and error rate. The assembly metrics include contig N50, number of contigs, total assembly size, and read mapping rate. The bin quality metrics include completeness, contamination, and the number of MAGs recovered.

These measurements should be recorded in a table or spreadsheet that accompanies the assembly. The measurements allow the researcher to compare different assembly strategies and to identify problems in the workflow.

### Archiving the Assembly and Raw Data

The raw sequencing data and the final assembly should be archived in a public repository. The [NCBI data resources](https://www.ncbi.nlm.nih.gov/) provide repositories for raw sequencing data and for assembled genomes. Depositing the data ensures that the assembly can be reproduced and that other researchers can access the data for comparative analyses.

The assembly should be deposited with metadata that describes the sequencing platform, the assembly tools and parameters, and the quality metrics. The metadata should follow the standards of the repository, which may require specific fields for the sequencing instrument and the library preparation method.

## Common Failure Patterns and How to Avoid Them

### Failure to Remove Adapters and Chimeric Reads

Adapter contamination and chimeric reads can produce incorrect assemblies. Adapters are sequencing artifacts that are ligated to the DNA fragments during library preparation, and they can appear at the ends of reads. Chimeric reads are reads that contain sequence from two different molecules, which can happen during library preparation or sequencing.

The solution is to perform adapter trimming and read filtering before assembly. The trimming should remove adapter sequences from the ends of reads, and the filtering should remove reads that are too short or that have low quality. The [EMBL-EBI training resources](https://www.ebi.ac.uk/training) provide guidance on quality control for sequencing data, including adapter trimming and read filtering.

### Overlapping or Redundant Contigs

Overlapping contigs can occur when the assembler produces multiple contigs that represent the same genomic region. This can happen when the assembly graph has multiple paths that are not resolved. The solution is to check the assembly graph and to use tools that merge overlapping contigs.

For metagenomes, overlapping contigs can also occur when closely related strains are assembled separately. The decision to merge or keep the contigs separate depends on the research question and the strain-level resolution required.

### Misassemblies at Repeat Boundaries

Misassemblies can occur at repeat boundaries, where the assembler incorrectly joins sequences from different genomic regions. This is a particular problem for metagenomes with many repeats, such as those containing mobile genetic elements or ribosomal RNA operons.

The solution is to check the assembly for misassemblies by mapping reads to the assembly and looking for reads that span the boundaries of contigs. Reads that map to two different contigs suggest a misassembly, and the contigs should be split at the misassembly point.

## Limitations of Long-Read Metagenome Assembly

### Computational Cost

Long-read metagenome assembly is computationally expensive. The correction and assembly steps require significant memory and runtime, and the polishing and binning steps add to the cost. Researchers without access to a compute cluster may find the workflow impractical for large metagenomes.

The [Galaxy Training Network](https://training.galaxyproject.org/) provides access to public Galaxy servers that can run assembly workflows without local compute resources. The [NanoGalaxy toolkit](https://pubmed.ncbi.nlm.nih.gov/33068114) is available on the European Galaxy server and includes tools for Nanopore assembly and analysis.

### Incomplete Recovery of Rare Species

Long-read assembly does not guarantee the recovery of all species in a community. Rare species with low coverage may not assemble into complete genomes, and the assembly may miss species that are present at very low abundance. The completeness of the assembly depends on the sequencing depth and the community complexity.

The [review of long-read metagenomics](https://pubmed.ncbi.nlm.nih.gov/38282030) notes that long-read sequencing offers substantial improvements over short-read sequencing for obtaining complete and contiguous genomic information. However, the recovery of rare species remains a challenge, and researchers should interpret the absence of a species in the assembly as a limitation of the method.

### Error Rates in Nanopore Assemblies

Nanopore assemblies have higher error rates than HiFi assemblies, even after polishing. The residual errors can affect gene prediction and functional annotation, particularly for genes with high sequence similarity to other genes. The error rate should be measured and reported with the assembly.

The [methods for recovery and analysis of long-read MAGs](https://pubmed.ncbi.nlm.nih.gov/37258866) describe procedures for comparing gene quality obtained from short-read and long-read sequencing. The comparison can identify genes that are incorrectly predicted in the long-read assembly and can guide the use of short-read polishing to improve accuracy.

## Safety and Regulatory Context for Metagenome Data

### Data Privacy and Ethical Considerations

Metagenome data can contain human sequences if the samples are from human-associated environments. The presence of human sequences raises privacy concerns, and researchers should screen the data for human contamination and remove human reads before depositing the data in public repositories.

The [NCBI data resources](https://www.ncbi.nlm.nih.gov/) provide guidance on data submission and on the handling of human sequence data. Researchers should follow the institutional and national regulations for the use of human sequence data in research.

### Compliance with Data Sharing Policies

Many funding agencies and journals require that sequencing data be deposited in public repositories. The deposition should occur at the time of publication, and the data should be accompanied by metadata that describes the sequencing and analysis methods.

The [EMBL-EBI training resources](https://www.ebi.ac.uk/training) provide guidance on data sharing and on the use of public data resources. Researchers should be aware of the data sharing policies of their funding agencies and journals before starting the sequencing project.

## Professional Escalation Criteria

### When to Seek Expert Assistance

The assembly workflow can fail for reasons that are not obvious from the error messages. If the assembly produces fragmented contigs, if the read mapping rate is low, or if the bin quality is poor, the researcher should seek assistance from a bioinformatics expert or from the community of users of the assembly tools.

The [Bioconductor support forum](https://bioconductor.org/) and the [Galaxy Training Network](https://training.galaxyproject.org/) provide community support for bioinformatics questions. The [nf-core documentation](https://nf-co.re/docs) describes how to report issues with community pipelines and how to contribute to pipeline development.

### When to Re-sequence or Re-basecall

If the assembly quality is poor and the troubleshooting steps do not resolve the problem, the researcher may need to re-sequence the sample or to re-basecall the raw data. Re-basecalling can improve the read accuracy if the basecaller version or the basecalling parameters were suboptimal. Re-sequencing may be necessary if the library preparation was problematic or if the sequencing depth was insufficient.

The decision to re-sequence should be based on the cost of sequencing and the importance of the assembly to the research project. The researcher should document the reasons for re-sequencing and should compare the new data to the original data to identify the source of the problem.

## Frequently Asked Questions

### What is the difference between HiFi and Nanopore reads for metagenome assembly?

HiFi reads have high per-base accuracy and lengths of several kilobases, which makes them well suited for assembly with minimal correction. Nanopore reads can be longer but have higher error rates, particularly insertion and deletion errors, which require correction before assembly. The choice between the platforms depends on the required assembly quality, the input DNA available, and the sequencing budget.

### Do I need to correct Nanopore reads before assembly?

Yes, correction is recommended for Nanopore reads before assembly. The raw error rate can confuse assemblers and produce fragmented or incorrect assemblies. Correction can be performed with Canu, which does self-correction, or with Racon, which uses a reference assembly for correction. The correction step improves the assembly quality and reduces the computational cost of assembly.

### How much sequencing depth do I need for a metagenome assembly?

The required sequencing depth depends on the community complexity and the abundance of the species of interest. A depth of 30x to 50x per genome is typical for the dominant species in a community. Rare species may require much higher depth to assemble into complete genomes. The depth should be estimated based on the expected genome sizes and abundances of the species in the community.

### What is the best assembler for long-read metagenomes?

metaFlye is the most widely used assembler for long-read metagenomes because it is designed to handle the uneven coverage and repeat complexity of metagenomes. Canu is a good choice for low-complexity communities and for Nanopore data with sufficient coverage for self-correction. The choice of assembler should be based on the data characteristics and the computational resources available.

### How do I know if my assembly is good?

Assembly quality is measured by the contig N50, the number of contigs, the read mapping rate, and the completeness and contamination of the MAGs. A good assembly has a high read mapping rate, a high contig N50, and MAGs with high completeness and low contamination. The quality metrics should be compared to the expected values for the community complexity and the sequencing depth.

### Can I use short reads to improve my long-read assembly?

Yes, short reads can be used for hybrid correction and polishing. Short reads can correct errors in the long reads before assembly, and they can polish the assembly after assembly. Hybrid approaches are particularly useful for Nanopore data with high error rates and for metagenomes with complex communities.

### How do I bin a long-read assembly into MAGs?

Binning groups the assembled contigs into bins that represent individual genomes. The binning tools use sequence composition and coverage information to cluster the contigs. MetaBAT2, MaxBin2, and SemiBin are widely used binning tools that work with long-read assemblies. The bins should be evaluated for completeness and contamination using single-copy marker genes.

### What should I do if my assembly fails?

If the assembly fails, the first step is to check the read quality and to perform read filtering and correction. The second step is to adjust the assembly parameters, such as the expected error rate and the minimum read length. The third step is to try a different assembler or to use a hybrid approach with short reads. If the assembly still fails, the researcher should seek assistance from the community or consider re-sequencing the sample.

## Related Bioinformatics Guides

- [Long-Read Metagenome Assembly: Overcoming Challenges with Nanopore and PacBio Data](/knowledge/bioinformatics/long-read-metagenome-assembly-overcoming-challenges-with-nanopore-and-pacbio-data)
- [De Novo Genome Assembly with Long Reads: A Practical Workflow](/knowledge/bioinformatics/de-novo-genome-assembly-with-long-reads-a-practical-workflow)
- [How to Choose a Long-Read Sequencing Platform: PacBio vs Oxford Nanopore](/knowledge/bioinformatics/how-to-choose-a-long-read-sequencing-platform-pacbio-vs-oxford-nanopore)
- [Long-Read Sequencing Technologies: PacBio and Oxford Nanopore](/knowledge/bioinformatics/long-read-sequencing-technologies-pacbio-and-oxford-nanopore)
- [Metagenomic Assembly and Binning: A Practical Workflow for Recovering Genomes from Complex Microbial Communities](/knowledge/bioinformatics/metagenomic-assembly-and-binning-a-practical-workflow-for-recovering-genomes-from-complex-microb)

## 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.
- [Recovery and Analysis of Long-Read Metagenome-Assembled Genomes.](https://pubmed.ncbi.nlm.nih.gov/37258866). Methods in molecular biology (Clifton, N.J.), 2023.
- [Unraveling metagenomics through long-read sequencing: a comprehensive review.](https://pubmed.ncbi.nlm.nih.gov/38282030). Journal of translational medicine, 2024.
- [NanoGalaxy: Nanopore long-read sequencing data analysis in Galaxy.](https://pubmed.ncbi.nlm.nih.gov/33068114). GigaScience, 2020.
- [VirION2: a short- and long-read sequencing and informatics workflow to study the genomic diversity of viruses in nature.](https://pubmed.ncbi.nlm.nih.gov/33850654). PeerJ, 2021.
- [Floria: fast and accurate strain haplotyping in metagenomes.](https://pubmed.ncbi.nlm.nih.gov/38940183). Bioinformatics (Oxford, England), 2024.

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