vimalinx/bio-agent / .claude/skills/vcf-consensus
vcf-consensus
VerifiedUse 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
- Decide which reference interval or contig you actually want to reconstruct.
- Stream the matching FASTA sequence into stdin, ideally using
samtools faidx. - Apply variants from the compressed VCF with optional sample or haplotype selection.
- 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-tostyle when using region slices. - If the VCF has multiple samples, omitting
-sapplies all variants together, which is often not what you want.
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: 192k | 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: 192k | 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: 192k | Updated | Claude CodeCodex | Verified | Install |