← Về thư mục
📄 / / profiles / r-and-d / raw_evidence / OpenAI4S / skills / bioskills / bio-long-read-sequencing-clair3-variants / references / usage-guide.md

Clair3 Variant Calling - Usage Guide

Overview

Clair3 calls germline small variants (SNPs and small indels) from Oxford Nanopore and PacBio HiFi long reads using a two-stage deep-learning design: a fast pileup model handles most sites and a slow full-alignment model re-evaluates the hard ones on phased reads. The single most important operational fact is that the model is hand-picked and must match how the reads were basecalled - there is no auto-detection, and a mismatch silently degrades accuracy. ONT indels in homopolymers and short tandem repeats are the residual error mode that a single genome-wide F1 hides, so benchmarking must be stratified. Clair3 is germline-only; somatic, mosaic, trio, and RNA calling belong to the ClairS / Clair3-Trio / Clair3-RNA family.

Prerequisites

conda install -c bioconda clair3 whatshap bcftools samtools
# hap.py (with RTG vcfeval) for benchmarking; GIAB truth + stratification BEDs
# The full ONT model set (every version, hac/fast, _with_mv) is in the rerio repo:
#   https://github.com/nanoporetech/rerio  ->  clair3_models/

Quick Start

Tell your AI agent what you want to do: - "Call germline variants from my ONT R10 BAM with the matching Clair3 model" - "Which Clair3 model matches reads basecalled with Dorado sup v5.0.0?" - "Phase my Clair3 calls and produce a haplotagged BAM" - "Benchmark my Clair3 calls against GIAB HG002 with stratification"

Example Prompts

Model matching

"My reads were basecalled with Dorado sup v5.0.0 on R10.4.1. Pick the matching Clair3 model, call germline variants from the BAM, and confirm the model is not a version mismatch."

Non-human reference

"Call variants from my bacterial Nanopore BAM against a draft assembly. Make sure Clair3 does not silently return nothing because the contigs are not named like human chromosomes."

Phasing

"Run Clair3 with phasing enabled using LongPhase, and give me a haplotagged BAM for allele-specific methylation."

Stratified benchmarking

"Benchmark my ONT Clair3 VCF against GIAB HG002 with hap.py and GIAB stratifications, and tell me the indel F1 inside homopolymer and low-complexity regions specifically."

Boundary

"I want to find low-VAF somatic variants in a tumor. Is Clair3 the right tool?"

What the Agent Will Do

  1. Read the basecaller model from the run metadata and pick the matching Clair3 model (chemistry, tier, version, _with_mv if applicable).
  2. Run run_clair3.sh with the correct --platform and --model_path, adding --include_all_ctgs for non-human references.
  3. Optionally enable phasing (WhatsHap default, LongPhase for speed/SV-awareness) and produce a haplotagged BAM.
  4. Index and summarize merge_output.vcf.gz (or phased_merge_output.vcf.gz when phasing is enabled; merge_output.vcf.gz itself stays unphased).
  5. Benchmark against GIAB with hap.py/vcfeval and GIAB stratifications, reporting homopolymer/STR strata separately.
  6. Redirect somatic/mosaic/trio/RNA requests to the appropriate Clair3-family tool.

Tips

Resources