13: De Novo Genome Assembly, Scaffolding & Quality Assessment
Chapter 13: De Novo Genome Assembly, Scaffolding & Quality Assessment
When studying a novel non-model organism or a human genome with complex structural rearrangements, aligning reads to a standard reference is insufficient. De Novo Genome Assembly reconstructs the complete chromosomes of an organism from scratch without an existing reference template, culminating in true Telomere-to-Telomere (T2T) assemblies.
Short-read assemblers break reads into overlapping sub-sequences of length \(k\) (\(k\)-mers) and construct a De Bruijn Graph, where edges represent observed sequences. However, genomic repeats longer than \(k\) collapse into tangled knots. Long-read assemblers use the Overlap-Layout-Consensus (OLC) paradigm: finding all-vs-all overlaps between long reads, constructing a string graph, and collapsing unambiguous paths into contigs.
1. Haplotype-Resolved Assembly with Hifiasm
Hifiasm is the gold-standard assembler for PacBio HiFi reads, generating phased maternal and paternal haplotype assemblies:
# Assemble PacBio HiFi reads into phased unitigs
hifiasm -o novel_organism.asm -t 32 pacbio_hifi_reads.fastq.gz
# If Hi-C data is available, perform trio-free chromosomal phasing
hifiasm -o novel_organism_phased.asm -t 32 \
--h1 hic_R1.fastq.gz --h2 hic_R2.fastq.gz \
pacbio_hifi_reads.fastq.gz
# Convert graphical assembly (GFA) to FASTA
awk '/^S/{print ">"$2"\n"$3}' novel_organism.asm.bp.p_ctg.gfa > primary_contigs.fasta2. Quality Assessment with QUAST & BUSCO
# 1. Contiguity metrics (N50, L50, total length, GC%)
quast.py primary_contigs.fasta -o quast_report/ -t 8
# 2. Gene completeness assessment using Benchmarking Universal Single-Copy Orthologs
busco \
-i primary_contigs.fasta \
-o busco_report \
-m genome \
-l mammalia_odb10 \
-c 16Common Pitfalls & Troubleshooting Checklist
- Java Heap Exhaustion (GATK / Picard): If processes terminate with
java.lang.OutOfMemoryError, set your environment variable explicitly:export _JAVA_OPTIONS="-Xmx16g -Djava.io.tmpdir=/tmp". - Index Timestamp Mismatch: If tools complain that a BAM index is missing or out of date, regenerate with
samtools index -@ 4 sample.bam. - Conda Channel Conflicts: Avoid ABI incompatibilities between bioconda and conda-forge by setting strict priority:
conda config --set channel_priority strict. - Chromosome Naming Contamination: Always verify whether reference FASTA headers use
chr1or1; divergent naming causes silent alignment drops.