tooluniverse-variant-analysis

Parse, filter, classify, and annotate VCF variants with clinical databases.

1.7k|254|Updated Mar 3, 2025
One-click install
npx skills add https://github.com/mims-harvard/ToolUniverse --skill tooluniverse-variant-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tooluniverse-variant-analysis
Source: https://github.com/mims-harvard/ToolUniverse/tree/main/plugins/tooluniverse/skills/tooluniverse-variant-analysis
Command: npx skills add https://github.com/mims-harvard/ToolUniverse --skill tooluniverse-variant-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pandas, cyvcf2, tooluniverse, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Analyzing VCF files requires correctly handling multi-sample genotypes, VAF extraction from inconsistent FORMAT fields, mutation type classification from SnpEff/VEP/Funcotator annotations, and subtle denominator conventions (coding-only subsets) that commonly produce wrong answers when done ad hoc.

Core Features & Use Cases

  • VCF Parsing and Statistics: Pure Python or cyvcf2 parsing of VCF 4.x files (gzipped, multi-sample, SNV/indel/SV) with Ti/Tv ratios, mutation type distributions, and per-sample VAF/depth summaries.
  • Filtering and Fraction Questions: Bundled scripts answer canonical questions like "fraction of variants with VAF < 0.3 that are synonymous" using the correct coding-variant denominator, and count coding variants per sample after excluding intronic/intergenic/UTR records.
  • Clinical Annotation: Batch annotation via MyVariant.info, ClinVar, gnomAD, dbSNP, CADD, plus ClinGen dosage sensitivity scoring for SV/CNV pathogenicity classification.
  • Use Case: Given a tumor VCF, filter to PASS variants with VAF >= 0.1 and depth >= 20, classify mutation types, annotate the top 50 variants with ClinVar and gnomAD, and generate a Markdown analysis report.

Quick Start

Ask the AI to parse your VCF file and report how many missense variants have VAF below 0.3, optionally annotating the results with ClinVar and gnomAD.

Frequently Asked Questions about tooluniverse-variant-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I calculate the fraction of variants below a VAF threshold that are missense?

Use the bundled variant_fraction.py script with the VAF threshold and annotation term. The denominator must be coding variants only (synonymous, missense, stop_gained, frameshift, splice_region, inframe indels), not all records, which are dominated by intronic variants.

How do I count SNPs and indels called by GATK HaplotypeCaller from a BAM file?

Run the bundled gatk_haplotypecaller_pipeline.py with the reference FASTA and BAM, or count an existing VCF with bcftools view --types snps or indels. Do not apply PASS or QUAL filters when the question asks how many variants were identified.

Does the VCF parser work without cyvcf2 installed?

Yes, the skill includes a pure Python streaming parser that handles VCF 4.x, gzipped files, and multi-sample FORMAT fields. cyvcf2 is optional and recommended only for files with more than 100K variants.

Why are all mutation types showing as unknown after parsing my VCF?

The VCF lacks annotation in its INFO field (no SnpEff ANN, VEP CSQ, or Funcotator FUNCOTATION). Either pre-annotate with SnpEff or VEP, or enable ToolUniverse annotation to retrieve consequences from MyVariant.info or Ensembl VEP.

How do I handle clinical variant Excel exports with two-row headers?

Read them with pandas using header=[0,1] and address columns as tuples, since single-row parsing leaves sub-columns as Unnamed and silently loses VAF and Sequence Ontology data. The bundled coding_variant_filter.py handles this automatically with --header-rows 2.

What are the limitations of variant annotation through ToolUniverse?

Annotation is API-based and rate-limited, so batches are capped around 50-100 variants. The gnomAD tool returns basic metadata only; use MyVariant.info for allele frequencies. Multi-allelic variants are classified using the first ALT allele.