Workflows

Genome assembly: from reads to contigs

De Bruijn and overlap graphs, k-mer choice, repeats, scaffolding, polishing and the evaluation that decides whether an assembly is usable.

Genome assembly reconstructs a genome from sequencing reads. The output is a set of contigs, or longer scaffolds, that approximate the original sequence. The quality of the assembly depends on the reads, the coverage, the repeat structure and the algorithm.

From reads to contigs

Short-read assemblers usually use a de Bruijn graph. The reads are broken into k-mers of a fixed length, and the graph represents overlaps between them. The assembler simplifies the graph and outputs contigs.

The choice of k affects the result. A small k gives more connections and can handle low coverage, but it is more affected by repeats. A large k is more specific but may leave gaps in low-coverage regions. Many assemblers try several k values and merge the results.

Long-read assemblers often use an overlap-layout-consensus approach. Reads are long enough to span repeats, so the graph is simpler. The trade-off is a higher error rate, which requires polishing.

Coverage and repeats

Coverage is the average number of reads covering a position. Higher coverage generally gives a better assembly, but too much coverage can create artefacts, and uneven coverage can leave gaps.

Repeats longer than the reads collapse or fragment the assembly. Short reads cannot resolve a repeat that is longer than the read length. Long reads can span many repeats, which is why long-read assemblies are often more contiguous.

Contigs and scaffolds

A contig is a contiguous sequence assembled from reads. A scaffold is a set of contigs ordered and oriented using read pairs or other linking information, with gaps between them.

Scaffolding can improve the order but does not fill the gaps. A scaffold with many Ns is not a finished sequence. Report the number of gaps and the gap length.

Polishing

Long-read assemblies have indel errors. Polishing uses accurate short reads or a corrected long-read set to improve the consensus. A polished assembly has fewer errors but may still contain structural errors.

Polishing can also collapse or expand repeats if the reads are ambiguous. Check the assembly before and after polishing, and do not assume that polishing only improves the sequence.

Evaluation

An assembly is evaluated on contiguity, completeness and correctness. Contiguity metrics include the number of contigs and N50. Completeness can be estimated with conserved single-copy genes. Correctness can be checked by mapping reads back to the assembly and looking for coverage anomalies.

A high N50 does not prove a good assembly. A single long contig can hide a collapsed repeat or a misjoin. Combine metrics with a dot plot, a coverage plot and a gene-space check.

Short reads, long reads and hybrids

Short reads are accurate and cheap but struggle with repeats. Long reads span repeats but have higher error rates. Hybrid assemblies use long reads for contiguity and short reads for accuracy.

The best choice depends on the genome, the budget and the question. A small bacterial genome may assemble well from short reads alone. A complex plant or animal genome usually benefits from long reads.

What an assembly is not

An assembly is a model. It is not a perfect copy of the genome. A collapsed repeat, a misjoin or a missing region can change the interpretation of genes, structural variants and synteny.

For a gene presence/absence question, check that the gene is not split across contigs. For a structural variant question, check the assembly graph and the read alignments. For a comparative genomics question, use the same assembly method across samples when possible.

A practical workflow

  1. Quality-control the reads and remove adapters.
  2. Choose an assembler and parameters suited to the read type.
  3. Assemble and inspect the graph or the contig statistics.
  4. Scaffold if linking data are available.
  5. Polish and check the effect on the assembly.
  6. Assess completeness, contamination and correctness.
  7. Annotate and check the genes of interest.
  8. Report the method and the metrics.

Annotation

An assembly becomes useful when it is annotated. Gene prediction identifies open reading frames, and functional assignment compares them with databases. Annotation transfers information from known genes to new sequences, so it inherits the errors and gaps of the databases.

For a bacterial genome, annotation can be relatively straightforward. For a eukaryotic genome, splice variants, repeats and pseudogenes make it harder. A gene that is split across contigs may be annotated as two partial genes or missed.

Check the genes that matter for the question. A resistance gene, a biosynthetic cluster or a structural variant should be examined in the context of the assembly, not only through an automatic annotation.

Assembly for metagenomes

A metagenome contains many organisms. Assembly may produce a mixture of contigs from different genomes, and a single "genome" may be a chimera. Binning groups contigs by coverage and composition, but the bins are hypotheses.

For a metagenome-assembled genome, report the completeness and contamination estimated from marker genes. A bin that is only partly complete is a partial genome, not a closed chromosome.

Reporting

Report the read type, the coverage, the assembler and version, the k-mer settings, the polishing method and the evaluation metrics. State the number of contigs, the N50, the total length and the completeness estimate. If the assembly was scaffolded, report the linking data and the gaps.

For a comparative study, use the same pipeline across samples. A difference in assembly method can look like a difference in genome content.

Key points

  • Assembly reconstructs a genome; it is a model, not a perfect copy.
  • Repeats longer than the reads cause fragmentation or collapse.
  • Long reads improve contiguity; short reads improve accuracy.
  • N50 measures contiguity, not correctness.
  • Evaluate completeness and contamination as well as size.

Common mistakes

  • Choosing a k-mer size without checking the result.
  • Treating a scaffold with gaps as a finished sequence.
  • Reporting only N50.
  • Ignoring coverage anomalies that suggest a misjoin.
  • Comparing assemblies made with different methods.

When to ask for help

If the assembly is fragmented, if a gene of interest is split, or if the genome is large and repetitive, ask for a review. You can order an analysis or read the assembly quality guide. The Genome Assembly & Annotation course covers assemblers and polishing, and the long-read sequencing course covers long-read data.

Sources and further reading

When to ask for help. If your data or design do not fit a tutorial, order an analysis and we will reply with a fixed price.

Written by the Solagene team for research and education. Found an error? Tell us and we will correct it.