Skip to content

vimalinx/bio-agent / .claude/skills/vcf-fix-ploidy

vcf-fix-ploidy

Verified

Use when VCF files have incorrect ploidy annotations for sex chromosomes or mitochondrial DNA, particularly when processing samples with known sex but mismatched genotype fields.

vcf-fix-ploidy

Quick Start

  • Command: cat input.vcf | vcf-fix-ploidy [OPTIONS] > output.vcf
  • Local executable: /home/vimalinx/miniforge3/envs/bio/bin/vcf-fix-ploidy
  • Full reference: See references/help.md

When To Use This Tool

  • Repair genotype ploidy for sex chromosomes and mitochondrial DNA after a caller emitted inconsistent diploid-style genotypes.
  • Adjust male/female expectations on X, Y, and MT using either a sample-sex file or an assumed default.
  • Optionally fix genotype likelihood vectors to match the corrected ploidy.

Common Patterns

# 1) Fix ploidy using a sample-sex file
cat input.vcf \
  | vcf-fix-ploidy -s samples.txt \
  > fixed.vcf
# 2) Assume female sex for unspecified samples
cat input.vcf \
  | vcf-fix-ploidy -s samples.txt -a F \
  > fixed.vcf
# 3) Also adjust genotype likelihoods
cat input.vcf \
  | vcf-fix-ploidy -s samples.txt -l \
  > fixed.vcf

Recommended Workflow

  1. Prepare a sample-sex file with one sample_name [M|F] pair per line.
  2. Decide whether the default ploidy rules match your reference build and sex-chromosome conventions.
  3. Stream the VCF through vcf-fix-ploidy, adding -a if the sex list is incomplete.
  4. Validate a few representative X, Y, and MT records before propagating the fixed file further.

Guardrails

  • Input is stdin-driven; do not try to pass the VCF as a positional filename.
  • If -s is incomplete, you need -a to define the assumed sex for missing samples.
  • The built-in ploidy rules are reference- and convention-specific; override them with -p if your build differs.
  • -l/--fix-likelihoods changes more than the GT field, so only use it when downstream tools care about PL/GL consistency.
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 193kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 193kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 193kUpdated Claude CodeCodexVerifiedInstall