PyDESeq2 Differential Expression
davila7/claude-code-templates
Runs differential gene expression analysis on bulk RNA-seq counts with PyDESeq2: design formulas, Wald tests, FDR correction and volcano or MA plots.
Computes linkage disequilibrium (r2, D', composite Rogers-Huff r2), prunes correlated variants, clumps GWAS summary statistics to lead SNPs, and defines haplotype blocks with PLINK 1.9/2.0 and…
$ npx skills add GPTomics/bioSkills --skill bio-population-genetics-linkage-disequilibrium -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install GPTomics/bioSkills bio-population-genetics-linkage-disequilibrium --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/GPTomics/bioSkills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/population-genetics/linkage-disequilibrium .claude/skills/bio-population-genetics-linkage-disequilibrium && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "bio-population-genetics-linkage-disequilibrium" agent skill from https://github.com/GPTomics/bioSkills/tree/main/population-genetics/linkage-disequilibrium into .claude/skills/bio-population-genetics-linkage-disequilibrium/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bio-population-genetics-linkage-disequilibrium", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/GPTomics/bioSkills/tree/main/population-genetics/linkage-disequilibriumType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add GPTomics/bioSkills --skill bio-population-genetics-linkage-disequilibrium -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install GPTomics/bioSkills bio-population-genetics-linkage-disequilibrium --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/GPTomics/bioSkills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/population-genetics/linkage-disequilibrium .agents/skills/bio-population-genetics-linkage-disequilibrium && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "bio-population-genetics-linkage-disequilibrium" agent skill from https://github.com/GPTomics/bioSkills/tree/main/population-genetics/linkage-disequilibrium into .agents/skills/bio-population-genetics-linkage-disequilibrium/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bio-population-genetics-linkage-disequilibrium", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add GPTomics/bioSkills --skill bio-population-genetics-linkage-disequilibrium -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install GPTomics/bioSkills bio-population-genetics-linkage-disequilibrium --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/GPTomics/bioSkills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/population-genetics/linkage-disequilibrium .cursor/skills/bio-population-genetics-linkage-disequilibrium && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "bio-population-genetics-linkage-disequilibrium" agent skill from https://github.com/GPTomics/bioSkills/tree/main/population-genetics/linkage-disequilibrium into .cursor/skills/bio-population-genetics-linkage-disequilibrium/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bio-population-genetics-linkage-disequilibrium", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/GPTomics/bioSkills.git --path population-genetics/linkage-disequilibrium--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add GPTomics/bioSkills --skill bio-population-genetics-linkage-disequilibrium -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install GPTomics/bioSkills bio-population-genetics-linkage-disequilibrium --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/GPTomics/bioSkills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/population-genetics/linkage-disequilibrium .gemini/skills/bio-population-genetics-linkage-disequilibrium && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "bio-population-genetics-linkage-disequilibrium" agent skill from https://github.com/GPTomics/bioSkills/tree/main/population-genetics/linkage-disequilibrium into .gemini/skills/bio-population-genetics-linkage-disequilibrium/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bio-population-genetics-linkage-disequilibrium", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install GPTomics/bioSkills bio-population-genetics-linkage-disequilibriumInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add GPTomics/bioSkills --skill bio-population-genetics-linkage-disequilibrium -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/GPTomics/bioSkills.git skills-src && mkdir -p .github/skills && cp -r skills-src/population-genetics/linkage-disequilibrium .github/skills/bio-population-genetics-linkage-disequilibrium && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "bio-population-genetics-linkage-disequilibrium" agent skill from https://github.com/GPTomics/bioSkills/tree/main/population-genetics/linkage-disequilibrium into .github/skills/bio-population-genetics-linkage-disequilibrium/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bio-population-genetics-linkage-disequilibrium", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add GPTomics/bioSkills --skill bio-population-genetics-linkage-disequilibrium -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install GPTomics/bioSkills bio-population-genetics-linkage-disequilibrium --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/GPTomics/bioSkills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/population-genetics/linkage-disequilibrium .opencode/skills/bio-population-genetics-linkage-disequilibrium && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "bio-population-genetics-linkage-disequilibrium" agent skill from https://github.com/GPTomics/bioSkills/tree/main/population-genetics/linkage-disequilibrium into .opencode/skills/bio-population-genetics-linkage-disequilibrium/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bio-population-genetics-linkage-disequilibrium", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
bio-population-genetics-linkage-disequilibriumComputes linkage disequilibrium (r2, D', composite Rogers-Huff r2), prunes correlated variants, clumps GWAS summary statistics to lead SNPs, and defines haplotype blocks with PLINK 1.9/2.0 and…
Bio Population Genetics Linkage Disequilibrium is an agent skill from GPTomics/bioSkills. Computes linkage disequilibrium (r2, D', composite Rogers-Huff r2), prunes correlated variants, clumps GWAS summary statistics to lead SNPs, and defines haplotype blocks with PLINK 1.9/2.0 and scikit-allel. r2 and D' answer different questions - r2 (= chi2/N) is the tagging and GWAS-power currency, D' marks observed recombination and is upward-biased for rare variants. PLINK 2.0 has no bare --r2 (split into --r2-phased and --r2-unphased); pruning (--indep-pairwise, genotype-blind) and clumping (--clump…
Its SKILL.md is about 4.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files (for example `examples/ld_analysis.sh` and `usage-guide.md`).
It sits in Research & Science, covering Data analysis, Statistics and Bioinformatics. It works with Python. The repository describes itself as: a set of SKILLS.md for doing bioinformatics with agents like claude code. The licence is MIT.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit d91ed3d. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships script files (Shell), which the agent can run.
Shell commands in SKILL.md call:
pipFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Bio Population Genetics Linkage Disequilibrium loads about 4.7k tokens when it runs. Until then it costs about 238 tokens; SKILL.md has 1,904 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from GPTomics/bioSkills at commit d91ed3d, republished under its MIT licence (© GPTomics). 1,904 words, ~4,678 tokens.
.claude/skills/bio-population-genetics-linkage-disequilibrium/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.Reference examples tested with: PLINK 1.9 (1.90b7+), PLINK 2.0 (alpha 6+), scikit-allel 1.3+, numpy 1.26+.
Before using code patterns, verify installed versions match. If versions differ:
pip show <package> then help(module.function) to check signatures<tool> --version then <tool> --help to confirm flagsIf code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.
Version traps that change results, not just syntax: PLINK 2.0 has NO bare --r2 (it was split into --r2-phased, the EM haplotype-frequency estimator, and --r2-unphased, the composite dosage estimator); PLINK 1.9 still uses bare --r2. PLINK 2.0 --indep-pairwise <window>['kb'] [step] <r2> requires the step to be 1 when the window is given in kb. allel.rogers_huff_r returns a CONDENSED upper-triangle array, not a square matrix - scipy.spatial.distance.squareform it before 2D indexing. The single source of truth for versions is this block, not headings.
"Measure LD between my variants" -> Quantify how predictably one variant's alleles co-occur with another's, choosing r2 or D' by the question being asked.
plink2 --r2-unphased (composite dosage r2, no phasing) or --r2-phased (EM haplotype r2)allel.rogers_huff_r(gn) ** 2 (composite r2, scikit-allel)"Thin correlated variants before PCA or structure" -> Remove variants so no remaining pair is in high LD, leaving a near-independent marker set.
plink2 --indep-pairwise 50 5 0.1 (genotype-blind, phenotype-agnostic)allel.locate_unlinked(gn, size=50, step=5, threshold=0.1) (scikit-allel)"Reduce my GWAS hits to one signal per locus" -> Group correlated associations around the most significant SNP per region.
plink --clump sumstats --clump-p1 5e-8 --clump-r2 0.1 --clump-kb 250Scope: LD measures, pruning, clumping, haplotype blocks, and LD decay. QC/conversion route to plink-basics; PCA/ADMIXTURE to population-structure; --glm GWAS to association-testing; resolving independent causal variants to causal-genomics/fine-mapping; phased haplotypes to phasing-imputation/haplotype-phasing.
| Method | Tool / call | Mechanism | When |
|---|---|---|---|
| Composite (Rogers-Huff) r2 | plink2 --r2-unphased; allel.rogers_huff_r | correlation of 0/1/2 dosage vectors, no phasing | robust default when phase or HWE is doubtful |
| EM haplotype r2 | plink2 --r2-phased; vcftools --hap-r2 | infers haplotype frequencies under HWE, then r2 | large HWE-consistent samples, or truly phased input |
| D' | plink --r2 dprime; plink2 --ld <a> <b> | D normalized by its frequency-constrained max | block boundaries, recombination history (NOT tagging) |
| LD pruning | plink2 --indep-pairwise; allel.locate_unlinked | genotype-blind windowed r2 thinning | independent marker set for PCA/ADMIXTURE/GRM |
| LD clumping | plink --clump | p-value-aware grouping around an index SNP | one lead SNP per associated GWAS locus |
| Haplotype blocks | plink --blocks no-pheno-req | Gabriel confidence-interval D' method | block maps, recombination inference |
| LD score regression | ldsc (--l2, --h2, --rg) | regress GWAS chi2 on LD score | h2, genetic correlation, confounding from sumstats |
| Scenario | Use | Why |
|---|---|---|
| Thin variants for PCA/ADMIXTURE/GRM | --indep-pairwise after excluding long-range-LD regions | phenotype-blind independence; MHC/inversions must go by coordinate first |
| Reduce GWAS hits to lead SNPs | --clump with ancestry-matched LD | p-value-aware; one index SNP per locus |
| Establish independent causal signals | conditional analysis or fine-mapping, NOT tighter clumping | clumping picks the top SNP, not the causal one; over-clumping deletes real secondaries |
| Assess a proxy/tag SNP | r2 (--r2-unphased), require r2 >= 0.8 | r2 = fraction of effective N retained at the proxy |
| Define haplotype blocks / recombination | D' (--blocks, --r2 dprime) | D' marks observed recombination; r2 does not |
| Phase or HWE doubtful, small N, missingness | composite r2 (--r2-unphased, Rogers-Huff) | EM can manufacture haplotype-frequency artifacts |
| LD from genotypes in Python at scale | allel.locate_unlinked / allel.rogers_huff_r | composite estimator, chunkable; no phased-EM in scikit-allel |
| h2 / confounding from summary stats | LD-score regression with ancestry-matched scores | slope = h2, intercept-1 = confounding |
Goal: Compute pairwise r2 (and D' when recombination is the question) without an EM artifact under structure or missingness.
Approach: Default to the composite dosage estimator that needs no phasing; reach for EM haplotype r2 only when the sample is large and HWE-consistent, and use D' solely for block/recombination work.
# Composite dosage r2 (Rogers-Huff): robust default, no HWE assumption.
plink2 --bfile data --r2-unphased --ld-window-kb 1000 --ld-window-r2 0.2 --out ld_unphased
# EM haplotype-frequency r2: only when phase is trustworthy / sample is large and HWE-consistent.
plink2 --bfile data --r2-phased --ld-window-kb 1000 --out ld_phased
# D' for a single pair (recombination / block question), with observed haplotype frequencies.
plink2 --bfile data --ld rs123 rs456 --out pair
# PLINK 1.9 still has the bare --r2; add dprime to also report D'.
plink --bfile data --r2 dprime --ld-window-kb 500 --out ld_dprimeimport allel
from scipy.spatial.distance import squareform
callset = allel.read_vcf('data.vcf.gz')
gn = allel.GenotypeArray(callset['calldata/GT']).to_n_alt()
# rogers_huff_r returns a CONDENSED upper-triangle vector; square it for r2, squareform for a matrix.
r2_matrix = squareform(allel.rogers_huff_r(gn[:200]) ** 2)Goal: Produce a near-independent marker set so PCA/ADMIXTURE/GRM are not dominated by a handful of LD blocks.
Approach: Exclude long-range-LD regions by coordinate FIRST (their internal r2 is high and real, so a threshold cannot remove them sensibly), then slide an r2 window over the survivors.
# 1. Drop long-range-LD regions by position (MHC chr6:25-35 Mb, 8p23.1, 17q21.31, LCT/2q21; coordinates are build-specific).
plink2 --bfile data --exclude range longrange_ld.txt --make-bed --out data_noLR
# 2. Windowed r2 prune (50 here is a variant count, so step 5 is fine; step MUST be 1 only with a kb window).
plink2 --bfile data_noLR --indep-pairwise 50 5 0.1 --out prune # 50-variant window, step 5, r2 0.1
plink2 --bfile data_noLR --extract prune.prune.in --make-bed --out data_prunedimport allel
callset = allel.read_vcf('data.vcf.gz')
gn = allel.GenotypeArray(callset['calldata/GT']).to_n_alt()
loc_unlinked = allel.locate_unlinked(gn, size=50, step=5, threshold=0.1) # boolean keep-mask
gn_pruned = gn.compress(loc_unlinked, axis=0)Goal: Collapse a region of correlated associations to one lead SNP per independent locus.
Approach: Index on genome-wide-significant SNPs and absorb nearby LD partners, overriding PLINK's permissive defaults; use an ancestry-matched LD reference, ideally the study sample itself.
# Defaults (p1=1e-4, p2=1e-2, r2=0.5, kb=250) are neither genome-wide nor strict - set them explicitly.
plink --bfile ld_reference \
--clump gwas_sumstats.txt \
--clump-p1 5e-8 --clump-p2 1e-5 --clump-r2 0.1 --clump-kb 250 \
--out clumped
# clumped.clumped lists one index SNP per locus. This is NOT conditional analysis or fine-mapping.Goal: Map regions of little observed recombination, or characterize how LD decays with distance.
Approach: Use the Gabriel D'-CI block method for boundaries; for decay, bin composite r2 by physical distance after stratifying by population so admixture LD does not flatten the curve.
plink --bfile data --blocks no-pheno-req --out blocks # blocks.blocks, blocks.blocks.det (Gabriel CI)import allel, numpy as np
callset = allel.read_vcf('data.vcf.gz')
gn = allel.GenotypeArray(callset['calldata/GT']).to_n_alt()
pos = callset['variants/POS']
n = min(1000, gn.shape[0])
r2, dist = [], []
for i in range(n):
for j in range(i + 1, min(i + 100, n)):
r2.append(allel.rogers_huff_r(gn[[i, j]])[0] ** 2) # condensed length-1 -> index [0]
dist.append(pos[j] - pos[i])
r2, dist = np.array(r2), np.array(dist)
edges = np.arange(0, 100001, 1000)
decay = [np.mean(r2[(dist >= edges[k]) & (dist < edges[k + 1])]) if ((dist >= edges[k]) & (dist < edges[k + 1])).any() else np.nan for k in range(len(edges) - 1)]Trigger: --indep-pairwise run without excluding MHC/inversions by coordinate. Mechanism: their internal r2 is high and genuine, so a window prune keeps a dense cluster. Symptom: the top PCs capture the MHC (chr6:25-35Mb) or 17q21.31 inversion, not ancestry. Fix: --exclude range the long-range-LD list (MHC, 8p23.1, 17q21.31, LCT; Price 2008) before pruning, not a tighter r2.
Trigger: selecting tag SNPs or judging proxy adequacy from D'. Mechanism: D'=1 only says no recombinant was observed; frequency asymmetry caps r2 far below 1. Symptom: a "perfectly linked" common SNP retains almost no association power for a rare causal variant. Fix: use r2 for tagging/power and require r2 >= 0.8; reserve D' for blocks.
Trigger: interpreting D' or --blocks where minor-allele count is below ~10-20. Mechanism: the fourth haplotype is unobserved by chance, pushing the D' MLE to ~1 even for independent loci. Symptom: spurious "perfect LD" blocks that vanish with more samples. Fix: do not interpret D' at low MAC; report r2, which is noisy but not systematically inflated.
Trigger: --r2-phased or --hap-r2 under inbreeding, structure, or high missingness. Mechanism: EM converges to biased haplotype frequencies that violate the HWE assumption. Symptom: r2 disagrees with the composite estimate and shifts with missingness. Fix: use --r2-unphased (composite Rogers-Huff) when phase or HWE is doubtful.
Trigger: clumping, LD-score regression, or fine-mapping with a panel that does not match the GWAS ancestry. Mechanism: the LD matrix consumed differs from the sample's true LD; no error is raised. Symptom: mis-grouped clumps, biased heritability, false fine-mapping credible sets with "impossible" configurations. Fix: compute LD from the study sample itself, or use an ancestry-matched panel.
Trigger: treating --clump as conditional or fine-mapping analysis. Mechanism: clumping keeps the single most significant SNP and discards everything in LD with it. Symptom: two truly independent causal variants in modest LD collapse to one locus. Fix: use conditional analysis (COJO) or fine-mapping (causal-genomics/fine-mapping); do not just tighten --clump-r2.
Trigger: plotting LD decay on a pooled multi-population sample. Mechanism: admixture and background LD inflate long-range r2 independent of distance. Symptom: the decay curve plateaus at a nonzero asymptote instead of decaying toward zero. Fix: stratify by population before computing decay (LD ~ 1/(4Nec+1), Hill & Robertson 1968).
| Operation | Flag / value | Typical | Rationale |
|---|---|---|---|
| Pruning for PCA/ADMIXTURE/GRM | --indep-pairwise r2 | 0.1 (range 0.05-0.2) | near-independence so structure is not double-counted; strictness trades marker count for independence |
| Pruning window / step | window / step | 50 var / 5, or 200kb / 1 | window must exceed local LD extent; step is 1 for kb windows in plink2 |
| Pruning for polygenic scores | --indep-pairwise r2 | 0.1-0.5 within 250kb-1Mb | retain more signal; tuned by validation |
| Clumping LD threshold | --clump-r2 | 0.1 (default 0.5 under-clumps) | r2 0.1 within 250kb defines one independent locus; set explicitly |
| Clumping p-values | --clump-p1 / --clump-p2 | 5e-8 / 1e-5 (defaults 1e-4/1e-2) | index at genome-wide significance; defaults are neither genome-wide nor strict |
| Tag / proxy adequacy | r2 | >= 0.8 | r2 = chi2/N: retains >= 80% of association power at the proxy (Pritchard & Przeworski 2001) |
| Gabriel "strong LD" block | upper 95% D' CI | > 0.98 (lower > 0.7) | one recombinant makes D'=1 impossible yet the CI can sit just below 1 (Gabriel 2002) |
| MAF floor for stable D' | MAF | >~ 0.05 | D' upward bias and r2 variance both blow up at low MAC |
| LDSC applicability | mean chi2 / N | > ~1.02 / N > ~5000 | below this the slope is too noisy; exclude MHC; munge to HapMap3 SNPs (Bulik-Sullivan 2015) |
Thresholds are conventions, not laws - inspect the LD distributions and verify current best practice before applying numbers blindly.
| Error / symptom | Cause | Solution |
|---|---|---|
plink2 --r2 "unrecognized flag" | bare --r2 removed in PLINK 2.0 | choose --r2-phased or --r2-unphased; PLINK 1.9 keeps --r2 |
--indep-pairwise 50kb 5 0.1 errors | step must be 1 for kb windows | use --indep-pairwise 50kb 1 0.1 or a variant-count window |
rogers_huff_r(gn)[0,1] index error | function returns a condensed vector | squareform(rogers_huff_r(gn)) first, or index [0] for a single pair |
| Top PCs capture one region | long-range-LD region left in | --exclude range MHC/8p23.1/17q21.31/LCT by coordinate before pruning |
| Clumping reports correlated SNPs as separate loci | default --clump-r2 0.5 too loose | set --clump-r2 0.1 and --clump-p1 5e-8 explicitly |
| Independent secondary hit disappears | over-clumping treated as fine-mapping | use conditional analysis / fine-mapping, not a tighter clump |
| False fine-mapping credible sets | wrong-ancestry LD reference | use in-sample or ancestry-matched LD |
| LDSC intercept read as pure stratification | intercept also absorbs sample overlap | use the attenuation ratio (intercept-1)/(mean chi2 - 1) |
© GPTomics, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files in population-genetics/linkage-disequilibrium of GPTomics/bioSkills.
Open the folder on GitHubat commit d91ed3d
We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in GPTomics/bioSkills, which our catalogue first saw on October 7, 2026.
Bio Population Genetics Linkage Disequilibrium next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Bio Population Genetics Linkage Disequilibrium this skillGPTomics/bioSkills | 1.2k | 1 repos | ~4.7k | Automated safety check: Pass | MIT | |
| PyDESeq2 Differential Expressiondavila7/claude-code-templates | 33k | 11 repos | ~4k | Automated safety check: Pass | MIT | |
| Ukb Ppp Region FetchClawBio/ClawBio | 1.2k | — | ~4.6k | Automated safety check: Pass | MIT | |
| Volcano Plot Scriptaipoch/medical-research-skills | 1.9k | — | ~2.5k | Automated safety check: Pass | MIT | |
| Tooluniverse Epigenomicswu-yc/LabClaw | 1.1k | 2 repos | ~14k | Automated safety check: Pass | None | |
| Bio Proteomics Differential AbundanceFreedomIntelligence/OpenClaw-Medical-Skills | 3.1k | — | ~1.2k | Automated safety check: Pass | None |
davila7/claude-code-templates
Runs differential gene expression analysis on bulk RNA-seq counts with PyDESeq2: design formulas, Wald tests, FDR correction and volcano or MA plots.
ClawBio/ClawBio
Fetch a regional slice of plasma pQTL summary statistics from the UK Biobank Pharma Proteomics Project (UKB-PPP; Sun 2023 Nature) for a specific (protein, ancestry) measurement.
aipoch/medical-research-skills
Generate R/Python code for volcano plots from DEG (Differentially Expressed Genes) analysis results.
wu-yc/LabClaw
Production-ready genomics and epigenomics data processing for BixBench questions.
FreedomIntelligence/OpenClaw-Medical-Skills
Statistical testing for differentially abundant proteins between conditions.
aipoch/medical-research-skills
DNAnexus cloud genomics platform. An agent skill from aipoch/medical-research-skills.
GPTomics/bioSkills
Read, write, and convert multiple sequence alignment files using Biopython Bio.AlignIO.
GPTomics/bioSkills
Installs the bioSkills collection of 425 bioinformatics skills in one step, or only chosen categories, so sequencing, RNA-seq, single-cell and variant tasks get specialized help.
GPTomics/bioSkills
Write biological sequences to files (FASTA, FASTQ, GenBank, EMBL) using Biopython Bio.SeqIO.
GPTomics/bioSkills
Soft- or hard-clips PCR primer footprints from aligned amplicon BAMs so primer bases stop masquerading as confirmed reference sequence.
GPTomics/bioSkills
Filters BAM alignments by FLAG bits, mapping quality and regions with samtools view or pysam, with recipes for common keep and drop cases.
GPTomics/bioSkills
Create and use BAI/CSI indices for BAM/CRAM files using samtools and pysam.
Works with
Categories
Computes linkage disequilibrium (r2, D', composite Rogers-Huff r2), prunes correlated variants, clumps GWAS summary statistics to lead SNPs, and defines haplotype blocks with PLINK 1.9/2.0 and…. Bio Population Genetics Linkage Disequilibrium is an agent skill from GPTomics/bioSkills.0 and scikit-allel.
Bio Population Genetics Linkage Disequilibrium fits situations like: pruning variants for PCA; clumping GWAS hits; selecting tag SNPs.
Run `npx skills add GPTomics/bioSkills --skill bio-population-genetics-linkage-disequilibrium -a claude-code`. Or copy the skill folder (population-genetics/linkage-disequilibrium in GPTomics/bioSkills) into .claude/skills/bio-population-genetics-linkage-disequilibrium in your project. Claude Code loads it when a task matches its description.
Run `npx skills add GPTomics/bioSkills --skill bio-population-genetics-linkage-disequilibrium -a codex`. Or copy the skill folder (population-genetics/linkage-disequilibrium in GPTomics/bioSkills) into .agents/skills/bio-population-genetics-linkage-disequilibrium in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add GPTomics/bioSkills --skill bio-population-genetics-linkage-disequilibrium -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/bio-population-genetics-linkage-disequilibrium, .gemini/skills/bio-population-genetics-linkage-disequilibrium, .github/skills/bio-population-genetics-linkage-disequilibrium and .opencode/skills/bio-population-genetics-linkage-disequilibrium in your project.
Going by SKILL.md and its folder, Bio Population Genetics Linkage Disequilibrium needs a shell for the scripts in its folder and the command-line tools its instructions call (pip). Our summary lists: Python 3; A Bash shell.
SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Bio Population Genetics Linkage Disequilibrium is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 4.7k tokens (SKILL.md is roughly 19k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Bio Population Genetics Linkage Disequilibrium: PyDESeq2 Differential Expression (davila7/claude-code-templates, 33k stars), Ukb Ppp Region Fetch (ClawBio/ClawBio, 1.2k stars), Volcano Plot Script (aipoch/medical-research-skills, 1.9k stars) and Tooluniverse Epigenomics (wu-yc/LabClaw, 1.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
GPTomics (a GitHub organization) maintains it in GPTomics/bioSkills, which has 1,218 GitHub stars. The repository holds 559 skills in this directory. The repository was last updated on August 15, 2026.
Source: GPTomics/bioSkills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.