agentleFS
Scientific-ToolingScientific-Tooling/structured-intelligence/skills/genome-variant-filtering/SKILL.md

genome-variant-filtering

Skill4 starsChanged 12 days agoMITView on GitHub

Filter raw variant calls using GATK VQSR, GATK hard filters, or bcftools expression-based filtering.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If hard-filter: split VCF into SNPs and indels with gatk SelectVariants.

    line 28
  2. Very specific:

    If VQSR: run gatk VariantRecalibrator + gatk ApplyVQSR for SNPs then indels with resource annotations.

    line 32
  3. Very specific:

    If bcftools: apply user-provided filter expressions via bcftools filter.

    line 33

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Skill: genome-variant-filtering

Use When

  • User wants to filter a raw VCF to remove low-confidence variants.
  • User needs to apply GATK best-practice hard filters or VQSR.
  • User wants to use custom bcftools filter expressions.
  • User needs to separate SNPs from indels for different filter strategies.

Inputs

  • Required:
    • Raw VCF file (.vcf.gz).
    • Reference FASTA (for GATK operations).
  • Optional:
    • Filter strategy: vqsr, hard, or bcftools (default: hard).
    • Resource VCFs for VQSR: HapMap, Omni, 1000 Genomes, dbSNP.
    • Custom filter expressions (for bcftools mode).
    • Truth sensitivity level for VQSR (default: 99.5 for SNPs, 99.0 for indels).

Workflow

  1. If hard-filter: split VCF into SNPs and indels with gatk SelectVariants.
  2. Apply GATK recommended hard filters:
    • SNPs: QD < 2.0, FS > 60.0, MQ < 40.0, MQRankSum < -12.5, ReadPosRankSum < -8.0.
    • Indels: QD < 2.0, FS > 200.0, ReadPosRankSum < -20.0.
  3. If VQSR: run gatk VariantRecalibrator + gatk ApplyVQSR for SNPs then indels with resource annotations.
  4. If bcftools: apply user-provided filter expressions via bcftools filter.
  5. Merge filtered SNPs and indels back into a single VCF.
  6. Index the output VCF.
  7. Report: variants before and after filtering, pass rate, filter category breakdown.

Output Contract

  • Filtered VCF file (.vcf.gz).
  • Filter summary statistics: total variants, PASS count, filtered count by category.

Limits

  • VQSR requires a sufficiently large call set to train the model (at least ~30 exomes or 1 WGS); use hard filters for small sample sets.
  • Resource VCFs must match the reference genome build (e.g., GRCh38).
  • GATK is required for VQSR and hard-filter modes; bcftools mode only requires bcftools.
  • Hard filters are recommended when VQSR training data is insufficient.
  • Common failure cases:
    • VQSR failing due to too few variants in the training set for model convergence.
    • Resource VCFs on a different genome build than the input VCF (e.g., GRCh37 vs GRCh38).
    • bcftools filter expression syntax errors causing silent empty output.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.