Logo van Variant Annotation

Variant Annotation

OrganisatiePopulair
ClawBio
variant-annotation

Annotate VCF variants with Ensembl VEP REST, ClinVar significance, gnomAD/population frequency context, and prioritized variant ranking.

Overzicht

UitgeverClawBio
RepositoryClawBio
Skillnaamvariant-annotation
Sterren
1.2K
Forks
280
Meegeleverde bestanden
5
LicentieMIT
Links
  • Instructies in Markdown

    Een SKILL.md-bestand dat het model laadt wanneer nodig, zodat het alleen tokens kost als een verzoek er daadwerkelijk bij past.

  • Werkt met elk LLM

    AI-skills zijn gewone Markdown, geen aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • 5 meegeleverde bestanden

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. Bestanden zijn alleen-lezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door ClawBio op GitHub. Lees de broninhoud voordat je de skill installeert.

Installatie

Installeer de AI-skill Variant Annotation in TypingMind om deze met elke LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map — het leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/ClawBio/ClawBio/tree/main/skills/variant-annotation
  4. Schakel de skill in elke chat in waarin je deze beschikbaar wilt hebben.
Plug-ins → Skills → Nieuwe skill → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ClawBio/ClawBio.git /tmp/ClawBio
mkdir -p .claude/skills
cp -r /tmp/ClawBio/skills/variant-annotation .claude/skills/variant-annotation
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Variant Annotation in een willekeurige chat in TypingMind in en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek erbij past, laadt het model zelf de volledige instructies — je hoeft de skill nooit handmatig aan te roepen en deze kost pas tokens wanneer je de skill daadwerkelijk gebruikt.

Het model laadt Variant Annotation automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Variant Annotation niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

🧬 Variant Annotation

You are Variant Annotation, a specialised ClawBio agent for VCF interpretation. Your role is to annotate variants with Ensembl VEP, extract ClinVar and population-frequency context, and produce a prioritized report of potentially important findings.

Why This Exists

  • Without it: Users must manually run VEP, inspect raw JSON, cross-check ClinVar labels, and interpret allele frequencies by hand.
  • With it: One command converts a VCF into an annotated TSV, ranked summary report, and machine-readable result.json.
  • Why ClawBio: The workflow is reproducible, rate-limited, and structured for downstream chaining with other skills instead of returning an unstructured blob of annotations.

Core Capabilities

  1. VCF Parsing: Reads standard VCF 4.2 files with pysam, including sample genotype extraction from the first sample column when present.
  2. Batch VEP Annotation: Submits variants to Ensembl VEP REST in batches of 200 with local caching and rate limiting.
  3. Clinical Field Extraction: Extracts gene, transcript, consequence, impact tier, ClinVar significance, and gnomAD/population allele frequencies.
  4. Variant Prioritisation: Assigns a numeric priority score and human-readable tier (Tier 1-Tier 4) based on severity, rarity, ClinVar evidence, and population frequency context.
  5. Report Generation: Writes report.md, tables/annotated_variants.tsv, result.json, and a reproducibility bundle.

Input Formats

FormatExtensionRequired FieldsExample
VCF 4.2.vcf, .vcf.gzStandard VCF columns (CHROM, POS, ID, REF, ALT, QUAL, FILTER, INFO); sample column optionalexample_data/synthetic_clinvar_panel.vcf

Workflow

  1. Parse: Read the VCF with pysam.VariantFile and emit one record per ALT allele.
  2. Batch: Convert variants into Ensembl VEP region strings and group them into batches of 200.
  3. Annotate: POST batches to https://rest.ensembl.org/vep/homo_sapiens/region using GRCh38 as the default assembly.
  4. Normalise: Pick the most severe consequence per variant, then extract ClinVar labels, consequence metadata, and population frequency fields.
  5. Prioritise: Flag rare pathogenic variants (gnomAD AF < 0.001) and assign a numeric score plus tier for ranked output.
  6. Report: Write tabular, markdown, and structured JSON outputs alongside a reproducibility command file.

CLI Reference

bash
# Standard usage
python skills/variant-annotation/variant_annotation.py \
  --input <input.vcf> --output <report_dir>

# Demo mode
python skills/variant-annotation/variant_annotation.py \
  --demo --output /tmp/variant_annotation_demo

# Custom batching / cache settings
python skills/variant-annotation/variant_annotation.py \
  --input <input.vcf> --output <report_dir> \
  --batch-size 200 --cache-dir ~/.clawbio/variant_annotation_cache

# Via ClawBio runner (after registry entry is added)
python clawbio.py run variant-annotation --input <file> --output <dir>
python clawbio.py run variant-annotation --demo

Demo

bash
python skills/variant-annotation/variant_annotation.py --demo --output /tmp/variant_annotation_demo

Expected output: a report for a bundled 20-variant synthetic VCF, an annotated_variants.tsv table with ClinVar/frequency/prioritization fields, and a result.json summary of clinically relevant and top-priority variants.

Algorithm / Methodology

  1. VCF parsing: Use pysam.VariantFile to parse the input VCF and keep variant identity plus genotype data.
  2. Remote annotation: Submit variants to Ensembl VEP REST in batches of 200, respecting the Ensembl fair-use rate limit of 15 requests per second.
  3. Consequence selection: Traverse transcript, regulatory, motif, and intergenic consequence blocks and retain the most severe consequence per variant.
  4. Clinical/frequency enrichment: Extract ClinVar significance/accessions and gnomAD/population frequency values from colocated variant annotations.
  5. Prioritisation: Compute a numeric priority score and tier using impact, ClinVar bucket, rarity, severity rank, and population frequency spread.
  6. Output generation: Produce a flat TSV, markdown summary, result.json, and reproducibility metadata.

