12. De Novo Genome & Transcriptome Assembly
7 Primary ToolsReconstructing contigs and chromosome-level scaffolds without a reference genome, followed by consensus error correction and base polishing.
| Tool | Primary Role & Purpose | Supported Platforms | Executable Pipeline |
|---|---|---|---|
| SPAdes / metaSPAdes → | Multi-sized de Bruijn graph assembler for small genomes and metagenomes | Short-Read & Hybrid | View Code ↓ |
| MEGAHIT → | Memory-efficient de Bruijn graph assembler for large metagenomic sets | Metagenomic Short Reads | View Code ↓ |
| Flye → | Repeat graph assembler for Oxford Nanopore and PacBio data | Long-Read (ONT / PacBio) | View Code ↓ |
| Hifiasm → | Leading de novo assembler for PacBio HiFi and HiFi+Trio/Hi-C data | PacBio HiFi / Hi-C / Trio | View Code ↓ |
| Canu → | Overlap-Layout-Consensus (OLC) assembler for noisy long reads | ONT / PacBio CLR | View Code ↓ |
| Medaka → | Neural network model polishing consensus sequences from ONT alignments | Oxford Nanopore Drafts | View Code ↓ |
| Racon / Pilon → | Fast consensus module (Racon for long reads; Pilon for short-read polishing) | Hybrid Assembly Polishing | View Code ↓ |
Flye, hifiasm, Verkko, Canu, Shasta, Raven, NECATSPAdes, MEGAHIT, SOAPdenovo2, ABySSYaHS, SALSA2, 3D-DNA, Juicebox Assembly ToolsMedaka, Racon, Pilon, DeepPolisher, QUAST, BUSCO, Merqury, compleasmBRAKER3, MAKER, Funannotate, RepeatMasker, EDTAminigraph-cactus, PGGB, vg toolkitMulti-k-mer de Bruijn Graph Bacterial & Metagenomic Assembly
SPAdes is the benchmark de novo assembler for bacterial, fungal, and viral genomes. It employs iterative multi-sized de Bruijn graphs and read error correction to produce contigs and scaffold graphs, with dedicated modes for plasmids and metagenomes.
# 1. Run SPAdes bacterial genome assembly with multi-k-mer iteration
spades.py \
-1 sample_R1.fastq.gz -2 sample_R2.fastq.gz \
-k 21,33,55,77,99,127 \
--careful \
--threads 16 \
--memory 64 \
-o spades_isolate_out/
# Output contigs: spades_isolate_out/contigs.fasta
# Output scaffolds: spades_isolate_out/scaffolds.fasta--careful runs mismatch post-correction to reduce false indels; -k 21,33,55,77,99,127 builds multi-sized de Bruijn graphs to span repetitive loci.Ultra-Fast Low-Memory Metagenomic Assembler
MEGAHIT assembles complex, large-scale metagenomic datasets using succinct de Bruijn graphs. It consumes minimal memory and scales smoothly to terabyte-scale FASTQ archives without requiring massive supercomputing nodes.
# 1. Assemble metagenomic paired-end reads with succinct de Bruijn graph
megahit \
-1 sample_R1.fq.gz -2 sample_R2.fq.gz \
--k-list 21,29,39,59,79,99,119,141 \
--min-contig-len 500 \
-m 0.85 \
-t 24 \
-o megahit_assembly/
# Final contigs: megahit_assembly/final.contigs.fa--k-list progresses through iterative k-mer steps; -m 0.85 caps maximum RAM at 85% available system memory.Repeat Graph De Novo Assembly for Long Reads
Flye is a de novo assembler for single-molecule sequencing reads using repeat graphs. It resolves complex structural genomic repeats, assembling complete circular bacterial chromosomes and eukaryotic chromosome arms from ONT and PacBio data.
# 1. Assemble Oxford Nanopore long reads
flye \
--nano-hq ont_reads.fq.gz \
--genome-size 5m \
--out-dir flye_assembly/ \
--threads 16 \
--iterations 2
# Output assembly: flye_assembly/assembly.fasta
# Assembly graph (GFA): flye_assembly/assembly_graph.gfa--nano-hq (or --pacbio-hifi) specifies read type; --iterations 2 performs consensus polishing rounds.Haplotype-Resolved De Novo PacBio HiFi Assembler
Hifiasm produces haplotype-resolved, chromosome-level de novo genome assemblies from PacBio HiFi reads. When provided with Hi-C or parental trio data, it phases both maternal and paternal haplotypes end-to-end without reference bias.
# 1. Haplotype-resolved assembly with PacBio HiFi reads and Hi-C pairs
hifiasm \
-o asm_sample \
-t 24 \
--h1 hic_R1.fq.gz --h2 hic_R2.fq.gz \
pacbio_hifi.fastq.gz
# 2. Extract phased FASTA contigs from GFA graphs
awk '/^S/{print ">"$2"\n"$3}' asm_sample.hic.hap1.p_ctg.gfa > hap1_contigs.fasta
awk '/^S/{print ">"$2"\n"$3}' asm_sample.hic.hap2.p_ctg.gfa > hap2_contigs.fasta--h1 --h2 integrates Hi-C contact pairs for chromosome-wide phasing; extracts maternal (hap1) and paternal (hap2) haplotypes.Overlap-Layout-Consensus (OLC) Noisy Long-Read Assembler
Canu is an Overlap-Layout-Consensus assembler designed for noisy single-molecule reads. It executes automated read self-correction with MinHash alignment (MHAP), read trimming, and unitig generation.
# 1. Run end-to-end Canu assembly on Oxford Nanopore reads
canu \
-p sample_asm -d canu_out/ \
genomeSize=4.8m \
maxThreads=16 \
-nanopore ont_reads.fq.gzgenomeSize=4.8m supplies expected haploid genome length for coverage calculation; -nanopore tunes overlap error thresholds.Neural Network Model Consensus Polishing for Nanopore
Medaka is a consensus tool developed by Oxford Nanopore. It aligns ONT reads to draft assemblies and uses recurrent neural networks to resolve remaining insertion/deletion errors and homopolymer run ambiguities.
# 1. Polish draft assembly with chemistry-specific neural network model
medaka_consensus \
-i ont_reads.fq.gz \
-d draft_assembly.fasta \
-o medaka_polished/ \
-t 16 \
-m r1041_e82_400bps_sup_v4.2.0
# Polished consensus in: medaka_polished/consensus.fasta-m r1041_e82_400bps_sup_v4.2.0 loads neural network weights corresponding to the basecaller chemistry used; -t 16 sets worker threads.Long-Read SIMD Consensus & Short-Read Base Polishing
Racon rapidly computes consensus sequences using SIMD-accelerated partial order alignment. Pilon then aligns high-accuracy paired-end Illumina reads to the draft assembly to fix single-base substitution errors and indels.
# 1. Fast long-read consensus polishing with Racon
minimap2 -t 16 draft.fasta ont_reads.fq.gz > ont_to_draft.paf
racon -t 16 ont_reads.fq.gz ont_to_draft.paf draft.fasta > racon_polished.fasta
# 2. Map high-accuracy short reads to consensus
bwa index racon_polished.fasta
bwa mem -t 16 racon_polished.fasta illumina_R1.fq.gz illumina_R2.fq.gz \
| samtools sort -@ 4 -o illumina_to_draft.sorted.bam -
samtools index illumina_to_draft.sorted.bam
# 3. Final base-error polishing with Pilon
pilon --genome racon_polished.fasta \
--frags illumina_to_draft.sorted.bam \
--output pilon_final_polished \
--vcf --changesracon -t 16 executes partial-order alignment graph consensus; pilon --changes logs all single-base substitutions and indel fixes.