Skip to content

vimalinx/bio-agent / .claude/skills/vcf-consensus

vcf-consensus

Verified

Use when applying VCF variants to a reference FASTA to generate a consensus sequence.

vcf-consensus

Quick Start

  • Command: cat ref.fa | vcf-consensus [OPTIONS] in.vcf.gz > out.fa
  • Local executable: /home/vimalinx/miniforge3/envs/bio/bin/vcf-consensus
  • Full reference: See references/help.md

When To Use This Tool

  • Apply variants from a VCF onto a reference FASTA to create a consensus sequence.
  • Produce sample-specific consensus from a multi-sample VCF.
  • Emit haplotype-specific consensus or IUPAC-coded ambiguity consensus.
  • Use it for targeted region reconstruction after extracting the exact reference segment you want.

Common Patterns

# 1) Apply all variants to a reference segment
samtools faidx ref.fa chr1:1000-2000 \
  | vcf-consensus calls.vcf.gz \
  > consensus.fa
# 2) Make sample-specific consensus
samtools faidx ref.fa chr1:1000-2000 \
  | vcf-consensus -s SAMPLE1 calls.vcf.gz \
  > sample1.consensus.fa
# 3) Emit haplotype 1 or IUPAC consensus
samtools faidx ref.fa chr1:1000-2000 \
  | vcf-consensus -H 1 calls.vcf.gz \
  > hap1.fa

Recommended Workflow

  1. Decide which reference interval or contig you actually want to reconstruct.
  2. Stream the matching FASTA sequence into stdin, ideally using samtools faidx.
  3. Apply variants from the compressed VCF with optional sample or haplotype selection.
  4. Inspect the resulting FASTA header and sequence length before treating it as final biological truth.

Guardrails

  • Reference FASTA comes from stdin; the tool does not read the FASTA by filename.
  • The usual usage expects a compressed .vcf.gz.
  • For targeted consensus, the FASTA header is expected in >chr:from-to style when using region slices.
  • If the VCF has multiple samples, omitting -s applies all variants together, which is often not what you want.
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: 192kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 192kUpdated 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: 192kUpdated Claude CodeCodexVerifiedInstall