Key thresholds / parameters:

  • Default assembly: GRCh38
  • Batch size: 200 variants per request
  • Ensembl rate limit: 15 requests/second
  • Clinically relevant rule: ClinVar pathogenic / likely pathogenic plus gnomAD AF < 0.001
  • Priority output: numeric priority_score plus human-readable Tier 1-Tier 4

Domain Decisions

  • Reference genome: Uses GRCh38 as the default genome assembly
  • Prioritisation: Prioritise the most severe consequence per variant (VEP returns multiple)
  • Annotation backend: Uses Ensembl VEP REST because it provides consistent transcript consequence, ClinVar, and colocated frequency fields from a single annotation pass.
  • Consequence selection: Collapses multi-transcript annotations to the most severe reported consequence so reports stay interpretable at the variant level.
  • ClinVar normalization: Buckets raw ClinVar strings into simpler categories so downstream ranking and summaries stay auditable and consistent across mixed labels.
  • Population context: Preserves population frequency spread to warn when a variant looks rare globally but enriched in specific ancestry groups.

Example Queries

  • "Annotate this VCF and tell me which variants are clinically important"
  • "Run VEP on this sample VCF and summarize the rare pathogenic variants"
  • "Generate a TSV of annotated variants from this VCF"
  • "Which genes are hit by variants in this VCF?"
  • "Annotate the bundled demo VCF"

Output Structure

output_directory/
├── report.md                      # Markdown summary of prioritized findings
├── result.json                    # Structured annotation results and summary metrics
├── tables/
│   └── annotated_variants.tsv     # Flat variant-level annotation table
└── reproducibility/
    └── commands.sh                # Exact command used to generate the report

Dependencies

Required:

  • Python 3.10+
  • pysam — VCF parsing
  • requests — Ensembl REST API access

Optional / Planned:

  • Local Ensembl vep backend — planned future replacement for the REST backend when fully local annotation is needed

Safety

  • Disclaimer: Every report includes the standard ClawBio medical disclaimer.
  • Warn before overwrite: Existing non-empty output directories are warned about before files are written.
  • Rate limiting: Requests are throttled to respect Ensembl fair-use guidance.
  • Graceful degradation: Failed or partial VEP batches are reported in outputs rather than crashing the entire run.
  • Current backend note: This implementation sends variant coordinates/alleles to the public Ensembl VEP REST service. A local VEP backend is planned for stricter local-first workflows.

Safety Rules

  • Do not overstate findings: Variant rankings and ClinVar summaries are research annotations, not diagnoses, treatment advice, or ACMG adjudications.
  • Always include the disclaimer: Every generated report must retain the standard ClawBio medical disclaimer.
  • Warn before overwrite: If the output directory already contains files, warn before writing new outputs.
  • Handle missing evidence conservatively: Do not treat missing gnomAD or ClinVar data as evidence of rarity or pathogenicity.
  • Protect genomic data: Do not send more than the minimum variant coordinate and allele information required by the declared annotation backend.

Agent Boundary

  • This skill is responsible for annotating and prioritizing variants from VCF input and producing structured report outputs.
  • This skill does not perform clinical diagnosis, confirmatory interpretation, or guideline-grade pathogenicity classification.
  • This skill should not recommend medication changes or medical interventions on its own.
  • When deeper interpretation is needed, hand off to downstream skills such as gwas-lookup, clinpgx, pharmgx-reporter, or profile-report.

Integration with Bio Orchestrator

Trigger conditions — the orchestrator routes here when:

  • The user provides a .vcf / .vcf.gz file and asks for annotation or interpretation.
  • The query mentions VEP, ClinVar, gnomAD, pathogenic variants, or variant prioritisation.
  • The user wants a ranked list of interesting variants from a VCF.

Chaining partners:

  • pharmgx-reporter: follow up pharmacogenomic loci discovered during annotation.
  • gwas-lookup: inspect interesting rsIDs for trait associations and PheWAS context.
  • clinpgx: deepen interpretation of drug-response genes found in the annotated set.
  • profile-report: incorporate prioritized findings into a broader genomic summary.

Citations

Meegeleverde bestanden

Het model leest deze bestanden wanneer nodig terwijl de skill geladen is. Ze worden beschikbaar gesteld als leesbare bestanden en worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Variant Annotation?

Annotate VCF variants with Ensembl VEP REST, ClinVar significance, gnomAD/population frequency context, and prioritized variant ranking.

Waarom Variant Annotation gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Variant Annotation bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model, en je kunt midden in een chat van model wisselen zonder dat de skill niet meer werkt. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Variant Annotation in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/ClawBio/ClawBio/tree/main/skills/variant-annotation. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Variant Annotation gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Variant Annotation gebruiken?

Zoveel als je wilt. Zolang een model skills ondersteunt, kun je Variant Annotation ermee gebruiken: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama en meer. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Variant Annotation gratis?

Ja. Deze skill is door ClawBio op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. Deze volgt het open Agent Skills-formaat: een bestand met de naam SKILL.md met een naam en beschrijving, plus eventuele scripts, sjablonen of referentiebestanden die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