Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Phase genotypes into haplotypes using Beagle or SHAPEIT. Resolves which alleles are inherited together on each chromosome. Use when preparing VCF files for imputation, HLA typing, or population genetic analyses requiring phased haplotypes.
.claude/skills/bio-phasing-imputation-haplotype-phasing/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 24% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 11% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 95% | 0% |
| case-01 | ✓→✓ | = Same ✓ | 19% | 0% |
| case-12 | ✓→✓ | = Same ✓ | 4% | 0% |
<!--
#
#
-->
bash# Download Beagle 5.4 wget https://faculty.washington.edu/browning/beagle/beagle.22Jul22.46e.jar # Basic phasing java -jar beagle.22Jul22.46e.jar \ gt=input.vcf.gz \ out=phased # Output: phased.vcf.gz (phased genotypes) # With genetic map (improves accuracy) java -jar beagle.22Jul22.46e.jar \ gt=input.vcf.gz \ map=plink.chr22.GRCh38.map \ out=phased
bashjava -jar beagle.22Jul22.46e.jar \ gt=input.vcf.gz \ out=phased \ map=genetic_map.txt \ nthreads=8 \ window=40 \ overlap=4 \ ne=20000 \ # Effective population size seed=12345 # For reproducibility
bash# Process each chromosome separately for chr in {1..22}; do java -Xmx16g -jar beagle.jar \ gt=input.chr${chr}.vcf.gz \ map=genetic_maps/plink.chr${chr}.GRCh38.map \ out=phased.chr${chr} \ nthreads=8 done # Concatenate chromosomes bcftools concat phased.chr*.vcf.gz -Oz -o phased.all.vcf.gz bcftools index phased.all.vcf.gz
bash# Phase common variants first shapeit5_phase_common \ --input input.vcf.gz \ --map genetic_map.txt \ --output phased_common.bcf \ --thread 8 \ --log phased.log # Then phase rare variants shapeit5_phase_rare \ --input input.vcf.gz \ --scaffold phased_common.bcf \ --map genetic_map.txt \ --output phased.bcf \ --thread 8
bash# Improves phasing using reference haplotypes shapeit5_phase_common \ --input input.vcf.gz \ --reference reference_panel.bcf \ --map genetic_map.txt \ --output phased.bcf \ --thread 8
bash# Use reference panel for better phasing java -jar beagle.22Jul22.46e.jar \ gt=input.vcf.gz \ ref=reference.vcf.gz \ map=genetic_map.txt \ out=phased \ nthreads=8
bash# Filter variants before phasing bcftools view -m2 -M2 -v snps input.vcf.gz -Oz -o biallelic_snps.vcf.gz # Remove missing genotypes (optional) bcftools view -g ^miss biallelic_snps.vcf.gz -Oz -o no_missing.vcf.gz # Normalize (important!) bcftools norm -f reference.fa -Oz -o normalized.vcf.gz input.vcf.gz
bash# View phased genotypes (| instead of /) bcftools query -f '%CHROM\t%POS\t[%GT\t]\n' phased.vcf.gz | head # Unphased: 0/1 # Phased: 0|1 or 1|0 # Count phased vs unphased bcftools query -f '[%GT\n]' phased.vcf.gz | grep -c '|'
bash# Download genetic maps (GRCh38) wget https://faculty.washington.edu/browning/beagle/genetic_maps/plink.GRCh38.map.zip unzip plink.GRCh38.map.zip # Format: chromosome position rate(cM/Mb) genetic_position(cM) # chr1 55550 2.981822 0.000000
| Parameter | Beagle | SHAPEIT5 | Description | |-----------|--------|----------|-------------| | Threads | nthreads | --thread | CPU threads | | Window | window | --window | Analysis window size | | Eff. pop size | ne | --effective-size | For LD modeling | | Seed | seed | --seed | Random seed |
| Dataset Size | Beagle Memory | SHAPEIT5 Memory | |--------------|--------------|-----------------| | 1,000 samples | 8 GB | 4 GB | | 10,000 samples | 32 GB | 16 GB | | 100,000 samples | 64+ GB | 32 GB |
<!-- AUTHOR_SIGNATURE: 9a7f3c2e-MD-BABU-MIA-2026-MSSM-SECURE -->
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | pass→pass | 18,374 | 14,210 | -23% | 1 | 1 | 0% | 3,723 | 4,440 | +19% | 0 | 0 | — |
case-12 | pass→pass | 14,729 | 6,016 | -59% | 1 | 1 | 0% | 2,479 | 2,587 | +4% | 0 | 0 | — |
case-02 | pass→pass | 9,790 | 4,781 | -51% | 1 | 1 | 0% | 1,920 | 2,414 | +26% | 0 | 0 | — |
case-03 | pass→pass | 11,776 | 4,636 | -61% | 1 | 1 | 0% | 1,821 | 2,379 | +31% | 0 | 0 | — |
case-04 | fail→pass | 13,614 | 7,368 | -46% | 1 | 1 | 0% | 2,274 | 2,825 | +24% | 0 | 0 | — |
case-05 | pass→pass | 7,020 | 2,805 | -60% | 1 | 1 | 0% | 1,418 | 1,930 | +36% | 0 | 0 | — |
case-06 | pass→pass | 3,093 | 2,190 | -29% | 1 | 1 | 0% | 483 | 1,860 | +285% | 0 | 0 | — |
case-07 | pass→pass | 11,292 | 8,030 | -29% | 1 | 1 | 0% | 2,092 | 3,006 | +44% | 0 | 0 | — |
case-08 | pass→pass | 11,240 | 9,354 | -17% | 1 | 1 | 0% | 1,999 | 3,168 | +58% | 0 | 0 | — |
case-09 | fail→pass | 9,774 | 3,614 | -63% | 1 | 1 | 0% | 1,894 | 2,100 | +11% | 0 | 0 | — |
case-10 | pass→pass | 11,123 | 5,929 | -47% | 1 | 1 | 0% | 2,093 | 2,544 | +22% | 0 | 0 | — |
case-11 | fail→pass | 5,619 | 2,737 | -51% | 1 | 1 | 0% | 993 | 1,936 | +95% | 0 | 0 | — |
case-13 | pass→pass | 16,233 | 2,562 | -84% | 1 | 1 | 0% | 2,882 | 1,974 | -32% | 0 | 0 | — |
case-14 | fail→fail | 18,297 | 15,822 | -14% | 1 | 1 | 0% | 2,917 | 4,333 | +49% | 0 | 0 | — |
case-15 | pass→pass | 12,012 | 2,055 | -83% | 1 | 1 | 0% | 1,411 | 1,840 | +30% | 0 | 0 | — |
case-16 | pass→pass | 10,067 | 3,309 | -67% | 1 | 1 | 0% | 1,959 | 2,109 | +8% | 0 | 0 | — |
case-17 | pass→pass | 4,528 | 2,992 | -34% | 1 | 1 | 0% | 705 | 1,784 | +153% | 0 | 0 | — |
case-18 | fail→fail | 8,412 | 5,397 | -36% | 1 | 1 | 0% | 1,453 | 2,511 | +73% | 0 | 0 | — |
case-19 | pass→pass | 6,125 | 3,475 | -43% | 1 | 1 | 0% | 1,157 | 2,048 | +77% | 0 | 0 | — |
case-20 | fail→fail | 12,071 | 10,815 | -10% | 1 | 1 | 0% | 2,250 | 3,546 | +58% | 0 | 0 | — |
case-21 | pass→pass | 9,805 | 7,263 | -26% | 1 | 1 | 0% | 1,973 | 2,607 | +32% | 0 | 0 | — |
case-22 | pass→pass | 9,202 | 9,407 | +2% | 1 | 1 | 0% | 1,783 | 3,276 | +84% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +14 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
| Model | Method | Date | Lift |
|---|---|---|---|
| gemini-3.6-flash | verified | 7/24/2026 | +36% |
Other measured skills in the registry, with their headline benchmark lift.