Agent skill

bio-population-genetics-linkage-disequilibrium

Calculate linkage disequilibrium statistics (r², D'), perform LD pruning for population structure analysis, identify haplotype blocks, and visualize LD patterns using PLINK, scikit-allel, and LDBlockShow. Use when calculating LD or pruning variants.

BioTender-maxgithub.com/BioTender-maxGitHub ↗
claude-codeships scriptsNOASSERTION
Install
npx skills add BioTender-max/awesome-bio-agent-skills --skill linkage-disequilibrium --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 3
SKILL.md size: 6 KB
Bundled scripts: yes
Path: skills/bioskills/linkage-disequilibrium/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 135
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

## Version Compatibility Reference examples tested with: matplotlib 3.8+, numpy 1.26+, pandas 2.2+ Before using code patterns, verify installed versions match. If versions differ: - Python: `pip show <package>` then `help(module.function)` to check signatures - CLI: `<tool> --version` then `<tool> --help` to confirm flags If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying. # Linkage Disequilibrium **"Calculate LD between my variants"** → Compute pairwise LD statistics (r², D'), prune correlated variants for independent sets, and identify haplotype blocks from genotype data. - CLI: `plink2 --r2` for LD calculation, `--indep-pairwise` for pruning - Python: `allel.rogers_huff_r()` for windowed LD in scikit-allel Calculate LD statistics, prune correlated variants, and identify haplotype blocks. ## PLINK LD Calculations ### Pairwise r² ```bash # All pairs within window plink2 --bfile data --r2 --ld-window-kb 1000 --ld-window-r2 0.2 --out ld_results # With SNP names in output plink2 --bfile data --r2 inter-chr --ld-window-r2 0 --out all_pairs # Squared correlation matrix plink2 --bf

What's inside
Steps it walks through
  1. Version Compatibility
  2. PLINK LD Calculations
  3. Pairwise r²
  4. Output Format
  5. PLINK 1.9 Options
  6. LD Pruning
  7. Standard Pruning
  8. Pruning Parameters
  9. Use Cases
  10. scikit-allel LD
  11. LD Decay
  12. Haplotype Blocks
  13. PLINK
  14. Block Statistics
Ships with 2 files
  • examples/ld_analysis.sh
  • usage-guide.md
Commands it runs
All pairs within window
plink2 --bfile data --r2 --ld-window-kb 1000 --ld-window-r2 0.2 --out ld_results
With SNP names in output
plink2 --bfile data --r2 inter-chr --ld-window-r2 0 --out all_pairs
Squared correlation matrix
plink2 --bfile data --r2-phased square --out ld_matrix
plink --bfile data --r2 dprime --ld-window-kb 500 --out ld_with_dprime
Inter-chromosome LD
plink --bfile data --r2 inter-chr --ld-snp-list target_snps.txt --out target_ld
Calculate pruning list
More from awesome-bio-agent-skills
All skills →
About this skill
What does the bio-population-genetics-linkage-disequilibrium skill do?

Calculate linkage disequilibrium statistics (r², D'), perform LD pruning for population structure analysis, identify haplotype blocks, and visualize LD patterns using PLINK, scikit-allel, and LDBlockShow. Use when calculating LD or pruning variants.

How do I install it?

Run `npx skills add BioTender-max/awesome-bio-agent-skills --skill linkage-disequilibrium --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From BioTender-max/awesome-bio-agent-skills, a repository with 135 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going