git:20260517.81511a7 to git:20260531.6e617c4

119 added, 297 removed. Audit A to A.

---
name: bio-genome-assembly-assembly-qc
- description: Assess genome assembly quality using QUAST for contiguity metrics and BUSCO for completeness. Essential for evaluating assembly success and comparing assemblers. Use when evaluating assembly completeness and quality.
+ description: Evaluates genome assembly quality across the three orthogonal axes - contiguity (QUAST auN/NG50/NGx, not bare N50), completeness (BUSCO/compleasm gene-space plus Merqury k-mer completeness), and correctness (reference-free Merqury QV, Inspector/CRAQ structural errors, asmgene false-duplication/collapse). Covers why N50 is the most-gamed metric, why QV measured on the polishing reads is circular, distinguishing uncollapsed haplotigs from real WGD, and the EBP/VGP 6.C.Q40 standard. Use when judging whether an assembly is good enough to annotate or publish, comparing assemblers, diagnosing a fragmented or duplicated assembly, or assessing a phased diploid assembly.
tool_type: cli
primary_tool: QUAST
---
## Version Compatibility
- Reference examples tested with: BUSCO 5.5+, QUAST 5.2+, SPAdes 3.15+, pandas 2.2+
+ Reference examples tested with: QUAST 5.2+, BUSCO 5.5+ (and 6.x for odb12 lineages), compleasm 0.2.6+, Merqury 1.3+, meryl 1.4+, minimap2 2.26+, Inspector 1.2+, CRAQ 1.0+, merfin 1.0+, GenomeScope2 2.0+.
Before using code patterns, verify installed versions match. If versions differ:
- - Python: `pip show <package>` then `help(module.function)` to check signatures
- CLI: `<tool> --version` then `<tool> --help` to confirm flags
-
- If code throws ImportError, AttributeError, or TypeError, introspect the installed
- package and adapt the example to match the actual API rather than retrying.
-
- # Assembly QC
-
- **"Assess my genome assembly quality"** → Evaluate assembly contiguity (N50, total length, misassemblies) and gene completeness using conserved single-copy orthologs.
- - CLI: `quast assembly.fa -r reference.fa` (contiguity), `busco -i assembly.fa -l lineage` (completeness)
-
- ## Key Metrics
-
- | Metric | Good Assembly |
- |--------|---------------|
- | N50 | High (relative to genome) |
- | L50 | Low |
- | Contigs | Few |
- | Misassemblies | 0 (with reference) |
- | BUSCO Complete | >95% |
- | BUSCO Duplicated | <5% (unless polyploid) |
-
- ## QUAST
-
- ### Installation
-
- ```bash
- conda install -c bioconda quast
- ```
-
- ### Basic Usage
-
- ```bash
- quast.py assembly.fasta -o quast_output
- ```
-
- ### With Reference Genome
-
- ```bash
- quast.py assembly.fasta -r reference.fasta -o quast_output
- ```
-
- ### Compare Multiple Assemblies
-
- ```bash
- quast.py assembly1.fa assembly2.fa assembly3.fa -o comparison
- ```
-
- ### Key Options
-
- | Option | Description |
- |--------|-------------|
- | `-o` | Output directory |
- | `-r` | Reference genome |
- | `-g` | Gene annotations (GFF) |
- | `-t` | Threads |
- | `-m` | Min contig length (default: 500) |
- | `--large` | For large genomes (>100Mb) |
- | `--fragmented` | For highly fragmented assemblies |
- | `--scaffolds` | Input is scaffolds (includes N-gaps) |
-
- ### With Gene Annotations
-
- ```bash
- quast.py assembly.fasta -r reference.fasta -g genes.gff -o quast_output
- ```
-
- ### For Large Genomes
-
- ```bash
- quast.py --large assembly.fasta -o quast_output -t 16
- ```
-
- ### Output Files
-
- ```
- quast_output/
- ├── report.txt # Summary statistics
- ├── report.html # Interactive report
- ├── report.tsv # Tab-separated stats
- ├── icarus.html # Contig viewer
- └── aligned_stats/ # If reference provided
- ```
+ - Python: `pip show <package>` then `help(module.function)` to check signatures
- ### Key Output Metrics
+ Results depend on inputs that outlive the binary version - record them:
+ - BUSCO/compleasm depend on the **lineage dataset** and OrthoDB generation. `_odb10` (BUSCO 5) and `_odb12` (BUSCO 6 default) gene sets are not comparable across the version boundary; a 99% on the shallow `eukaryota_odb10` (~255 genes) is a different claim from 99% on a deep clade set (~5,500+).
+ - Merqury QV/completeness depend on the **k-mer size** (from `best_k.sh <genome_size>`, not hardcoded) and the **read set** used for the k-mer DB (use accurate reads; see the circularity warning below).
+ - NG50/NGx/auNG depend on the **expected genome-size estimate** (GenomeScope2 / flow cytometry / a congener).
- | Metric | Description |
- |--------|-------------|
- | Total length | Sum of contig lengths |
- | # contigs | Number of contigs (>= min length) |
- | Largest contig | Length of largest contig |
- | N50 | 50% of assembly in contigs >= this length |
- | N90 | 90% of assembly in contigs >= this length |
- | L50 | Number of contigs comprising N50 |
- | GC % | GC content |
- | # misassemblies | With reference: structural errors |
- | Genome fraction | With reference: % of reference covered |
+ If code throws an error, introspect the installed tool and adapt rather than retrying.
- ## BUSCO
+ # Assembly QC
- ### Installation
+ **"Is my genome assembly any good?"** -> Measure all three orthogonal axes - contiguity, completeness, correctness - with reference-free methods, because no single number (least of all N50) is quality.
+ - CLI: `quast.py asm.fa --large --eukaryote -o out` (contiguity + reference-based structure), `busco -i asm.fa -m genome -l <lineage>` or `compleasm run -a asm.fa -l <lineage>` (gene completeness), `merqury.sh reads.meryl asm.fa out` (reference-free QV + k-mer completeness), `inspector.py -c asm.fa -r reads.fq` (reference-free structural errors)
- ```bash
- conda install -c bioconda busco
- ```
+ ## The Single Most Important Modern Insight -- Quality Is Three Orthogonal Axes; N50 Is the Most-Gamed One
- ### Basic Usage
+ Assembly quality is **three genuinely orthogonal axes - contiguity, completeness, correctness - and a single number on any one is not quality.** The axes do not predict each other, and the diagnostic failure modes prove it:
- ```bash
- busco -i assembly.fasta -m genome -l bacteria_odb10 -o busco_output
- ```
+ - **Contiguous + wrong:** a single-contig "chromosome" that is three chromosomes misjoined. Perfect N50, catastrophic correctness. Only Hi-C / a same-species reference / read-discordance catches it.
+ - **Complete + shredded:** BUSCO 99%, but repeats collapsed, segmental duplications merged, intergenic space wrong. BUSCO is gene-space-only and cannot see it.
+ - **Accurate + incomplete:** QV60 over the 92% that assembled, with the hard 8% (centromeres, rDNA, satellites) simply absent. QV is silent about what is not there.
- ### Key Options
+ The field's historical sin is reporting **contiguity alone** because it is cheapest to compute and easiest to game. **N50 is the most-gamed metric in genomics:** it rises when sequence is thrown away (N50 is computed on what survives), when misjoins are *not* broken (a misjoined contig is a long contig), and when haplotigs are retained. A bigger N50 is louder, not better. Three load-bearing moves:
- | Option | Description |
- |--------|-------------|
- | `-i` | Input assembly |
- | `-m` | Mode: genome, proteins, transcriptome |
- | `-l` | Lineage dataset |
- | `-o` | Output name |
- | `-c` | CPU threads |
- | `--auto-lineage` | Auto-detect lineage |
- | `--offline` | Use downloaded datasets only |
- | `--list-datasets` | List available lineages |
+ 1. **Report auN/NGx, not bare N50.** auN = the area under the Nx curve = length-weighted mean contig length; it integrates the whole curve and is continuous where N50 jumps discontinuously (the small-L50 / T2T regime). NGx/auNG normalize to the **expected genome size**, coupling contiguity to completeness (an assembly that drops half the genome gets a great N50 but a terrible NG50). Always report contig AND scaffold N50 - if scaffold >> contig, the contiguity is glue (Ns), not sequence.
+ 2. **Default to reference-free.** For a *novel* genome there is no trusted reference; QUAST against a divergent relative reports real inversions/SVs as "misassemblies" and real SNPs as "mismatches". Use Merqury QV (accuracy) + Inspector/CRAQ (structure) + asmgene (false dup/collapse). QUAST is the special case "I have a same-organism reference," not the default.
+ 3. **Report a Merqury QV - and never compute it on the polishing reads.** QV is the reference-free accuracy standard reviewers now demand; an assembly paper with no QV is a red flag. But QV from the same reads used for polishing is **circular** - the polisher already made the assembly agree with those reads, so the QV measures convergence, not correctness. Build the k-mer DB from accurate, ideally independent reads (HiFi/Illumina, not noisy ONT).
- ### List Available Lineages
+ ## Tool Taxonomy
- ```bash
- busco --list-datasets
- ```
+ | Tool | Citation | Axis / Role | When |
+ |------|----------|-------------|------|
+ | QUAST / calN50 | Gurevich 2013 *Bioinformatics*; auN = Li blog (no journal) | contiguity (auN/NGx, N50/L50) + reference-based structure (NA50, misassemblies) | always for contiguity; structure only vs a same-organism reference |
+ | BUSCO | Manni 2021 *Mol Biol Evol*; Simão 2015 *Bioinformatics* | gene-space completeness (C/S/D/F/M) | universal; conservative on good genomes |
+ | compleasm | Huang & Li 2023 *Bioinformatics* | gene-space completeness, miniprot-based | faster + more sensitive; default on HiFi/T2T-era genomes |
+ | Merqury | Rhie 2020 *Genome Biol* | reference-free QV + k-mer completeness + spectra-cn + phasing | always; the accuracy gold standard |
+ | merfin | Formenti 2022 *Nat Methods* | multiplicity-corrected QV / polishing | refine QV biased by k-mer multiplicity |
+ | Inspector | Chen 2021 *Genome Biol* | reference-free structural + base errors (long reads) | novel genomes; can also correct |
+ | CRAQ | Li 2023 *Nat Commun* | reference-free structural/regional errors (clipped alignments) | novel genomes; flags misjoins to split |
+ | asmgene | Li (minimap2, no separate journal) | gene collapse / false duplication | high-quality genomes where BUSCO saturates |
+ | GenomeScope2 | Ranallo-Benavidez 2020 *Nat Commun* | genome size / het / repeat % from k-mers | the size estimate NG50/auNG/spectra-cn need (-> genome-profiling) |
- ### Common Lineages
+ ## Decision Tree by Scenario
- | Lineage | Use For |
- |---------|---------|
- | bacteria_odb10 | Bacteria |
- | archaea_odb10 | Archaea |
- | eukaryota_odb10 | General eukaryote |
- | fungi_odb10 | Fungi |
- | metazoa_odb10 | Animals |
- | vertebrata_odb10 | Vertebrates |
- | mammalia_odb10 | Mammals |
- | viridiplantae_odb10 | Plants |
- | saccharomycetes_odb10 | Yeasts |
+ | Scenario | Recommended | Why |
+ |----------|-------------|-----|
+ | Novel genome, no trusted reference | Merqury QV + k-mer completeness + BUSCO/compleasm + auN/NGx + Inspector/CRAQ | reference-free triad; QUAST structure is uninterpretable here |
+ | Same-species (near-isogenic) reference available | add QUAST `--large --eukaryote -r ref.fa` (NA50, misassemblies) | reference-based structure is trustworthy only vs the same organism |
+ | High-quality HiFi/T2T-era assembly, BUSCO looks low | compleasm | BUSCO under-reports good genomes (its predictor, not the assembly, misses genes) |
+ | Contiguity claim must resist gaming | auN/auNG via `calN50.js -L <size>` | N50 is a single unstable order-statistic and is gameable |
+ | High BUSCO-Duplicated, size > expected | spectra-cn + asmgene + GenomeScope2 size -> purge_dups | distinguish uncollapsed haplotigs (purge) from real WGD (keep) |
+ | Phased diploid / trio assembly | Merqury hap-mers: switch/hamming error + blob plot | phasing accuracy is the extra axis |
+ | Need genome size / het before NG50 | -> genome-profiling (GenomeScope2) | NG/auN/spectra-cn all need a size estimate |
+ | Reads not yet QC'd | -> read-qc/quality-reports | garbage-in caps assembly quality |
+ | Bacterial isolate / MAG completeness+contamination | -> contamination-detection (CheckM2/GUNC/MIMAG) | marker-gene completeness/contamination is a different problem |
- ### Auto-Lineage Detection
+ ## Contiguity -- auN/NGx (not bare N50)
```bash
- busco -i assembly.fasta -m genome --auto-lineage -o busco_output
- ```
-
- ### Output Files
-
- ```
- busco_output/
- ├── short_summary.txt # Quick summary
- ├── full_table.tsv # All BUSCO results
- ├── missing_busco_list.tsv # Missing genes
- └── busco_sequences/ # BUSCO gene sequences
- ```
-
- ### Interpret Results
-
- ```
- C:98.5%[S:97.0%,D:1.5%],F:0.5%,M:1.0%,n:4085
-
- C - Complete (total)
- S - Single-copy
- D - Duplicated
- F - Fragmented
- M - Missing
- n - Total BUSCO groups
+ k8 calN50.js -L <genome_size> asm.fa # N50/L50 + NG50/NGx + auN/auNG; -L sets genome size for NG/auNG (ships with minimap2)
+ quast.py asm.fa --large --eukaryote -t 16 -o quast_out # N50/L50, GC, # contigs; NG50 only with -r or --est-ref-size; structure only if -r given
```
- ### Quality Thresholds
-
- | Quality | Complete | Missing |
- |---------|----------|---------|
- | Excellent | >95% | <2% |
- | Good | >90% | <5% |
- | Acceptable | >80% | <10% |
- | Poor | <80% | >10% |
-
- ## Complete QC Workflow
-
- **Goal:** Run a comprehensive assembly quality assessment combining contiguity and completeness metrics.
+ `--large` implies `--eukaryote --min-contig 3000 --min-alignment 500 --extensive-mis-size 7000`. Report contig AND scaffold N50; a scaffold N50 far above the contig N50 means the contiguity is scaffolding Ns, and every gap is a join hypothesis that could be a misassembly. NA50 (QUAST, contigs broken at misassemblies) far below N50 means the contiguity is partly fictional.
- **Approach:** Execute QUAST for contiguity statistics and BUSCO for gene completeness, optionally with a reference genome.
+ ## Completeness -- BUSCO / compleasm + Merqury k-mer completeness
```bash
- #!/bin/bash
- set -euo pipefail
-
- ASSEMBLY=$1
- REFERENCE=${2:-}
- LINEAGE=${3:-bacteria_odb10}
- OUTDIR=${4:-assembly_qc}
-
- mkdir -p $OUTDIR
-
- echo "=== Assembly QC ==="
-
- # QUAST
- echo "Running QUAST..."
- if [ -n "$REFERENCE" ]; then
- quast.py $ASSEMBLY -r $REFERENCE -o ${OUTDIR}/quast -t 8
- else
- quast.py $ASSEMBLY -o ${OUTDIR}/quast -t 8
- fi
-
- # BUSCO
- echo "Running BUSCO..."
- busco -i $ASSEMBLY -m genome -l $LINEAGE -o busco_run -c 8
- mv busco_run ${OUTDIR}/busco
-
- # Summary
- echo ""
- echo "=== QUAST Summary ==="
- cat ${OUTDIR}/quast/report.txt
-
- echo ""
- echo "=== BUSCO Summary ==="
- cat ${OUTDIR}/busco/short_summary*.txt
-
- echo ""
- echo "Reports saved to $OUTDIR"
+ busco -i asm.fa -m genome -l vertebrata_odb10 -o busco_out -c 16 # metaeuk predictor (default)
+ busco -i asm.fa -m genome --auto-lineage -o busco_out -c 16 # auto-pick if clade unknown
+ compleasm run -a asm.fa -l vertebrata -o compleasm_out -t 16 # miniprot-based; faster + more sensitive
```
- ## Compare Assemblies
-
- **Goal:** Evaluate multiple assemblies side-by-side to select the best one.
-
- **Approach:** Run QUAST with multiple input assemblies and labeled names, then generate BUSCO comparison plots.
+ Reported as `C:[S,D],F,M,n`. **Read C, F, and M together, never C alone:** high Fragmented with high Complete signals a contiguity/base-quality problem hidden behind the headline. Use the **deepest applicable clade dataset** (a 99% on the shallow `eukaryota_odb10` ~255-gene set is trivially easy and not comparable to a deep clade set), and record the lineage + OrthoDB generation. On a high-quality assembly, BUSCO reported ~95.7% complete where compleasm reported ~99.6% on the same human genome (Huang & Li 2023) - the missing ~4% was missing from BUSCO's *predictor*, not the genome - so prefer compleasm on good genomes. Both share gene-space blindness: they say nothing about intergenic/repeat/regulatory sequence. **Merqury k-mer completeness** scores the whole genome (reliable read k-mers found in the assembly / reliable read k-mers in the reads), catching missing sequence BUSCO cannot see; it is blind to structure (a scrambled-but-present genome scores 100%).
- ### QUAST Comparison
+ ## Correctness -- Merqury QV (reference-free) and structural validation
- ```bash
- quast.py \
- spades_assembly.fa \
- flye_assembly.fa \
- canu_assembly.fa \
- -r reference.fa \
- -l "SPAdes,Flye,Canu" \
- -o assembly_comparison
- ```
+ **Goal:** Get a reference-free per-base accuracy (QV) plus a copy-number/false-duplication picture, then structural errors without a reference.
- ### BUSCO Comparison
+ **Approach:** Build a meryl k-mer DB at the `best_k.sh`-derived k from accurate reads, run Merqury for QV + completeness + spectra-cn, and map raw long reads back with Inspector/CRAQ for structural errors. Refine QV with merfin where multiplicity bias matters.
```bash
- # Run BUSCO on each assembly
- for asm in spades.fa flye.fa canu.fa; do
- name=$(basename $asm .fa)
- busco -i $asm -m genome -l bacteria_odb10 -o busco_${name}
- done
-
- # Generate comparison plot
- generate_plot.py -wd . busco_spades busco_flye busco_canu
- ```
-
- ## Python: Parse QUAST Output
-
- **Goal:** Programmatically extract assembly metrics from QUAST reports.
-
- **Approach:** Read the tab-separated report.tsv file and transpose it for easy metric access.
-
- ```python
- import pandas as pd
-
- def parse_quast(report_tsv):
- '''Parse QUAST report.tsv file.'''
- df = pd.read_csv(report_tsv, sep='\t', index_col=0)
- return df.T
+ best_k.sh <genome_size> # prints recommended k (NOT hardcoded); ~18-21 for Gbp genomes
+ meryl count k=21 reads.fastq output reads.meryl # k from best_k.sh; use ACCURATE reads (HiFi/Illumina)
+ merqury.sh reads.meryl asm.fa out # -> out.qv (per-scaffold + overall), out.completeness.stats, spectra-cn
- stats = parse_quast('quast_output/report.tsv')
- print(f"N50: {stats['N50'].values[0]}")
- print(f"Total length: {stats['Total length'].values[0]}")
- print(f"# contigs: {stats['# contigs'].values[0]}")
+ inspector.py -c asm.fa -r reads.fq -o insp_out --datatype hifi -t 16 # reference-free structural + base errors
+ craq -g asm.fa -sms long_reads.bam -ngs short_reads.bam -o craq_out # R-AQI/S-AQI; CRE (regional)/CSE (structural)
```
- ## Python: Parse BUSCO Output
-
- **Goal:** Programmatically extract BUSCO completeness metrics from summary files.
+ QV: with `E = K_asm-only / K_total`, per-base error `P = 1 - (1 - E)^(1/k)` and `QV = -10*log10(P)` (the `^(1/k)` converts a k-mer error rate to per-base, since one wrong base breaks k overlapping k-mers). QV40 = 1 error/10 kb (the EBP/VGP floor), QV50 strong, ~QV60 = T2T-grade (1/Mb). The **spectra-cn plot** reads completeness and false duplication in one figure: a black "missing" peak at homozygous depth = real content absent; 2-copy k-mers under the 1-copy peak = uncollapsed haplotigs; error k-mers sit far left.
- **Approach:** Parse the short_summary.txt file using regex to capture completeness, duplication, fragmentation, and missing percentages.
+ ## EBP/VGP standards and phased QC
- ```python
- import re
+ The EBP minimum is **6.C.Q40**: `x.y.z` where x = log10 of contig NG50 (6 = 1 Mb), y = scaffold level (C = chromosome-scale), z = QV (40 = <1 error/10 kb). It is literally the triad turned into a label, and the bar moves - T2T pushed the achievable frontier to ~Q60/gapless, so bragging about QV40 in 2026 is hitting the floor. Match the bar to the organism (the relaxed "5" tier, >100 kb contig NG50, exists for low-input species). For phased diploid/trio assemblies, Merqury hap-mers (parental k-mers, or Hi-C) give the **switch error** (local haplotype flips within a block) and **hamming error** (global mis-assignment fraction) - report both, and read the hap-mer blob plot (cleanly phased contigs sit on one axis).
- def parse_busco_summary(summary_file):
- '''Parse BUSCO short summary.'''
- with open(summary_file) as f:
- text = f.read()
+ ## Per-Method Failure Modes
- pattern = r'C:(\d+\.\d+)%\[S:(\d+\.\d+)%,D:(\d+\.\d+)%\],F:(\d+\.\d+)%,M:(\d+\.\d+)%,n:(\d+)'
- match = re.search(pattern, text)
+ ### Leading with N50 (and stopping)
+ **Trigger:** reporting a single N50 as the quality verdict. **Mechanism:** N50 rises on thrown-away sequence, unbroken misjoins, and retained haplotigs; it is also a single unstable order-statistic. **Symptom:** big N50, unstated QV/completeness/NG50. **Fix:** report auN/NGx + BUSCO/compleasm + Merqury QV; treat N50-only claims as untrustworthy.
- if match:
- return {
- 'complete': float(match.group(1)),
- 'single': float(match.group(2)),
- 'duplicated': float(match.group(3)),
- 'fragmented': float(match.group(4)),
- 'missing': float(match.group(5)),
- 'total': int(match.group(6))
- }
- return None
+ ### QUAST against a divergent reference
+ **Trigger:** `quast.py -r congener.fa` on a novel genome. **Mechanism:** real inversions/SVs and SNPs between organism and reference are scored as "misassemblies"/"mismatches"; the count scales with divergence, not error. **Symptom:** "hundreds of misassemblies" on a correct assembly. **Fix:** use reference-free correctness (Inspector/CRAQ/Merqury); reserve QUAST structure for a same-organism reference.
- result = parse_busco_summary('busco_output/short_summary.txt')
- print(f"Complete: {result['complete']}%")
- ```
+ ### QV computed on the polishing reads
+ **Trigger:** QV from the exact reads used to polish. **Mechanism:** the polisher made the assembly agree with those reads by construction. **Symptom:** impressively high QV that rose after polishing with the QV reads. **Fix:** build the k-mer DB from accurate, ideally independent reads; consider merfin for multiplicity-corrected QV.
- ## MetaQUAST (Metagenomes)
+ ### High BUSCO-Duplicated read as success
+ **Trigger:** treating high BUSCO-D as "extra coverage / more complete". **Mechanism:** uncollapsed haplotigs (both alleles kept as separate primary contigs) vs real WGD vs split models. **Symptom:** D in high single digits to tens, assembly size >> GenomeScope2 estimate. **Fix:** triangulate size + spectra-cn 2-copy peak + asmgene false-dup; if no WGD -> purge_dups, then re-QC (watch for over-purge: size dropping below the estimate deletes real segmental duplications).
- **Goal:** Assess metagenome assembly quality accounting for multiple reference genomes.
+ ### QV/BUSCO accepted on an incomplete genome
+ **Trigger:** QV60 + BUSCO 99% taken as "done". **Mechanism:** QV is measured on what assembled; BUSCO scores the conserved easy core only. **Symptom:** high accuracy and gene-completeness while 8-15% of sequence (repeats/centromeres) is absent. **Fix:** add Merqury k-mer completeness (whole-genome) and inspect read mapping-rate/coverage uniformity.
- **Approach:** Run MetaQUAST which automatically identifies reference genomes and reports per-genome metrics.
+ ## Quantitative Thresholds
- ```bash
- metaquast.py metagenome_assembly.fa -o metaquast_output -t 16
- ```
+ | Threshold | Source | Rationale |
+ |-----------|--------|-----------|
+ | Merqury QV >= 40 | EBP/VGP minimum (Rhie 2021) | 1 error/10 kb; QV50 strong, ~Q60 T2T-grade; report the actual value |
+ | QV from polishing reads | circularity trap | always biased high; use independent/accurate reads, prefer merfin |
+ | BUSCO Complete >= 95%, Fragmented < 5% | field convention | read F+M with C; high F = contiguity/base-quality problem behind a good C% |
+ | BUSCO Duplicated ~1-3% (clean haploid); >5-8% no WGD | assembly norm | uncollapsed haplotigs -> purge_dups; cross-check size + spectra-cn + asmgene |
+ | compleasm preferred on good genomes | Huang & Li 2023 | BUSCO under-reports (~95.7% vs ~99.6% on human) due to its predictor |
+ | k-mer completeness (Merqury) >= 95% | field convention | lower = sequence absent that the BUSCO gene set cannot see |
+ | Contig NG50 >= 1 Mb (EBP "6") | Rhie 2021 / EBP standards | the 6.C.Q40 contig bar; relaxed "5" (>100 kb) for low-input species |
+ | Report auN/NGx, not bare N50 | Li (auN blog) | N50 is gameable and a single unstable order-statistic |
+ | NG/auN need a genome-size estimate | by definition | GenomeScope2/flow cytometry; couples contiguity to completeness |
- ## Troubleshooting
+ ## Common Errors
- ### Low N50
- - Check coverage depth
- - Consider longer reads
- - Try different assembler
+ | Error / symptom | Cause | Solution |
+ |-----------------|-------|----------|
+ | Big N50, no QV reported | leading with the most-gamed metric | add Merqury QV, k-mer completeness, auN/NGx |
+ | Hundreds of QUAST "misassemblies" on a novel genome | divergent reference; biology scored as error | reference-free (Inspector/CRAQ); QUAST only vs same organism |
+ | QV suspiciously high, rose after polishing | QV computed on the polishing reads (circular) | independent/accurate-read k-mer DB; merfin |
+ | Assembly ~1.5-2x expected size, high BUSCO-D | uncollapsed haplotigs (false duplication) | purge_dups; verify with spectra-cn + asmgene |
+ | Size drops below GenomeScope2 estimate after purging | over-purged real segmental duplications | back off purge stringency; check asmgene collapse direction |
+ | BUSCO low-90s on a HiFi/T2T assembly | BUSCO predictor misses present genes | re-run compleasm before concluding incompleteness |
+ | Scaffold N50 >> contig N50 reported as contiguity | contiguity is gap-Ns, not sequence | report contig N50 too; each gap is a join hypothesis |
- ### Low BUSCO Completeness
- - Check input read quality
- - Verify correct lineage dataset
- - May indicate real gene loss (compare to relatives)
+ ## References
- ### High Duplication in BUSCO
- - Normal for polyploids
- - May indicate contamination
- - Check for collapsed haplotypes
+ - Gurevich A, Saveliev V, Vyahhi N, Tesler G. 2013. QUAST: quality assessment tool for genome assemblies. *Bioinformatics* 29:1072-1075.
+ - Manni M, et al. 2021. BUSCO update: novel and streamlined workflows along with broader and deeper phylogenetic coverage for scoring of eukaryotic, prokaryotic, and viral genomes. *Mol Biol Evol* 38:4647-4654.
+ - Simão FA, et al. 2015. BUSCO: assessing genome assembly and annotation completeness with single-copy orthologs. *Bioinformatics* 31:3210-3212.
+ - Huang N, Li H. 2023. compleasm: a faster and more accurate reimplementation of BUSCO. *Bioinformatics* 39:btad595.
+ - Rhie A, Walenz BP, Koren S, Phillippy AM. 2020. Merqury: reference-free quality, completeness, and phasing assessment for genome assemblies. *Genome Biol* 21:245.
+ - Formenti G, et al. 2022. Merfin: improved variant filtering, assembly evaluation and polishing via k-mer validation. *Nat Methods* 19:696-704.
+ - Chen Y, et al. 2021. Accurate long-read de novo assembly evaluation with Inspector. *Genome Biol* 22:312.
+ - Li K, et al. 2023. CRAQ: identification of errors in draft genome assemblies at single-nucleotide resolution for quality assessment and improvement. *Nat Commun* 14:6556.
+ - Ranallo-Benavidez TR, Jaron KS, Schatz MC. 2020. GenomeScope 2.0 and Smudgeplot for reference-free profiling of polyploid genomes. *Nat Commun* 11:1432.
+ - Rhie A, et al. 2021. Towards complete and error-free genome assemblies of all vertebrate species (VGP). *Nature* 592:737-746.
+ - Li H. 2020. auN: a new metric to measure assembly contiguity. Blog post (lh3.github.io); auN/asmgene tools ship in minimap2/calN50 (Li 2018 *Bioinformatics* 34:3094-3100).
+ - Guan D, et al. 2020. Identifying and removing haplotypic duplication in primary genome assemblies (purge_dups). *Bioinformatics* 36:2896-2898.
## Related Skills
- - short-read-assembly - SPAdes assembly
- - long-read-assembly - Flye/Canu assembly
- - assembly-polishing - Improve accuracy
- - metagenomics - Metagenome analysis
+ - short-read-assembly - Short-read assemblies plateau at the repeat structure; QC shows it
+ - long-read-assembly - Produces the contiguous-but-error-prone contigs this QC evaluates
+ - hifi-assembly - Phased diploid output whose false duplication and switch/hamming error this QC checks
+ - assembly-polishing - Merqury QV plateau is the honest stop signal; never QV on the polishing reads
+ - scaffolding - Validate chromosome-scale joins (Hi-C/contact map) before trusting scaffold NG50
+ - contamination-detection - MAG completeness/contamination (CheckM2/GUNC/MIMAG) is a separate problem
+ - genome-profiling - GenomeScope2 genome-size estimate that NG50/auNG/spectra-cn require
+ - genome-annotation/annotation-qc - Assembly-side completeness; purge haplotigs before annotating
+ - workflows/genome-assembly-pipeline - End-to-end QC -> assemble -> polish -> scaffold -> QC