# How to Calculate and Interpret N50 and Other Contiguity Metrics for Long-Read Assemblies: A Step-by-Step Tutorial

## Direct Answer and Scope

N50 is the length of the shortest contig at the point where contigs sorted from longest to shortest cumulatively cover half of the total assembly length. L50 is the number of contigs required to reach that halfway point. These metrics describe assembly contiguity, which is the degree to which a genome is represented in long continuous pieces instead of many small fragments. For long-read assemblies produced by Oxford Nanopore or Pacific Biosciences platforms, N50 and related metrics such as NG50, L50, and N90 are standard quality indicators used to compare assembly versions, evaluate sequencing depth sufficiency, and decide whether additional sequencing or scaffolding is warranted.

This tutorial is written for biology students, researchers, laboratory professionals, and life-science practitioners who generate or evaluate long-read genome assemblies. You will learn the exact formulas, worked calculation steps, code implementations in Python and R, interpretation guidelines specific to long-read data, and common pitfalls that lead to misreported contiguity statistics. The practical outcome is the ability to compute these metrics correctly on your own assemblies, interpret them in the context of your sequencing strategy, and report them in a way that supports reproducible research.

## Why Contiguity Metrics Matter in Long-Read Assembly

### The Role of Long Reads in Genome Assembly

Long-read sequencing technologies produce reads that are substantially longer than the 150 to 300 base pairs typical of short-read platforms. Oxford Nanopore sequencing can generate reads exceeding 100 kilobases, and Pacific Biosciences continuous long reads provide multi-kilobase to megabase-scale fragments. These long reads span repetitive regions, structural variants, and other complex genomic features that short reads cannot resolve unambiguously.

