← Về thư mục
📄 / / profiles / r-and-d / raw_evidence / OpenAI4S / skills / bioskills / bio-genome-assembly-genome-profiling / references / usage-guide.md

Genome Profiling - Usage Guide

Overview

Genome profiling is the reference-free, pre-assembly step that turns raw sequencing reads into a k-mer frequency spectrum and models it to estimate the genome's size, heterozygosity, repeat content, and ploidy. Those four numbers are not trivia: they set the expected assembly size (the NG50 denominator and the haplotig sanity check), the genome-size parameter for assemblers like Flye, the homozygous-coverage and purge settings for hifiasm, and the up-front decision about whether short reads can even produce the assembly being requested. This skill counts k-mers with KMC or Jellyfish, models the spectrum with GenomeScope2, and infers ploidy independently with Smudgeplot, while flagging the common traps that make the estimate wrong: too-low coverage, noisy ONT reads, contamination spikes, a too-small k, and confusing k-mer coverage with sequencing coverage.

Prerequisites

Install the counters and modeling tools (Bioconda):

conda install -c bioconda kmc jellyfish genomescope2 smudgeplot merqury kat

Quick Start

Tell your AI agent what you want to do: - "Profile my genome from Illumina reads before I assemble" - "Estimate genome size and heterozygosity from these reads" - "Build a k-mer spectrum and run GenomeScope2" - "Figure out the ploidy of this non-model organism" - "Check whether my assembly is 2x too big because of haplotigs"

Example Prompts

Pre-assembly profiling

"I have 60x Illumina reads from an unknown beetle. Count 21-mers with KMC, run GenomeScope2 as diploid, and tell me the estimated genome size, heterozygosity, and repeat content, plus whether short reads will struggle with the heterozygosity."

Choosing k and counting

"My expected genome size is about 12 Mb. Use Merqury best_k.sh to pick k, count k-mers with that k, and run GenomeScope2 so I can set the genome-size parameter for Flye."

Ploidy inference

"GenomeScope2 fits poorly as diploid for this plant. Run Smudgeplot on the het k-mer pairs and tell me whether it looks triploid or tetraploid, and whether that disagrees with GenomeScope."

Diagnosing a bad spectrum

"The GenomeScope size estimate is twice what I expected and the spectrum has an extra peak. Help me decide whether this is contamination, an organelle spike, or a too-small k."

Sanity-checking an assembly

"My HiFi assembly is 1.8x the GenomeScope estimate and BUSCO Duplicated is high. Confirm whether this is uncollapsed haplotigs and what to do before reporting the genome size."

What the Agent Will Do

  1. Confirm the reads are accurate (Illumina/HiFi) and adequate depth (homozygous peak >= ~15-20x); route noisy-ONT-only cases to assemble-then-estimate.
  2. Choose k with Merqury best_k.sh from the expected genome size (k=21 for ~Gb genomes), using the same k for counting and modeling.
  3. Count k-mers with KMC (or Jellyfish with -C), keeping singletons (-ci1) and capping the tail (-cs10000) to build the histogram.
  4. Run GenomeScope2 with the matching -k and a starting ploidy -p, then read the model summary: haploid genome length, heterozygosity, and percent unique (repeat content).
  5. Interpret the spectrum: single vs het (AB) peak, repeat tail, organelle/contamination spikes; distinguish k-mer coverage (lambda) from sequencing depth.
  6. Run Smudgeplot to infer ploidy from het k-mer-pair coverage ratios and reconcile it with GenomeScope's -p.
  7. Hand the estimate downstream: the NG50 denominator and haplotig sanity check (assembly-qc), Flye -g, hifiasm --hom-cov/purge level, and the short-vs-long-read decision.

Tips