/bio-gatk-variant-calling
Variant calling with GATK HaplotypeCaller following best practices. Covers germline SNP/indel calling, GVCF workflow for cohorts, joint genotyping, and variant quality score recalibration (VQSR). Use when calling variants with GATK HaplotypeCaller.
$ npx -y skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-gatk-variant-calling --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/bio-gatk-variant-calling
Context preview
The summary Claude sees to decide when to auto-load this skill.
Variant calling with GATK HaplotypeCaller following best practices. Covers germline SNP/indel calling, GVCF workflow for cohorts, joint genotyping, and variant quality score recalibration (VQSR). Use when calling variants with GATK HaplotypeCaller.
SKILL.md
bio-gatk-variant-calling.SKILL.mdname: bio-gatk-variant-calling
description: Variant calling with GATK HaplotypeCaller following best practices. Covers germline SNP/indel calling, GVCF workflow for cohorts, joint genotyping, and variant quality score recalibration (VQSR). Use when calling variants with GATK HaplotypeCaller.
tool_type: cli
primary_tool: gatk
Version Compatibility
Reference examples tested with: GATK 4.5+, bcftools 1.19+
Before using code patterns, verify installed versions match. If versions differ:
- 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.
GATK Variant Calling
GATK HaplotypeCaller is the gold standard for germline variant calling. This skill covers the GATK Best Practices workflow.
Prerequisites
BAM files should be preprocessed: 1. Mark duplicates 2. Base quality score recalibration (BQSR) - optional but recommended
Single-Sample Calling
**Goal:** Call germline SNPs and indels from a single sample using HaplotypeCaller.
**Approach:** Run local de novo assembly of haplotypes in active regions to detect variants with optional annotation enrichment.
**"Call variants from my BAM file using GATK"** → Perform local haplotype assembly and genotyping on aligned reads using HaplotypeCaller.
Basic HaplotypeCaller
gatk HaplotypeCaller \
-R reference.fa \
-I sample.bam \
-O sample.vcf.gzWith Standard Annotations
gatk HaplotypeCaller \
-R reference.fa \
-I sample.bam \
-O sample.vcf.gz \
-A Coverage \
-A QualByDepth \
-A FisherStrand \
-A StrandOddsRatio \
-A MappingQualityRankSumTest \
-A ReadPosRankSumTestTarget Intervals (Exome/Panel)
gatk HaplotypeCaller \
-R reference.fa \
-I sample.bam \
-L targets.interval_list \
-O sample.vcf.gzAdjust Calling Confidence
gatk HaplotypeCaller \
-R reference.fa \
-I sample.bam \
-O sample.vcf.gz \
--standard-min-confidence-threshold-for-calling 20GVCF Workflow (Recommended for Cohorts)
**Goal:** Enable joint genotyping across a cohort by generating per-sample genomic VCFs.
**Approach:** Call each sample in GVCF mode (-ERC GVCF), combine into a GenomicsDB or merged GVCF, then jointly genotype.
The GVCF workflow enables joint genotyping across samples for better variant calls.
Step 1: Generate GVCFs per Sample
gatk HaplotypeCaller \
-R reference.fa \
-I sample.bam \
-O sample.g.vcf.gz \
-ERC GVCFStep 2: Combine GVCFs (GenomicsDBImport)
# Create sample map file
# sample_map.txt:
# sample1 /path/to/sample1.g.vcf.gz
# sample2 /path/to/sample2.g.vcf.gz
gatk GenomicsDBImport \
--genomicsdb-workspace-path genomicsdb \
--sample-name-map sample_map.txt \
-L intervals.interval_listAlternative: CombineGVCFs (smaller cohorts)
gatk CombineGVCFs \
-R reference.fa \
-V sample1.g.vcf.gz \
-V sample2.g.vcf.gz \
-V sample3.g.vcf.gz \
-O cohort.g.vcf.gzStep 3: Joint Genotyping
# From GenomicsDB
gatk GenotypeGVCFs \
-R reference.fa \
-V gendb://genomicsdb \
-O cohort.vcf.gz
# From combined GVCF
gatk GenotypeGVCFs \
-R reference.fa \
-V cohort.g.vcf.gz \
-O cohort.vcf.gzVariant Quality Score Recalibration (VQSR)
**Goal:** Apply machine learning-based variant filtering using known truth/training sets.
**Approach:** Build a Gaussian mixture model from annotation values at known sites, then apply a sensitivity threshold to classify variants.
Machine learning-based filtering using known variant sites. Requires many variants (WGS preferred).
SNP Recalibration
# Build SNP model
gatk VariantRecalibrator \
-R reference.fa \
-V cohort.vcf.gz \
--resource:hapmap,known=false,training=true,truth=true,prior=15.0 hapmap.vcf.gz \
--resource:omni,known=false,training=true,truth=false,prior=12.0 omni.vcf.gz \
--resource:1000G,known=false,training=true,truth=false,prior=10.0 1000G.vcf.gz \
--resource:dbsnp,known=true,training=false,truth=false,prior=2.0 dbsnp.vcf.gz \
-an QD -an MQ -an MQRankSum -an ReadPosRankSum -an FS -an SOR \
-mode SNP \
-O snp.recal \
--tranches-file snp.tranches
# Apply SNP filter
gatk ApplyVQSR \
-R reference.fa \
-V cohort.vcf.gz \
-O cohort.snp_recal.vcf.gz \
--recal-file snp.recal \
--tranches-file snp.tranches \
--truth-sensitivity-filter-level 99.5 \
-mode SNPIndel Recalibration
# Build Indel model
gatk VariantRecalibrator \
-R reference.fa \
-V cohort.snp_recal.vcf.gz \
--resource:mills,known=false,training=true,truth=true,prior=12.0 Mills.vcf.gz \
--resource:dbsnp,known=true,training=false,truth=false,prior=2.0 dbsnp.vcf.gz \
-an QD -an MQRankSum -an ReadPosRankSum -an FS -an SOR \
-mode INDEL \
--max-gaussians 4 \
-O indel.recal \
--tranches-file indel.tranches
# Apply Indel filter
gatk ApplyVQSR \
-R reference.fa \
-V cohort.snp_recal.vcf.gz \
-O cohort.vqsr.vcf.gz \
--recal-file indel.recal \
--tranches-file indel.tranches \
--truth-sensitivity-filter-level 99.0 \
-mode INDELHard Filtering (When VQSR Not Suitable)
**Goal:** Apply fixed-threshold filters when the dataset is too small for VQSR.
**Approach:** Separate SNPs and indels, apply GATK-recommended annotation thresholds, then merge results.
For small datasets, exomes, or single samples where VQSR fails.
Extract SNPs and Indels
gatk SelectVariants \
-R reference.fa \
-V cohort.vcf.gz \
--select-type-to-include SNP \
-O snps.vcf.gz
gatk SelectVariants \
-R reference.fa \
-V cohort.vcf.gz \
--select-type-to-include INDEL \
-O indels.vcf.gzApply Hard Filters
# Fi
Read more
name: bio-gatk-variant-calling description: Variant calling with GATK HaplotypeCaller following best practices. Covers germline SNP/indel calling, GVCF workflow for cohorts, joint genotyping, and variant quality score recalibration (VQSR). Use when calling variants with GATK HaplotypeCaller. tool_type: cli primary_tool: gatk
Version Compatibility
Reference examples tested with: GATK 4.5+, bcftools 1.19+
Before using code patterns, verify installed versions match. If versions differ:
- 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.
GATK Variant Calling
GATK HaplotypeCaller is the gold standard for germline variant calling. This skill covers the GATK Best Practices workflow.
Prerequisites
BAM files should be preprocessed: 1. Mark duplicates 2. Base quality score recalibration (BQSR) - optional but recommended
Single-Sample Calling
**Goal:** Call germline SNPs and indels from a single sample using HaplotypeCaller.
**Approach:** Run local de novo assembly of haplotypes in active regions to detect variants with optional annotation enrichment.
**"Call variants from my BAM file using GATK"** → Perform local haplotype assembly and genotyping on aligned reads using HaplotypeCaller.
Basic HaplotypeCaller
gatk HaplotypeCaller \
-R reference.fa \
-I sample.bam \
-O sample.vcf.gzWith Standard Annotations
gatk HaplotypeCaller \
-R reference.fa \
-I sample.bam \
-O sample.vcf.gz \
-A Coverage \
-A QualByDepth \
-A FisherStrand \
-A StrandOddsRatio \
-A MappingQualityRankSumTest \
-A ReadPosRankSumTestTarget Intervals (Exome/Panel)
gatk HaplotypeCaller \
-R reference.fa \
-I sample.bam \
-L targets.interval_list \
-O sample.vcf.gzAdjust Calling Confidence
gatk HaplotypeCaller \
-R reference.fa \
-I sample.bam \
-O sample.vcf.gz \
--standard-min-confidence-threshold-for-calling 20GVCF Workflow (Recommended for Cohorts)
**Goal:** Enable joint genotyping across a cohort by generating per-sample genomic VCFs.
**Approach:** Call each sample in GVCF mode (-ERC GVCF), combine into a GenomicsDB or merged GVCF, then jointly genotype.
The GVCF workflow enables joint genotyping across samples for better variant calls.
Step 1: Generate GVCFs per Sample
gatk HaplotypeCaller \
-R reference.fa \
-I sample.bam \
-O sample.g.vcf.gz \
-ERC GVCFStep 2: Combine GVCFs (GenomicsDBImport)
# Create sample map file
# sample_map.txt:
# sample1 /path/to/sample1.g.vcf.gz
# sample2 /path/to/sample2.g.vcf.gz
gatk GenomicsDBImport \
--genomicsdb-workspace-path genomicsdb \
--sample-name-map sample_map.txt \
-L intervals.interval_listAlternative: CombineGVCFs (smaller cohorts)
gatk CombineGVCFs \
-R reference.fa \
-V sample1.g.vcf.gz \
-V sample2.g.vcf.gz \
-V sample3.g.vcf.gz \
-O cohort.g.vcf.gzStep 3: Joint Genotyping
# From GenomicsDB
gatk GenotypeGVCFs \
-R reference.fa \
-V gendb://genomicsdb \
-O cohort.vcf.gz
# From combined GVCF
gatk GenotypeGVCFs \
-R reference.fa \
-V cohort.g.vcf.gz \
-O cohort.vcf.gzVariant Quality Score Recalibration (VQSR)
**Goal:** Apply machine learning-based variant filtering using known truth/training sets.
**Approach:** Build a Gaussian mixture model from annotation values at known sites, then apply a sensitivity threshold to classify variants.
Machine learning-based filtering using known variant sites. Requires many variants (WGS preferred).
SNP Recalibration
# Build SNP model
gatk VariantRecalibrator \
-R reference.fa \
-V cohort.vcf.gz \
--resource:hapmap,known=false,training=true,truth=true,prior=15.0 hapmap.vcf.gz \
--resource:omni,known=false,training=true,truth=false,prior=12.0 omni.vcf.gz \
--resource:1000G,known=false,training=true,truth=false,prior=10.0 1000G.vcf.gz \
--resource:dbsnp,known=true,training=false,truth=false,prior=2.0 dbsnp.vcf.gz \
-an QD -an MQ -an MQRankSum -an ReadPosRankSum -an FS -an SOR \
-mode SNP \
-O snp.recal \
--tranches-file snp.tranches
# Apply SNP filter
gatk ApplyVQSR \
-R reference.fa \
-V cohort.vcf.gz \
-O cohort.snp_recal.vcf.gz \
--recal-file snp.recal \
--tranches-file snp.tranches \
--truth-sensitivity-filter-level 99.5 \
-mode SNPIndel Recalibration
# Build Indel model
gatk VariantRecalibrator \
-R reference.fa \
-V cohort.snp_recal.vcf.gz \
--resource:mills,known=false,training=true,truth=true,prior=12.0 Mills.vcf.gz \
--resource:dbsnp,known=true,training=false,truth=false,prior=2.0 dbsnp.vcf.gz \
-an QD -an MQRankSum -an ReadPosRankSum -an FS -an SOR \
-mode INDEL \
--max-gaussians 4 \
-O indel.recal \
--tranches-file indel.tranches
# Apply Indel filter
gatk ApplyVQSR \
-R reference.fa \
-V cohort.snp_recal.vcf.gz \
-O cohort.vqsr.vcf.gz \
--recal-file indel.recal \
--tranches-file indel.tranches \
--truth-sensitivity-filter-level 99.0 \
-mode INDELHard Filtering (When VQSR Not Suitable)
**Goal:** Apply fixed-threshold filters when the dataset is too small for VQSR.
**Approach:** Separate SNPs and indels, apply GATK-recommended annotation thresholds, then merge results.
For small datasets, exomes, or single samples where VQSR fails.
Extract SNPs and Indels
gatk SelectVariants \
-R reference.fa \
-V cohort.vcf.gz \
--select-type-to-include SNP \
-O snps.vcf.gz
gatk SelectVariants \
-R reference.fa \
-V cohort.vcf.gz \
--select-type-to-include INDEL \
-O indels.vcf.gzApply Hard Filters
# Fi
The largest open-source medical AI skill library for OpenClaw.
Other skills on openclaw-medical-skills.
- /aav-vector-design-agent
<!--
Open skill - /adaptyv
Cloud laboratory platform for automated protein testing and validation. Use when designing proteins and needing experimental validation including binding assays, expression testing, thermostability measurements, enzyme activity assays, or protein sequence optimization. Also use
Open skill - /adhd-daily-planner
Time-blind friendly planning, executive function support, and daily structure for ADHD brains. Specializes in realistic time estimation, dopamine-aware task design, and building systems that
Open skill - /aeon
This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search. Use when working with temporal data, sequential patterns, or time-indexed observations
Open skill - /agent-browser
Browse the web for any task — research topics, read articles, interact with web apps, fill forms, take screenshots, extract data, and test web pages. Use whenever a browser would be useful, not just when the user explicitly asks.
Open skill - /agentd-drug-discovery
<!--
Open skill

