| name | bio-workflows-genome-assembly-pipeline |
| description | Orchestrates an end-to-end de novo genome assembly project, routing each step to the right genome-assembly skill rather than restating it. Profiles the genome first (k-mer spectrum -> size, heterozygosity, ploidy), QCs reads, chooses an assembly path by data type (SPAdes for Illumina, Flye for noisy long reads, hifiasm for HiFi, metaFlye for communities), polishes only when needed, decontaminates, scaffolds with Hi-C, and finishes with three-axis QC (contiguity + completeness + correctness). Use when assembling a genome from raw reads and deciding which assembler, whether to polish, and how to prove the result is good. |
| tool_type | cli |
| primary_tool | Flye |
| workflow | true |
| depends_on | ["genome-assembly/genome-profiling","read-qc/fastp-workflow","long-read-sequencing/long-read-qc","genome-assembly/short-read-assembly","genome-assembly/long-read-assembly","genome-assembly/hifi-assembly","genome-assembly/metagenome-assembly","genome-assembly/assembly-polishing","genome-assembly/contamination-detection","genome-assembly/scaffolding","genome-assembly/assembly-qc"] |
| qc_checkpoints | [{"after_profiling":"Genome-size and heterozygosity estimate obtained; sets NG50 denominator, purge level, assembler choice"},{"after_assembly":"Total length within ~10-20% of profiled size; contig count plausible for read type"},{"after_polishing":"Merqury QV improved or plateaued (do not over-polish HiFi); k-mers from accurate reads, not the polishing reads"},{"after_decontamination":"Single-organism: FCS-GX/BlobToolKit clean; MAG: CheckM2 >90% complete, <5% contam, GUNC pass"},{"after_scaffolding":"Contact map shows clean diagonal; off-diagonal blocks inspected/broken before calling chromosome-scale"},{"final_three_axis_qc":"Contiguity (auN/NG50 vs profiled size) + completeness (BUSCO/compleasm) + correctness (Merqury QV) all reported; never N50 alone"}] |
Version Compatibility
Reference examples tested with: GenomeScope2 2.0+, meryl 1.4+, Merqury 1.3+, fastp 0.23+, SPAdes 4.0+, Flye 2.9+, hifiasm 0.25+, metaFlye 2.9+, Racon 1.5+, medaka 2.0+, minimap2 2.26+, FCS-GX 0.5+, CheckM2 1.0+, GUNC 1.0+, YaHS 1.2+, QUAST 5.2+, BUSCO 5.5+, samtools 1.19+. Each owning genome-assembly skill is the source of truth for its tool's pinned version.
Before using code patterns, verify installed versions match. If versions differ:
- CLI:
<tool> --version then <tool> --help to confirm flags
Tool outputs are driven by more than the binary version: medaka consensus quality depends on the basecaller MODEL string (must match the basecaller, e.g. -m r1041_e82_400bps_sup_v5.0.0); BUSCO/compleasm results depend on the lineage dataset and OrthoDB generation (record them); CheckM2/GTDB-Tk results track the reference DATABASE release; hifiasm output filenames and default purge behaviour change across versions (verify against the installed build). If a command errors, introspect the installed tool and adapt rather than retrying.
Genome Assembly Pipeline
"Assemble a genome from my sequencing reads and prove it is good" -> Profile the genome, QC reads, route to the right assembler by data type, polish only if needed, decontaminate, scaffold if Hi-C exists, and finish with three-axis QC. This skill ORCHESTRATES the genome-assembly category; it routes each step to the owning skill and encodes the cross-cutting decisions, not each tool's full option set.
The Single Most Important Modern Insight -- Assembly Is Three Orthogonal Questions, and Each Step Answers One
A genome project fails when one number stands in for the whole. Profiling sets expectations (how big, how heterozygous, how many haplotypes) BEFORE assembling, the assembler answers contiguity, polishing answers per-base accuracy, decontamination answers provenance, scaffolding answers arrangement, and QC must independently address all three of contiguity, completeness, and correctness. The orchestration job is to keep these separate and route each to its skill: a high N50 says nothing about whether the bases are right (Merqury QV) or whether the sequence is the organism's (contamination), and skipping profiling means the assembler guesses the parameters that profiling would have set.
Decision Flow (Step 0 -> 6)
Raw reads (+ optional Hi-C, trio, short reads)
|
v
[0. Profile the genome] --> genome-assembly/genome-profiling
| k-mer spectrum (GenomeScope2) -> genome size, heterozygosity, ploidy.
| Sets NG50 denominator, expected haplotype count, hifiasm purge level,
| and which assembly path is even sensible. Do this BEFORE assembling.
v
[1. QC reads] -----------> short: read-qc/fastp-workflow
| long: long-read-sequencing/long-read-qc
| Garbage-in caps assembly quality; record platform + basecaller era
| (it is an assembly PARAMETER, see step 2), trim internal adapters.
v
[2. Choose path BY DATA TYPE]
| Illumina-only small/isolate -> genome-assembly/short-read-assembly (SPAdes)
| noisy ONT/CLR -> genome-assembly/long-read-assembly (Flye --nano-hq for R10)
| PacBio HiFi -> genome-assembly/hifi-assembly (hifiasm, phased)
| community sample -> genome-assembly/metagenome-assembly (metaFlye/metaSPAdes + binning)
| large/heterozygous euk -> long-read or HiFi, NOT short reads
v
[3. Polish IF needed] ---> genome-assembly/assembly-polishing
| noisy long-read assemblies: Racon -> medaka (model MUST match basecaller).
| Do NOT polish HiFi reflexively (often net-harmful). Measure with Merqury QV,
| not the reads polished with. Skip entirely for SPAdes/HiFi when QV is already high.
v
[4. Decontaminate] ------> genome-assembly/contamination-detection
| single organism: FCS-GX (GenBank-mandatory) + BlobToolKit blob plot.
| MAG: CheckM2 + GUNC (chimerism). Two disjoint problems (see below).
v
[5. Scaffold IF Hi-C] ---> genome-assembly/scaffolding
| automated YaHS produces a DRAFT; manual contact-map curation is the standard.
| Scaffold N50 != contig N50 (gaps are Ns). Skip if no Hi-C.
v
[6. Three-axis QC] ------> genome-assembly/assembly-qc
contiguity (auN/NG50 vs profiled size) + completeness (BUSCO/compleasm)
+ correctness (Merqury QV). Report the triad; NEVER N50 alone.