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.
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.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
## 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
- Version Compatibility
- PLINK LD Calculations
- Pairwise r²
- Output Format
- PLINK 1.9 Options
- LD Pruning
- Standard Pruning
- Pruning Parameters
- Use Cases
- scikit-allel LD
- LD Decay
- Haplotype Blocks
- PLINK
- Block Statistics
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
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.
