Skip to content
Skills Library
Science & research · Analysis

variant-calling

/variant-calling

Germline and somatic short-variant calling pipeline for Illumina short-read data. Use when the user mentions BWA, BWA-MEM2, GATK, HaplotypeCaller, Mutect2, VCF, GVCF, VQSR, variant calling, germline, somatic, SNV, or indel calling from FASTQ/BAM.

Licence
MIT
Last repository change
02.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
3
Scripts
2
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 02.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • 2 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: scripts/filter_by_acmg.py, scripts/run_germline_pipeline.sh

What it does and when to use it

Germline and somatic short-variant calling pipeline for Illumina short-read data. Use when the user mentions BWA, BWA-MEM2, GATK, HaplotypeCaller, Mutect2, VCF, GVCF, VQSR, variant calling, germline, somatic, SNV, or indel calling from FASTQ/BAM.

Original author description

Germline and somatic short-variant calling pipeline for Illumina short-read data. Use when the user mentions BWA, BWA-MEM2, GATK, HaplotypeCaller, Mutect2, VCF, GVCF, VQSR, variant calling, germline, somatic, SNV, or indel calling from FASTQ/BAM.

How it works

  1. Overview
  2. Usage
  3. Core Concepts
  4. Decision Logic
  5. Critical Parameters
  6. Common Mistakes
  7. Response Format
Original SKILL.md headings · 108 lines, 646 words
SKILL.md preview
---
name: variant-calling
description: Germline and somatic short-variant calling pipeline for Illumina short-read data. Use when the user mentions BWA, BWA-MEM2, GATK, HaplotypeCaller, Mutect2, VCF, GVCF, VQSR, variant calling, germline, somatic, SNV, or indel calling from FASTQ/BAM.
usage: Invoke when running germline or somatic variant calling with BWA-MEM2, GATK4 HaplotypeCaller, Mutect2, or VQSR.
version: 1.0.0
validated_against:
  date: 2025-01-15
  packages: {gatk: "4.5", bwa-mem2: "2.2.1", samtools: "1.19"}
tags: [skill, category:pipeline, genomics, variant-calling, gatk, bwa, hcls]
---

# Variant Calling (GATK4) — Pipeline Skill (Thin Scaffold)

## Overview

Adds decision logic for VQSR vs hard filters, WES vs WGS parameter differences, and GATK4-specific gotchas that LLMs frequently get wrong (filter thresholds, GVCF requirements, reference consistency).

## Usage

- Activate when choosing between VQSR and hard filters for a given cohort size
- Activate when setting up WES vs WGS pipeline parameters
- Activate when running Mutect2 tumor/normal or tumor-only somatic calling

## Core Concepts

## Decision Logic

```
Germline calling strategy:
├── Single sample, no future joint calling → HaplotypeCaller direct VCF
└── Cohort (≥2 samples) → HaplotypeCaller -ERC GVCF → GenomicsDBImport → GenotypeGVCFs

Filtering strategy:
├── ≥30 WGS samples OR ≥30 WES exomes → VQSR
└── <30 samples OR single sample → Hard filters

Somatic calling:
├── Tumor + matched normal → Mutect2 with both BAMs
└── Tumor-only → Mutect2 + PoN (MANDATORY) + gnomAD germline resource
```

**WES vs WGS parameter differences:**

| Step | WGS | WES |
|------|-----|-----|
| BQSR / HaplotypeCaller | No `-L` | `-L capture.bed -ip 100` |
| Known sites for BQSR | Genome-wide | Genome-wide (do NOT subset) |
| Filtering | VQSR (≥30 samples) | Hard filters unless ≥30 exomes |
| Joint genotyping intervals | Per-chromosome | `-L capture.bed` |

## Critical Parameters

**Hard filter thresholds (GATK Best Practices):**

| Filter | SNP threshold | Indel threshold |
|--------|--------------|-----------------|
| QD | < 2.0 | < 2.0 |
| FS | > 60.0 | > 200.0 |
| MQ | < 40.0 | — |
| MQRankSum | < -12.5 | — |
| ReadPosRankSum | < -8.0 | < -20.0 |
| SOR | > 3.0 | > 10.0 |

**VQSR truth sensitivity levels:**
- SNPs: 99.7
- Indels: 99.0
- Indel `--max-gaussians 4` (fewer training variants than SNPs)

**VQSR annotations:** `-an QD -an FS -an MQ -an MQRankSum -an ReadPosRankSum -an SOR`

**Mutect2 essentials:**
- `--germline-resource af-only-gnomad.hg38.vcf.gz`
- `--panel-of-normals pon.vcf.gz` (essential for tumor-only)
- `--f1r2-tar-gz` → `LearnReadOrientationModel` (FFPE/OxoG artifacts)
- `GetPileupSummaries` + `CalculateContamination` before `FilterMutectCalls`

