vimalinx/bio-agent / .claude/skills/vcf-fix-ploidy
vcf-fix-ploidy
VerifiedUse 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
- Prepare a sample-sex file with one
sample_name [M|F]pair per line. - Decide whether the default ploidy rules match your reference build and sex-chromosome conventions.
- Stream the VCF through
vcf-fix-ploidy, adding-aif the sex list is incomplete. - 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
-sis incomplete, you need-ato define the assumed sex for missing samples. - The built-in ploidy rules are reference- and convention-specific; override them with
-pif your build differs. -l/--fix-likelihoodschanges more than the GT field, so only use it when downstream tools care about PL/GL consistency.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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: 196k | Updated | Claude CodeCodex | Verified | Install |
| 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: 193k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 193k | Updated | Claude CodeCodex | Verified | Install |
| 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: 193k | Updated | Claude CodeCodex | Verified | Install |