The practical consequence is that long-read assemblies achieve higher contiguity than short-read assemblies for the same genome. A study sequencing the human GM12878 cell line with nanopore technology produced a de novo assembly with an NG50 of approximately 3 megabases using standard nanopore reads alone. When the researchers added 5-fold coverage of ultra-long reads with an N50 exceeding 100 kilobases, the assembly NG50 more than doubled to approximately 6.4 megabases ([Nanopore sequencing and assembly of a human genome with ultra-long reads](https://pubmed.ncbi.nlm.nih.gov/29431738)). This example illustrates a core principle: read length distribution directly influences assembly contiguity, and N50 metrics capture that relationship.

### What N50 Does and Does Not Measure

N50 measures contiguity only. It does not measure accuracy, completeness, base-level quality, or biological correctness. An assembly can have a high N50 and still contain misjoins, collapsed repeats, or missing genes. Conversely, an assembly with a modest N50 can be highly accurate for the regions it covers.

For long-read assemblies, N50 is most useful as a comparative metric. You can compare N50 values across assembly versions produced with different read sets, different assemblers, or different parameter settings. You can also compare your assembly N50 to published assemblies of similar genomes to gauge whether your contiguity is within an expected range. The ring-tailed lemur assembly mLemCat1, for example, achieved a contig N50 of 10.570 megabases and a scaffold N50 of 90.982 megabases using Pacific Biosciences continuous long reads combined with optical mapping, Hi-C, and 10X linked reads ([A high-quality, long-read genome assembly of the endangered ring-tailed lemur](https://pubmed.ncbi.nlm.nih.gov/35365833)). The Brassica napus Darmor-bzh assembly reached a contig N50 above 10 megabases using nanopore data with 93-fold coverage, including 6-fold coverage from reads longer than 100 kilobases ([Long-read assembly of the Brassica napus reference genome Darmor-bzh](https://pubmed.ncbi.nlm.nih.gov/33319912)). These published values provide reference points for what is achievable with current long-read technologies.

### The Diagnostic Gap Context

Long-read sequencing is increasingly used in clinical and diagnostic settings where assembly contiguity affects variant detection. A 2025 study in the American Journal of Human Genetics sequenced 98 samples from 41 families with suspected rare monogenic diseases using nanopore technology. The study achieved approximately 36-fold average coverage and a 32-kilobase read N50 from a single flow cell per sample. The long-read data covered coding exons in approximately 280 genes and about 5 known Mendelian disease-associated genes that short-read sequencing had not covered. Long reads detected additional structural variants and tandem repeats, phased 87 percent of protein-coding genes completely, and established diagnostic variants in 11 probands ([Advancing long-read nanopore genome assembly and accurate variant calling for rare disease detection](https://pubmed.ncbi.nlm.nih.gov/39862869)).

This clinical context matters for N50 interpretation because it shows that read N50, beyond assembly N50, is a reported quality metric in published studies. When you calculate N50 for your own data, you should be clear about whether you are reporting read N50 or assembly contig N50, because these are different quantities with different implications.

## Core Definitions and Formulas

### N50 Definition

N50 is defined as the length of the shortest contig among the set of longest contigs whose cumulative length reaches or exceeds 50 percent of the total assembly length. The calculation procedure is:

1. Sort all contigs by length in descending order.
2. Calculate the total assembly length as the sum of all contig lengths.
3. Determine the half-length, which is 50 percent of the total assembly length.
4. Accumulate contig lengths in descending order until the cumulative sum reaches or exceeds the half-length.
5. The N50 is the length of the last contig added to the cumulative sum.

### L50 Definition

L50 is the number of contigs required to reach the N50 point. In other words, L50 is the count of the longest contigs whose cumulative length reaches or exceeds 50 percent of the total assembly length. A smaller L50 indicates a more contiguous assembly because fewer contigs are needed to cover half the genome.

### NG50 and LG50

NG50 is the same calculation as N50, but the denominator is the estimated genome size instead of the total assembly length. This distinction matters when the assembly contains less sequence than the true genome, which can happen with incomplete sequencing coverage or when haplotypes are collapsed. NG50 is often reported alongside N50 in long-read assembly papers because it accounts for genome size expectations.

LG50 is the number of contigs required to reach the NG50 point, analogous to L50 but using the genome size denominator.

### N90 and Related Percentile Metrics

N90 follows the same logic as N50 but uses 90 percent of the total assembly length as the threshold. N90 is always smaller than or equal to N50 for the same assembly because reaching 90 percent of the assembly requires including shorter contigs. N90 is useful for assessing whether an assembly has a long tail of small contigs that might indicate incomplete resolution of repetitive or difficult regions.

### Read N50 versus Assembly N50

Read N50 is calculated on the raw or filtered read set before assembly. It describes the length distribution of the sequencing data itself. Assembly N50 is calculated on the contigs produced by the assembler. Both metrics are informative, but they answer different questions. Read N50 tells you whether your sequencing run produced sufficiently long reads for the assembly strategy you plan to use. Assembly N50 tells you how contiguous the final product is.

The distinction is critical in published literature. The nanopore rare disease study reported a read N50 of 32 kilobases ([Advancing long-read nanopore genome assembly and accurate variant calling for rare disease detection](https://pubmed.ncbi.nlm.nih.gov/39862869)), while the human genome study reported both read N50 values exceeding 100 kilobases for ultra-long reads and assembly NG50 values of 3 and 6.4 megabases ([Nanopore sequencing and assembly of a human genome with ultra-long reads](https://pubmed.ncbi.nlm.nih.gov/29431738)). When you report your own metrics, specify which N50 you are reporting to avoid ambiguity.

## At a Glance: Contiguity Metrics Decision Table

| Metric | Definition | Denominator | Interpretation | Typical Use in Long-Read Assembly |
|--------|------------|-------------|----------------|-----------------------------------|
| N50 | Length of the shortest contig at the 50 percent cumulative length threshold | Total assembly length | Higher values indicate more contiguous assemblies | Standard assembly quality reporting |
| L50 | Number of contigs needed to reach the N50 threshold | None, count only | Lower values indicate fewer large contigs dominate the assembly | Comparing assembly versions and assembler outputs |
| NG50 | Same calculation as N50 but using estimated genome size | Estimated genome size | Accounts for incomplete assemblies that miss genomic sequence | Comparing assemblies to reference genome expectations |
| N90 | Length of the shortest contig at the 90 percent cumulative length threshold | Total assembly length | Reflects the tail of smaller contigs in the assembly | Assessing whether difficult regions remain fragmented |

## Step-by-Step Calculation Workflow

### Step 1: Prepare Your Contig File

The input for N50 calculation is a set of contig sequences in FASTA format. You can obtain this file directly from your assembler output. Most long-read assemblers, including Flye, Canu, Raven, and Shasta, produce a final assembly FASTA file. If you are working with a scaffolded assembly, you may have both contig-level and scaffold-level FASTA files, and you should calculate metrics separately for each level.

Before calculating metrics, verify that your FASTA file contains only the sequences you intend to include. Remove any contigs that represent contamination, mitochondrial genomes, or other non-target sequences if your analysis requires nuclear genome metrics only. Document any filtering decisions in your methods.

### Step 2: Calculate Total Assembly Length

The total assembly length is the sum of all contig lengths in your FASTA file. You can calculate this with a simple script or with command-line tools. The following Python code reads a FASTA file and calculates contig lengths:

```python
def read_fasta_lengths(fasta_path):
    lengths = []
    current_length = 0
    with open(fasta_path, 'r') as f:
        for line in f:
            line = line.strip()
            if line.startswith('>'):
                if current_length > 0:
                    lengths.append(current_length)
                current_length = 0
            else:
                current_length += len(line)
        if current_length > 0:
            lengths.append(current_length)
    return lengths

lengths = read_fasta_lengths('assembly.fasta')
total_length = sum(lengths)
print(f'Total assembly length: {total_length} bp')
print(f'Number of contigs: {len(lengths)}')
```

### Step 3: Sort Contigs by Length in Descending Order

Sort the contig lengths from longest to shortest. This ordering is essential because N50 accumulates contigs starting from the longest.

```python
sorted_lengths = sorted(lengths, reverse=True)
```

### Step 4: Calculate the Half-Length Threshold

For N50, the threshold is half of the total assembly length:

```python
half_length = total_length / 2
```

For NG50, the threshold is half of the estimated genome size:

```python
estimated_genome_size = 500_000_000  # Replace with your genome size estimate
ng50_threshold = estimated_genome_size / 2
```

### Step 5: Accumulate Contig Lengths and Identify N50

Iterate through the sorted contig lengths, accumulating the sum until it reaches or exceeds the threshold. The length of the contig that crosses the threshold is the N50.

```python
def calculate_n50(sorted_lengths, threshold):
    cumulative = 0
    for index, length in enumerate(sorted_lengths):
        cumulative += length
        if cumulative >= threshold:
            n50 = length
            l50 = index + 1
            return n50, l50
    return None, None

n50, l50 = calculate_n50(sorted_lengths, half_length)
print(f'N50: {n50} bp')
print(f'L50: {l50} contigs')
```

### Step 6: Calculate NG50 and N90

For NG50, use the genome size threshold instead of the assembly half-length. For N90, use 90 percent of the total assembly length as the threshold:

```python
n90_threshold = total_length * 0.9
n90, l90 = calculate_n50(sorted_lengths, n90_threshold)
print(f'N90: {n90} bp')
print(f'L90: {l90} contigs')
```

### Step 7: Verify Your Results

After calculating metrics, verify your results with a simple check. The cumulative sum at the N50 point should be at least half the total assembly length, and the cumulative sum just before the N50 contig should be less than half. This verification catches off-by-one errors and incorrect sorting.

## Code Implementations for Common Platforms

### Python Implementation with Biopython

If you use Biopython for sequence handling, you can calculate contig lengths directly from SeqRecord objects. Biopython is a widely used library for biological sequence analysis, and its documentation is available through the [Bioconductor Project](https://bioconductor.org/) for related R workflows. The following implementation uses Biopython to parse the FASTA file:

```python
from Bio import SeqIO

def calculate_contiguity_metrics(fasta_path, genome_size=None):
    lengths = [len(record.seq) for record in SeqIO.parse(fasta_path, 'fasta')]
    sorted_lengths = sorted(lengths, reverse=True)
    total_length = sum(sorted_lengths)

    metrics = {}
    metrics['total_length'] = total_length
    metrics['num_contigs'] = len(sorted_lengths)

    # N50 and L50
    half_length = total_length / 2
    cumulative = 0
    for index, length in enumerate(sorted_lengths):
        cumulative += length
        if cumulative >= half_length:
            metrics['N50'] = length
            metrics['L50'] = index + 1
            break

    # N90 and L90
    n90_threshold = total_length * 0.9
    cumulative = 0
    for index, length in enumerate(sorted_lengths):
        cumulative += length
        if cumulative >= n90_threshold:
            metrics['N90'] = length
            metrics['L90'] = index + 1
            break

    # NG50 if genome size provided
    if genome_size:
        ng50_threshold = genome_size / 2
        cumulative = 0
        for index, length in enumerate(sorted_lengths):
            cumulative += length
            if cumulative >= ng50_threshold:
                metrics['NG50'] = length
                metrics['LG50'] = index + 1
                break

    return metrics

metrics = calculate_contiguity_metrics('assembly.fasta', genome_size=500_000_000)
print(metrics)
```

### R Implementation

R users can calculate N50 with base R functions. The following code assumes you have a vector of contig lengths:

```r
calculate_n50 <- function(lengths, threshold_fraction = 0.5) {
  sorted_lengths <- sort(lengths, decreasing = TRUE)
  total_length <- sum(sorted_lengths)
  threshold <- total_length * threshold_fraction

  cumulative <- 0
  for (i in seq_along(sorted_lengths)) {
    cumulative <- cumulative + sorted_lengths[i]
    if (cumulative >= threshold) {
      return(list(
        metric_value = sorted_lengths[i],
        metric_count = i,
        cumulative = cumulative,
        total_length = total_length
      ))
    }
  }
  return(NULL)
}

lengths <- c(100000, 80000, 60000, 40000, 20000, 10000)
result <- calculate_n50(lengths)
print(paste("N50:", result$metric_value))
print(paste("L50:", result$metric_count))
```

### Command-Line Tools

Several command-line tools calculate assembly statistics directly from FASTA files. These tools are useful for quick assessments and for incorporation into automated pipelines. The [nf-core Documentation](https://nf-co.re/docs) provides standardized pipeline documentation that emphasizes reproducible workflow practices, and incorporating contiguity metric calculation into your pipeline is consistent with those standards.

Common command-line options include:

- `seqkit stats` from the SeqKit toolkit, which reports N50 and other statistics for FASTA and FASTQ files
- `assembly-stats`, a dedicated tool for assembly statistics
- `QUAST`, which provides comprehensive assembly evaluation including N50, NG50, and comparisons to reference genomes

When using command-line tools, verify that the tool calculates N50 using the same definition you intend to report. Some tools may use different sorting conventions or may include or exclude certain sequences.

## Interpreting N50 in the Context of Long-Read Assemblies

### What Constitutes a Good N50

There is no universal N50 threshold that defines a good assembly. The appropriate N50 depends on the genome size, complexity, sequencing depth, and intended use of the assembly. A 10-megabase N50 for a bacterial genome is poor, while the same N50 for a plant genome with substantial repetitive content may be excellent.

Published long-read assemblies provide useful reference points. The Brassica napus assembly achieved a contig N50 above 10 megabases using nanopore data with 93-fold coverage and a substantial fraction of ultra-long reads ([Long-read assembly of the Brassica napus reference genome Darmor-bzh](https://pubmed.ncbi.nlm.nih.gov/33319912)). The ring-tailed lemur assembly reached a contig N50 of 10.570 megabases using a combination of Pacific Biosciences continuous long reads, optical mapping, Hi-C, and 10X linked reads ([A high-quality, long-read genome assembly of the endangered ring-tailed lemur](https://pubmed.ncbi.nlm.nih.gov/35365833)). The maize B73-Ab10 assembly achieved a contig N50 of 162 megabases with 63 total contigs, including gapless assemblies of chromosome 3 at 236 megabases and chromosome 9 at 162 megabases ([Gapless assembly of maize chromosomes using long-read technologies](https://pubmed.ncbi.nlm.nih.gov/32434565)).

These examples show that N50 values vary widely across species and sequencing strategies. When interpreting your own N50, compare it to assemblies of similar genomes produced with similar technologies instead of to an absolute threshold.

### The Relationship Between Sequencing Depth and N50

Sequencing depth directly affects assembly contiguity. Higher depth provides more overlapping reads, which allows assemblers to resolve repeats and extend contigs. However, the relationship is not linear. Beyond a certain depth, additional sequencing yields diminishing returns for contiguity.

The human genome study demonstrated this principle. Standard nanopore reads at approximately 30-fold coverage produced an NG50 of about 3 megabases. Adding 5-fold coverage of ultra-long reads more than doubled the NG50 to approximately 6.4 megabases ([Nanopore sequencing and assembly of a human genome with ultra-long reads](https://pubmed.ncbi.nlm.nih.gov/29431738)). The ultra-long reads were more valuable per base than additional standard-length reads because they spanned repetitive regions that shorter reads could not bridge.

For your own assemblies, track N50 as a function of sequencing depth. If you are planning a sequencing project, consider generating a small test dataset, assembling it, and calculating N50 before committing to full-scale sequencing. This pilot approach can help you estimate the depth needed to achieve your target contiguity.

### Read Length Distribution and N50

The read length distribution of your sequencing data is a primary determinant of assembly N50. Ultra-long reads, defined as reads exceeding 100 kilobases, are particularly valuable for resolving repetitive regions and producing chromosome-scale contiguity. The human genome study showed that incorporating ultra-long reads with an N50 above 100 kilobases substantially improved assembly contiguity ([Nanopore sequencing and assembly of a human genome with ultra-long reads](https://pubmed.ncbi.nlm.nih.gov/29431738)).

When planning a nanopore sequencing run, consider whether your protocol is optimized for ultra-long reads. DNA extraction methods that preserve high-molecular-weight DNA, library preparation protocols that minimize shearing, and sequencing runs that allow sufficient time for long molecules to be sequenced all contribute to longer read N50 values. The Brassica napus study generated 6-fold coverage with reads longer than 100 kilobases using the PromethION device, which was critical for achieving the reported contiguity ([Long-read assembly of the Brassica napus reference genome Darmor-bzh](https://pubmed.ncbi.nlm.nih.gov/33319912)).

### Genome Complexity and N50 Expectations

Genome complexity affects the N50 values you can realistically achieve. Genomes with high repeat content, such as plant genomes with large transposable element fractions, are more difficult to assemble contiguously than genomes with low repeat content. The maize genome, for example, contains complex centromeric regions and heterochromatic knobs composed of tandem repeat arrays. The B73-Ab10 assembly revealed that these repeat arrays are discontinuous and interspersed with retroelements, which explains why they are difficult to assemble ([Gapless assembly of maize chromosomes using long-read technologies](https://pubmed.ncbi.nlm.nih.gov/32434565)).

When interpreting your N50, consider the repeat content of your target genome. A lower N50 for a repeat-rich genome may represent a better assembly than a higher N50 for a repeat-poor genome. Published assemblies of similar genomes provide the most relevant comparison.

## Practical Workflow for Assessing Assembly Quality

### Step 1: Calculate Read N50 Before Assembly

Before assembling, calculate the N50 of your filtered read set. This metric tells you whether your sequencing run produced reads long enough for your assembly goals. If your read N50 is below your target, consider whether additional sequencing with optimized protocols would improve your results.

### Step 2: Assemble with Multiple Parameter Sets

Long-read assemblers have parameters that affect contiguity, including minimum read length thresholds, overlap settings, and repeat resolution strategies. Assemble with multiple parameter sets and compare the resulting N50 values. This approach helps you identify parameter choices that maximize contiguity without sacrificing accuracy.

### Step 3: Calculate Assembly N50 and Related Metrics

After assembly, calculate N50, L50, NG50, and N90 using the methods described in this tutorial. Record all metrics in your laboratory notebook or analysis log. Include the total assembly length, number of contigs, and the specific thresholds used.

### Step 4: Compare to Reference Genomes or Published Assemblies

If a reference genome exists for your species or a closely related species, compare your assembly N50 to the reference contiguity. If no reference exists, compare to published assemblies of similar genomes. The ring-tailed lemur assembly, for example, was compared to other primate assemblies to contextualize its contiguity and repeat content ([A high-quality, long-read genome assembly of the endangered ring-tailed lemur](https://pubmed.ncbi.nlm.nih.gov/35365833)).

### Step 5: Assess Completeness Independently of N50

N50 does not measure completeness. Use complementary tools to assess whether your assembly contains expected genes or conserved sequences. BUSCO analysis, which evaluates the presence of conserved single-copy orthologs, is a standard complement to N50 reporting. A high N50 with poor BUSCO scores indicates that the assembly is contiguous but missing substantial genomic content.

### Step 6: Document Your Metrics for Reproducibility

Record the exact commands, software versions, and parameters used to generate your assembly and calculate metrics. This documentation supports reproducibility and allows others to interpret your N50 values in context. The [Galaxy Training Network](https://training.galaxyproject.org/) provides accessible workflow training that emphasizes reproducible analysis practices, and the [nf-core Documentation](https://nf-co.re/docs) describes community standards for pipeline reproducibility.

## Common Failure Patterns in N50 Calculation and Interpretation

### Failure Pattern 1: Confusing Read N50 with Assembly N50

Reporting read N50 as assembly N50, or vice versa, is a common error. These metrics describe different quantities and cannot be used interchangeably. Read N50 describes the sequencing data, while assembly N50 describes the assembled contigs. Always specify which metric you are reporting.

### Failure Pattern 2: Using the Wrong Denominator for NG50

NG50 requires the estimated genome size as the denominator. If you use the total assembly length instead, you are calculating N50, not NG50. This distinction matters when the assembly is incomplete. An assembly that contains only 80 percent of the genome will have an N50 based on the assembled sequence, while NG50 accounts for the missing 20 percent.

### Failure Pattern 3: Including Contaminant or Organelle Sequences

Contaminant sequences and organellar genomes can inflate or deflate N50 depending on their lengths. Mitochondrial genomes are typically small and will not substantially affect N50, but contaminating sequences from other organisms can introduce spurious large contigs. Filter your assembly to remove known contaminants before calculating metrics.

### Failure Pattern 4: Sorting Errors

N50 requires sorting contigs from longest to shortest. If you sort in ascending order or fail to sort entirely, your N50 calculation will be incorrect. Verify your sorting step with a small test dataset before applying the calculation to your full assembly.

### Failure Pattern 5: Off-by-One Errors in L50

L50 is the number of contigs required to reach the N50 threshold. If your loop increments the counter before checking the threshold, you may report L50 as one more or one less than the correct value. Verify your L50 calculation with a small example where you can manually confirm the result.

### Failure Pattern 6: Interpreting N50 as a Quality Score

N50 is a contiguity metric, not a quality metric. A high N50 does not guarantee accurate assembly. Misjoins, collapsed repeats, and base errors can all occur in assemblies with high N50 values. Always assess accuracy independently using read mapping, BUSCO analysis, or comparison to a reference genome.

### Failure Pattern 7: Comparing N50 Across Different Assembly Levels

Contig N50 and scaffold N50 are different metrics. Scaffolding joins contigs using long-range information such as Hi-C or optical mapping, which increases N50 but does not necessarily improve the underlying contig sequences. The ring-tailed lemur assembly illustrates this distinction with a contig N50 of 10.570 megabases and a scaffold N50 of 90.982 megabases ([A high-quality, long-read genome assembly of the endangered ring-tailed lemur](https://pubmed.ncbi.nlm.nih.gov/35365833)). When comparing assemblies, ensure you are comparing the same assembly level.

## Limitations of N50 and Complementary Metrics

### N50 Does Not Measure Base Accuracy

Long-read assemblies have characteristic error profiles that differ from short-read assemblies. Nanopore sequencing historically had higher base error rates than short-read platforms, although recent chemistry and basecalling improvements have reduced these errors. The human genome study reported assembly accuracy exceeding 99.8 percent after incorporating complementary short-read data ([Nanopore sequencing and assembly of a human genome with ultra-long reads](https://pubmed.ncbi.nlm.nih.gov/29431738)), which highlights that polishing with additional data is often necessary for high accuracy.

When reporting assembly quality, include base accuracy metrics alongside N50. Read mapping rates, consensus quality scores, and comparison to reference genomes provide accuracy information that N50 cannot convey.

### N50 Does Not Measure Haplotype Resolution

Diploid genomes contain two haplotypes that may differ substantially. Some assemblers collapse haplotypes into a single consensus sequence, while others attempt to phase haplotypes into separate contigs. N50 does not distinguish between these scenarios. A collapsed assembly may have a higher N50 than a phased assembly, but the phased assembly may be more biologically informative.

The nanopore rare disease study achieved complete phasing of 87 percent of protein-coding genes ([Advancing long-read nanopore genome assembly and accurate variant calling for rare disease detection](https://pubmed.ncbi.nlm.nih.gov/39862869)), which was important for distinguishing compound heterozygous variants and de novo mutations. If haplotype resolution is important for your research question, assess phasing separately from contiguity.

### N50 Does Not Measure Completeness

An assembly can have a high N50 while missing substantial portions of the genome. This situation can occur when repetitive regions are collapsed or when sequencing coverage is insufficient for some genomic regions. The human genome study's final assembly covered 85.8 percent of the reference genome ([Nanopore sequencing and assembly of a human genome with ultra-long reads](https://pubmed.ncbi.nlm.nih.gov/29431738)), which means approximately 14 percent of the reference was not represented in the assembly despite the high NG50 values.

Use BUSCO or similar completeness assessments alongside N50 to obtain a fuller picture of assembly quality.

### N50 Does Not Measure Structural Correctness

Contigs can be misassembled, meaning that sequences from different genomic locations are incorrectly joined. Misassemblies can inflate N50 by creating artificially long contigs. Detecting misassemblies requires comparing the assembly to a reference genome or using linkage information from Hi-C or optical mapping.

The maize B73-Ab10 assembly used two independent assemblies and an optical map-based merging pipeline to produce the final contig set ([Gapless assembly of maize chromosomes using long-read technologies](https://pubmed.ncbi.nlm.nih.gov/32434565)). This approach provided confidence that the reported contiguity reflected genuine genomic structure instead of assembly artifacts.

## Records and Measurements for Assembly Quality Tracking

### What to Record

Maintain a structured record for each assembly you generate. Include the following fields:

- Sample identifier and species
- Sequencing platform and chemistry version
- Basecalling software and version
- Read filtering parameters
- Read N50 and read length distribution
- Sequencing depth
- Assembler name and version
- Assembler parameters
- Assembly total length
- Number of contigs
- Contig N50 and L50
- Scaffold N50 and L50 if scaffolding was performed
- NG50 and LG50 with the genome size estimate used
- N90 and L90
- BUSCO completeness scores
- Date of assembly and analysis

### How to Track Changes Across Assembly Versions

When you generate multiple assembly versions, create a comparison table that tracks N50, L50, NG50, and completeness metrics across versions. This table helps you identify which parameter changes or additional data improved contiguity and which had no effect or made things worse.

### When to Escalate to Professional Support

If your assembly N50 is substantially lower than expected for your genome and sequencing strategy, consider whether you need professional support. Indicators that escalation may be warranted include:

- Assembly N50 is orders of magnitude lower than published assemblies of similar genomes
- BUSCO completeness is below 90 percent despite adequate sequencing depth
- Read N50 is much lower than expected for your sequencing platform and protocol
- Assembler errors or crashes prevent completion of the assembly
- You are unsure whether your assembly contains misassemblies that inflate N50

Professional support options include bioinformatics core facilities, commercial assembly services, and community forums associated with the assembler or sequencing platform you are using. The [EMBL-EBI Training](https://www.ebi.ac.uk/training) program provides learning pathways for bioinformatics analysis that can help you build the skills to troubleshoot assembly issues independently.

## Safety and Reproducibility Context

### Data Management for Reproducible Assembly

Reproducible assembly requires careful data management. Store raw sequencing data, filtered reads, assembly outputs, and analysis scripts in organized directories with clear naming conventions. Version control your analysis scripts using Git, which is covered in [The Carpentries Lessons](https://carpentries.org/lessons) on version control and automation.

### Computational Resource Considerations

Long-read assembly is computationally intensive. Large genomes may require substantial memory and processing time. The Brassica napus assembly used 6 flowcells on the PromethION device and generated approximately 16 million long reads representing 93-fold coverage ([Long-read assembly of the Brassica napus reference genome Darmor-bzh](https://pubmed.ncbi.nlm.nih.gov/33319912)). Assembling this data requires a high-performance computing environment or a well-configured workstation.

Before starting a large assembly, estimate the computational resources required based on genome size and sequencing depth. Check your computing environment for available memory, disk space, and processing time. The [nf-core Documentation](https://nf-co.re/docs) provides guidance on configuring pipelines for different computing environments.

### Documentation Standards

Document your assembly workflow in sufficient detail that another researcher could reproduce your results. Include software versions, parameter values, and the exact commands used. The [Galaxy Training Network](https://training.galaxyproject.org/) emphasizes reproducible analysis through documented workflows, and following similar practices for your command-line analysis will improve the reliability of your results.

## Decision Framework for Acting on N50 Results

### When to Continue Sequencing Versus Accept the Assembly

Calculating N50 and related metrics produces numbers, but the practical question is what those numbers mean for your next decision. A structured decision framework helps you determine whether to accept your assembly, add more sequencing, change assembly parameters, or escalate to a different approach. The framework below uses your calculated metrics as inputs and guides you through a series of evidence-based checks.

### Step 1: Compare Assembly N50 to Read N50 Expectations

Start by comparing your assembly N50 to your read N50. Assembly N50 cannot exceed read N50 in most cases because contigs are built from reads. If your assembly N50 approaches your read N50, your assembly is likely limited by read length instead of by assembler performance or sequencing depth. The human GM12878 study illustrates this relationship clearly. Standard nanopore reads produced an assembly NG50 of approximately 3 megabases, and adding ultra-long reads with an N50 above 100 kilobases more than doubled the assembly NG50 to approximately 6.4 megabases ([Nanopore sequencing and assembly of a human genome with ultra-long reads](https://pubmed.ncbi.nlm.nih.gov/29431738)). If your assembly N50 is close to your read N50, additional sequencing with the same read length distribution will produce minimal contiguity improvement. Your next step should be protocol optimization to generate longer reads instead of simply adding more sequencing depth.

### Step 2: Assess the Gap Between N50 and NG50

Calculate both N50 and NG50 using the same assembly. The gap between these two values reveals whether your assembly is missing expected genomic sequence. If NG50 is substantially lower than N50, your assembly contains less sequence than the estimated genome size. This situation indicates incomplete coverage or collapsed haplotypes. The human genome study reported a final assembly covering 85.8 percent of the reference genome ([Nanopore sequencing and assembly of a human genome with ultra-long reads](https://pubmed.ncbi.nlm.nih.gov/29431738)), which means the NG50 calculation based on the full genome size would be lower than the N50 calculation based on assembled sequence alone. A large N50 to NG50 gap suggests you need more sequencing depth or a different assembly strategy instead of accepting the current assembly.

### Step 3: Evaluate N90 for the Small Contig Tail

N90 tells you about the tail of small contigs in your assembly. A large difference between N50 and N90 indicates that many small contigs remain unresolved. These small contigs often represent repetitive regions, high-complexity sequences, or regions with insufficient coverage. The maize B73-Ab10 assembly achieved a contig N50 of 162 megabases with only 63 total contigs ([Gapless assembly of maize chromosomes using long-read technologies](https://pubmed.ncbi.nlm.nih.gov/32434565)), which means the N90 value would be close to the N50 value because the assembly has very few small contigs. If your N90 is orders of magnitude lower than your N50, examine the small contigs to determine whether they represent genuine genomic regions or assembly artifacts.

### Step 4: Apply the Sequencing Depth Check

Sequencing depth directly influences assembly contiguity, but the relationship is not linear. The Brassica napus Darmor-bzh assembly used 93-fold coverage with 6-fold coverage from reads longer than 100 kilobases to achieve a contig N50 above 10 megabases ([Long-read assembly of the Brassica napus reference genome Darmor-bzh](https://pubmed.ncbi.nlm.nih.gov/33319912)). If your sequencing depth is below 30-fold for a large genome, additional depth may improve contiguity. If your depth exceeds 60-fold and your N50 remains low, the limiting factor is more likely read length or genome complexity than depth alone.

### Step 5: Compare to Published Assemblies of Similar Genomes

Published long-read assemblies provide empirical reference points for expected N50 values. The ring-tailed lemur assembly achieved a contig N50 of 10.570 megabases and a scaffold N50 of 90.982 megabases using Pacific Biosciences continuous long reads combined with optical mapping, Hi-C, and 10X linked reads ([A high-quality, long-read genome assembly of the endangered ring-tailed lemur](https://pubmed.ncbi.nlm.nih.gov/35365833)). The Brassica napus assembly reached a contig N50 above 10 megabases with nanopore data ([Long-read assembly of the Brassica napus reference genome Darmor-bzh](https://pubmed.ncbi.nlm.nih.gov/33319912)). If your assembly N50 is more than an order of magnitude below published values for genomes of similar size and complexity, investigate whether your sequencing protocol, assembler parameters, or data quality differ substantially from the published studies.

### Step 6: Make the Decision

Apply the following decision rules based on your metric values:

- Accept the assembly if N50 meets your project requirements, NG50 is close to N50, N90 is within an acceptable range, and BUSCO completeness exceeds 90 percent.
- Add more sequencing if NG50 is substantially lower than N50, indicating missing sequence, or if your sequencing depth is below 30-fold for a large genome.
- Optimize read length if assembly N50 is close to read N50, indicating that longer reads would improve contiguity more than additional depth.
- Change assembler parameters if your assembly N50 is far below read N50, suggesting the assembler is not fully utilizing the read length information.
- Escalate to a different assembly strategy if multiple assembler parameter sets produce similar low N50 values and your read N50 is adequate.

### Record System for Assembly Decisions

Maintain a decision log for each assembly project. Record the following fields for every assembly version you generate:

- Assembly version identifier
- Date of assembly
- Read N50 and read length distribution
- Sequencing depth
- Assembler name, version, and parameters
- Assembly N50, L50, NG50, and N90
- BUSCO completeness score
- Decision made (accept, add sequencing, optimize reads, change parameters, escalate)
- Rationale for the decision based on the framework steps above

This record system allows you to track how changes in sequencing strategy and assembly parameters affect contiguity metrics across versions. The [Galaxy Training Network](https://training.galaxyproject.org/) provides accessible workflow training that emphasizes reproducible analysis practices, and maintaining a structured decision log aligns with those standards.

### Troubleshooting Method for Unexpected N50 Values

When your N50 values do not match expectations, work through this troubleshooting sequence:

First, verify your calculation. Recalculate N50 using a different tool or method to rule out calculation errors. The [Bioconductor Project](https://bioconductor.org/) provides R packages for genomic analysis that can cross-check your results.

Second, examine your input data. Check whether your FASTA file contains contaminants, organelle sequences, or duplicate contigs that could distort your metrics. Filter the assembly and recalculate.

Third, review your read N50. If your read N50 is lower than expected for your sequencing platform, your DNA extraction or library preparation may have sheared the DNA. The Brassica napus study generated 6-fold coverage with reads longer than 100 kilobases ([Long-read assembly of the Brassica napus reference genome Darmor-bzh](https://pubmed.ncbi.nlm.nih.gov/33319912)), which required careful high-molecular-weight DNA handling.

Fourth, test different assembler parameters. Assemble a subset of your data with multiple parameter sets and compare N50 values. This approach identifies whether parameter choices are limiting contiguity.

Fifth, assess genome complexity. If your genome has high repeat content, lower N50 values may be expected. The maize genome contains complex centromeric regions and heterochromatic knobs with discontinuous tandem repeat arrays interspersed with retroelements ([Gapless assembly of maize chromosomes using long-read technologies](https://pubmed.ncbi.nlm.nih.gov/32434565)), which explains why gapless assembly required substantial effort.

### Professional Escalation Criteria

Escalate to professional support when you cannot resolve assembly issues through the troubleshooting steps above. Specific escalation indicators include:

- Assembly N50 remains below 1 megabase for a genome smaller than 1 gigabase despite adequate sequencing depth and read length
- BUSCO completeness remains below 90 percent after multiple assembly attempts
- Assembler crashes or memory errors prevent assembly completion
- You suspect misassemblies that inflate N50 but cannot verify them with available tools
- Your project has clinical or diagnostic implications where assembly quality directly affects variant detection

The [EMBL-EBI Training](https://www.ebi.ac.uk/training) program provides learning pathways for bioinformatics analysis that can help you build troubleshooting skills. The [nf-core Documentation](https://nf-co.re/docs) describes community pipeline standards that may offer alternative assembly approaches. For clinical applications, the nanopore rare disease study demonstrated that long-read assembly quality directly affects diagnostic yield, with long reads detecting additional variants in genes not covered by short-read sequencing ([Advancing long-read nanopore genome assembly and accurate variant calling for rare disease detection](https://pubmed.ncbi.nlm.nih.gov/39862869)). When assembly quality affects patient outcomes, professional escalation is appropriate when you cannot achieve the contiguity needed for reliable variant detection.

## Frequently Asked Questions

### What is the difference between N50 and NG50?

N50 uses the total assembly length as the denominator, while NG50 uses the estimated genome size. If your assembly contains all of the expected genomic sequence, N50 and NG50 will be similar. If your assembly is incomplete, NG50 will be lower than N50 because the threshold is based on the larger genome size estimate. NG50 is the more appropriate metric when you have a reliable genome size estimate and want to account for missing sequence.

### How do I estimate genome size for NG50 calculation?

Genome size can be estimated using flow cytometry, k-mer analysis of sequencing data, or published values for your species or closely related species. K-mer-based methods estimate genome size from the distribution of k-mers in your sequencing data. Choose an estimate that is appropriate for your species and document the source of your estimate in your methods.

### Why is my assembly N50 lower than published values for similar genomes?

Several factors can explain a lower N50. Your sequencing depth may be insufficient, your read length distribution may be shorter than optimal, your assembler parameters may not be optimized for your data, or your genome may have more complex repeat content than the published example. Compare your read N50 and sequencing depth to the published study to identify which factor is limiting your contiguity.

### Can I calculate N50 on a scaffolded assembly?

Yes, you can calculate N50 on scaffolds, but you should report whether your N50 is for contigs or scaffolds. Scaffolding with Hi-C or optical mapping can substantially increase N50 by joining contigs into chromosome-scale scaffolds. The ring-tailed lemur assembly illustrates this with a contig N50 of 10.570 megabases and a scaffold N50 of 90.982 megabases ([A high-quality, long-read genome assembly of the endangered ring-tailed lemur](https://pubmed.ncbi.nlm.nih.gov/35365833)). Always specify the assembly level when reporting N50.

### Does a higher N50 always mean a better assembly?

No. N50 measures contiguity only. An assembly with a higher N50 may contain misjoins, collapsed repeats, or missing sequence. Always assess accuracy and completeness alongside contiguity. BUSCO scores, read mapping rates, and comparison to reference genomes provide complementary information that N50 cannot provide.

### What is the relationship between read N50 and assembly N50?

Read N50 describes the length distribution of your sequencing reads, while assembly N50 describes the contiguity of your assembled contigs. Longer reads generally enable more contiguous assemblies because they can span repetitive regions that shorter reads cannot bridge. The human genome study showed that adding ultra-long reads with an N50 above 100 kilobases more than doubled the assembly NG50 ([Nanopore sequencing and assembly of a human genome with ultra-long reads](https://pubmed.ncbi.nlm.nih.gov/29431738)). However, read N50 is not the only factor that determines assembly N50. Sequencing depth, genome complexity, and assembler performance also matter.

### How many contigs should I report with N50?

Report the number of contigs in your assembly alongside N50. The contig count provides context for interpreting N50. An assembly with 100 contigs and an N50 of 10 megabases is different from an assembly with 1,000 contigs and the same N50. The maize B73-Ab10 assembly, for example, achieved a contig N50 of 162 megabases with only 63 total contigs ([Gapless assembly of maize chromosomes using long-read technologies](https://pubmed.ncbi.nlm.nih.gov/32434565)), which indicates that the assembly is nearly chromosome-scale.

### Should I use N50 or N90 for my assembly report?

Report both N50 and N90. N50 describes the central tendency of contiguity, while N90 describes the tail of smaller contigs. A large gap between N50 and N90 indicates that your assembly has a substantial number of small contigs that may represent unresolved regions. Reporting both metrics gives a more complete picture of assembly contiguity than either metric alone.

## Related Bioinformatics Guides

- [Evaluating Genome Assembly Quality: Metrics and Tools](/knowledge/bioinformatics/evaluating-genome-assembly-quality-metrics-and-tools)
- [Long-Read Metagenome Assembly: Overcoming Challenges with Nanopore and PacBio Data](/knowledge/bioinformatics/long-read-metagenome-assembly-overcoming-challenges-with-nanopore-and-pacbio-data)
- [Evaluating Metagenomic Assembly Tools: A Benchmarking Framework for Short-Read and Long-Read Data](/knowledge/bioinformatics/evaluating-metagenomic-assembly-tools-a-benchmarking-framework-for-short-read-and-long-read-data)
- [Hybrid Genome Assembly: Combining Short and Long Reads for Better Results](/knowledge/bioinformatics/hybrid-genome-assembly-combining-short-and-long-reads-for-better-results)
- [Long-Read Sequencing for De Novo Assembly of Complex Genomes: Case Studies and Best Practices](/knowledge/bioinformatics/long-read-sequencing-for-de-novo-assembly-of-complex-genomes-case-studies-and-best-practices)

## References and Further Reading

- [NCBI Data Resources](https://www.ncbi.nlm.nih.gov/). National Center for Biotechnology Information.
- [EMBL-EBI Training](https://www.ebi.ac.uk/training). European Bioinformatics Institute.
- [Bioconductor](https://bioconductor.org/). Bioconductor Project.
- [Galaxy Training Network](https://training.galaxyproject.org/). Galaxy Project.
- [nf-core Documentation](https://nf-co.re/docs). nf-core.
- [The Carpentries Lessons](https://carpentries.org/lessons). The Carpentries.
- [Advancing long-read nanopore genome assembly and accurate variant calling for rare disease detection.](https://pubmed.ncbi.nlm.nih.gov/39862869). American journal of human genetics, 2025.
- [Nanopore sequencing and assembly of a human genome with ultra-long reads.](https://pubmed.ncbi.nlm.nih.gov/29431738). Nature biotechnology, 2018.
- [Long-read assembly of the Brassica napus reference genome Darmor-bzh.](https://pubmed.ncbi.nlm.nih.gov/33319912). GigaScience, 2020.
- [A high-quality, long-read genome assembly of the endangered ring-tailed lemur (Lemur catta).](https://pubmed.ncbi.nlm.nih.gov/35365833). GigaScience, 2022.
- [Gapless assembly of maize chromosomes using long-read technologies.](https://pubmed.ncbi.nlm.nih.gov/32434565). Genome biology, 2020.

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