## Common Mistakes

- **Wrong:** Aligning without proper `@RG` headers (missing ID, SM, PL, LB)
  **Right:** Always specify at alignment: `-R '@RG\tID:x\tSM:x\tPL:ILLUMINA\tLB:x'`
  **Why:** GATK refuses to run or silently merges samples when SM tags are wrong

- **Wrong:** Running HaplotypeCaller without `-ERC GVCF` for cohort analysis
  **Right:** Always produce GVCFs when joint genotyping will be performed
  **Why:** Regular VCFs cannot be joint-genotyped; must re-call from BAM

- **Wrong:** Reusing SNP hard-filter thresholds for indels (e.g., `FS > 60` for indels)
  **Right:** Use `FS > 200` for indels, `FS > 60` for SNPs
  **Why:** Indels tolerate higher strand bias; SNP thresholds over-filter real indels

- **Wrong:** Applying VQSR to <30 samples
  **Right:** Use hard filters for small cohorts
  **Why:** VQSR needs many variants to train its Gaussian mixture model

- **Wrong:** Subsetting `--known-sites` VCFs to WES capture BED for BQSR
  **Right:** Use genome-wide known-sites; only restrict analysis intervals via `-L`
  **Why:** BQSR needs genome-wide known sites to model base quality errors

- **Wrong:** Skipping `samtools index` between GATK steps
  **Right:** Index after every BAM-producing step
  **Why:** GATK requires BAM indices; missing them causes immediate failure

- **Wrong:** Mixing reference files from different genome builds
  **Right:** Ensure ref.dict, ref.fa.fai, BWA index, and all VCFs match the same build
  **Why:** Mismatched dictionaries cause silent failures or cryptic errors

- **Wrong:** Running Mutect2 tumor-only without a panel of normals
  **Right:** Always provide `--panel-of-normals` for tumor-only calling
  **Why:** Without PoN, recurrent sequencing artifacts are called as somatic mutations

## Response Format

- Lead with the command or code the user needs — explain after
- Structure as: confirm inputs → working code → key parameters explained → gotchas
- One complete working example per task; do not show every alternative
- Keep code comments minimal and functional (what, not why-it-exists)
- Target: 50-100 lines of code with brief surrounding explanation
Files in this package (3)
  • SKILL.md 5 KB
  • scripts/filter_by_acmg.py 13 KB
  • scripts/run_germline_pipeline.sh 10 KB

Versions

The database has no other skills named variant-calling.

Database snapshot: 13.11.2026 · package version b4fa5e77a348 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100alterlab-nf-core-sarek
    Runs FASTQ-to-VCF germline and somatic variant calling via the Nextflow nf-core/sarek pipeline pinned to -r 3.10.0 — builds the samplesheet.csv (patient, sex, status, sample, lane, fastq_1, fastq_2), runs bwa-mem/bwa-mem2/dragmap alignment plus GATK4 MarkDuplicates and BQSR…
  • 95bio-workflows-fastq-to-variants
    Orchestrates the end-to-end germline short-variant pipeline from FASTQ to a filtered, normalized, benchmarked VCF, chaining QC/trim, BWA-MEM2 alignment, duplicate marking, optional BQSR, calling (bcftools/GATK HaplotypeCaller/DeepVariant/DRAGEN), normalization, site+genotype…
  • 95bio-variant-calling-filtering-best-practices
    Filters germline and somatic variant callsets at the site and genotype level with GATK VQSR (VQSLOD, truth-sensitivity tranches), VETS/ScoreVariantAnnotations, NVScoreVariants, hard filters with per-annotation thresholds, and bcftools/cyvcf2 expressions, plus Ti/Tv-based QC. Use…
  • 100alterlab-pysam
    Read and write genomic alignment and variant files in Python with pysam (htslib bindings) — SAM/BAM/CRAM alignments, VCF/BCF variants, and FASTA/FASTQ sequences, plus region extraction and per-base coverage/pileup. Use when scripting NGS data-processing pipelines that parse,…
  • 90refdata-benchmark-somatic-seqc2
    Measure somatic SNV/indel recall and precision of a caller or pipeline against the SEQC2 HCC1395 truth set (v1.2.1, High-Confidence_Regions_v1.2.bed) with som.py or rtg vcfeval, restricted to confident regions and targets, stratified by GIAB regions and VAF. Use when validating…
  • 100refdata-benchmark-somatic-hg008
    Benchmark somatic SNV/indel (and SV/CNV) calls on the GIAB HG008 pancreatic tumor/normal pair against the NIST draft benchmarks (smvar V0.4, SV-CNV V0.6 at writing; verify latest) with aardvark, rtg vcfeval or hap.py; covers data location, BED choice, VAF filtering and…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.