Scikit Bio
aipoch/medical-research-skills
A Python bioinformatics toolkit for sequence, phylogeny, and microbiome/community-ecology analysis; use it when you need to compute diversity/ordination/statistics from biological data and standard…
In-memory Python population genetics with scikit-allel - GenotypeArray/HaplotypeArray/AlleleCountsArray, diversity (pi, theta, Tajima's D), SFS, FST (Weir-Cockerham, Hudson, Patterson), f3/D…
$ npx skills add GPTomics/bioSkills --skill bio-population-genetics-scikit-allel-analysis -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install GPTomics/bioSkills bio-population-genetics-scikit-allel-analysis --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/scikit-allel-analysis .claude/skills/bio-population-genetics-scikit-allel-analysis && 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-scikit-allel-analysis" agent skill from https://github.com/GPTomics/bioSkills/tree/main/population-genetics/scikit-allel-analysis into .claude/skills/bio-population-genetics-scikit-allel-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bio-population-genetics-scikit-allel-analysis", 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/scikit-allel-analysisType 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-scikit-allel-analysis -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install GPTomics/bioSkills bio-population-genetics-scikit-allel-analysis --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/scikit-allel-analysis .agents/skills/bio-population-genetics-scikit-allel-analysis && 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-scikit-allel-analysis" agent skill from https://github.com/GPTomics/bioSkills/tree/main/population-genetics/scikit-allel-analysis into .agents/skills/bio-population-genetics-scikit-allel-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bio-population-genetics-scikit-allel-analysis", 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-scikit-allel-analysis -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install GPTomics/bioSkills bio-population-genetics-scikit-allel-analysis --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/scikit-allel-analysis .cursor/skills/bio-population-genetics-scikit-allel-analysis && 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-scikit-allel-analysis" agent skill from https://github.com/GPTomics/bioSkills/tree/main/population-genetics/scikit-allel-analysis into .cursor/skills/bio-population-genetics-scikit-allel-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bio-population-genetics-scikit-allel-analysis", 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/scikit-allel-analysis--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-scikit-allel-analysis -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install GPTomics/bioSkills bio-population-genetics-scikit-allel-analysis --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/scikit-allel-analysis .gemini/skills/bio-population-genetics-scikit-allel-analysis && 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-scikit-allel-analysis" agent skill from https://github.com/GPTomics/bioSkills/tree/main/population-genetics/scikit-allel-analysis into .gemini/skills/bio-population-genetics-scikit-allel-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bio-population-genetics-scikit-allel-analysis", 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-scikit-allel-analysisInstalls 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-scikit-allel-analysis -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/scikit-allel-analysis .github/skills/bio-population-genetics-scikit-allel-analysis && 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-scikit-allel-analysis" agent skill from https://github.com/GPTomics/bioSkills/tree/main/population-genetics/scikit-allel-analysis into .github/skills/bio-population-genetics-scikit-allel-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bio-population-genetics-scikit-allel-analysis", 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-scikit-allel-analysis -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-scikit-allel-analysis --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/scikit-allel-analysis .opencode/skills/bio-population-genetics-scikit-allel-analysis && 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-scikit-allel-analysis" agent skill from https://github.com/GPTomics/bioSkills/tree/main/population-genetics/scikit-allel-analysis into .opencode/skills/bio-population-genetics-scikit-allel-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bio-population-genetics-scikit-allel-analysis", 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-scikit-allel-analysisIn-memory Python population genetics with scikit-allel - GenotypeArray/HaplotypeArray/AlleleCountsArray, diversity (pi, theta, Tajima's D), SFS, FST (Weir-Cockerham, Hudson, Patterson), f3/D…
Bio Population Genetics Scikit Allel Analysis is an agent skill from GPTomics/bioSkills. In-memory Python population genetics with scikit-allel - GenotypeArray/HaplotypeArray/AlleleCountsArray, diversity (pi, theta, Tajima's D), SFS, FST (Weir-Cockerham, Hudson, Patterson), f3/D admixture stats, LD pruning, PCA, and selection scans (iHS, XP-EHH, nSL, Garud H). Nearly every statistic is a ratio or density with one silent denominator bug in two faces: omit isaccessible= and per-base pi/theta divide by total span not accessible bp (deflated 2-5x); average per-SNP FST instead of…
Its SKILL.md is about 5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files (for example `examples/basic_analysis.py` and `usage-guide.md`).
It sits in Data & Analytics, covering 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 (Python), 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 Scikit Allel Analysis loads about 5k tokens when it runs. Until then it costs about 263 tokens; SKILL.md has 1,839 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,839 words, ~4,991 tokens.
.claude/skills/bio-population-genetics-scikit-allel-analysis/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: scikit-allel 1.3.13+, numpy 1.26+, zarr 2.18+.
Before using code patterns, verify installed versions match. If versions differ:
pip show <package> then help(module.function) to check signaturesIf 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: scikit-allel is in MAINTENANCE mode (latest line v1.3.x, e.g. v1.3.13 Sep 2024); the README names sgkit (xarray+dask) as the successor but states it is "not yet at feature parity", so scikit-allel remains the pragmatic choice for established stat workflows. average_patterson_f3/average_patterson_d are the current names; pre-2020 code used blockwise_patterson_* (gone). to_n_alt() default is fill=0, not fill=-1. read_vcf is eager and loads the whole file into RAM. The single source of truth for versions is this block, not headings.
"Analyze population genetics in Python" -> Read a VCF into array structures, then compute frequency-, diversity-, differentiation-, and haplotype-based statistics with correct denominators.
allel.GenotypeArray, allel.AlleleCountsArray, allel.windowed_diversity(..., is_accessible=), allel.average_hudson_fst, allel.pcaScope: in-memory and dask/zarr scikit-allel analysis - the array-API mechanics of the data model, diversity/SFS, FST and f/D admixture statistics, LD pruning, PCA, and selection-scan computation. PLINK-format QC routes to plink-basics; PCA/ADMIXTURE via CLI tools to population-structure; selection-scan DESIGN (standardization, outlier calling, demographic confounding) to selection-statistics; phased input to phasing-imputation/haplotype-phasing; VCF generation to variant-calling/vcf-basics.
is_accessible= and they divide by total span (stop-start+1) instead of callable bp, deflating values 2-5x AND distorting the genome-wide landscape because callability varies per window.sum(a)/(sum(a)+sum(b)+sum(c)), NOT mean(per_snp_fst) (which is rare-variant-dominated and biased, Bhatia 2013); scikit-allel returns the (a,b,c) components from weir_cockerham_fst and (num,den) from hudson_fst/patterson_fst precisely to force ratio-of-sums.| Object / path | Shape / form | Role | When |
|---|---|---|---|
GenotypeArray | (n_variants, n_samples, ploidy) int8, -1 = missing | the fundamental call array | diploid genotypes from calldata/GT |
HaplotypeArray | (n_variants, n_haplotypes) | phased chromosomes | iHS/XP-EHH/nSL/Garud H (REQUIRE phasing) |
AlleleCountsArray | (n_variants, n_alleles) int32 | currency of all frequency stats | gt.count_alleles(); ignores -1 |
to_n_alt 012 matrix | (n_variants, n_samples) | input to PCA/LD | gt.to_n_alt(fill=...) (default fill=0 imputes to ref) |
| in-memory numpy | dense, all in RAM | fast, simple | fits-in-memory regions/chromosomes |
GenotypeDaskArray + zarr | chunked, on-disk, lazy | out-of-core / parallel | biobank-scale; vcf_to_zarr once then dask |
| scikit-allel | maintenance mode, v1.3.x | established stat workflows | the pragmatic default today |
| sgkit | xarray+dask, active | successor, NOT yet feature-parity | greenfield biobank-scale infrastructure |
| Scenario | Use | Why |
|---|---|---|
| Per-base pi/theta/Dxy | windowed_diversity(..., is_accessible=mask) | without the mask the per-base denominator is total span, not callable bp |
| Genome-wide FST point estimate + SE | average_hudson_fst(ac1, ac2, blen) | ratio-of-sums + block-jackknife done correctly; Hudson is robust to unequal n (Bhatia 2013) |
| FST landscape across the genome | moving_hudson_fst / windowed_weir_cockerham_fst | per-window ratio aggregation, not mean(per_snp_fst) |
| SFS without a confident ancestral allele | sfs_folded(ac) | folds on minor-allele count; sfs() is unfolded and treats ALT as derived |
| Test if pop C is admixed | average_patterson_f3(acc, aca, acb, blen) | significantly negative f3 (z < ~-3) is the formal admixture test; C goes FIRST |
| LD-prune before PCA | locate_unlinked(gn) iterated ~3 rounds | one pass leaves residual LD; PCs otherwise track LD blocks/inversions |
| Selection scan on phased data | ihs/nsl then standardize_by_allele_count (DAF bins); xpehh then genome-wide standardize | raw scores are uninterpretable; the standardization differs by statistic |
| Whole-genome callset (tens of M SNPs) | vcf_to_zarr + GenotypeDaskArray | read_vcf is eager and OOMs; dask materializes per chunk |
Goal: Load a VCF region into a GenotypeArray and derive the allele-count currency, missing-aware.
Approach: Read only the needed fields (read_vcf is eager), wrap GT, count alleles per site (missing ignored), and get per-population counts in one pass with count_alleles_subpops.
import allel
import numpy as np
callset = allel.read_vcf('data.vcf.gz', fields=['samples', 'calldata/GT', 'variants/POS', 'variants/CHROM'], region='2L:1-5000000')
gt = allel.GenotypeArray(callset['calldata/GT']) # (n_variants, n_samples, 2); -1 = missing
pos = callset['variants/POS']
ac = gt.count_alleles() # ignores -1, so per-site allele number varies
subpops = {'pop1': [0, 1, 2, 3, 4], 'pop2': [5, 6, 7, 8, 9]}
ac_subpops = gt.count_alleles_subpops(subpops) # one pass, consistent variant axis
ac1, ac2 = ac_subpops['pop1'], ac_subpops['pop2']Goal: Compute pi and Watterson's theta as honest per-base quantities, not span-deflated ones.
Approach: Pass a boolean callability mask (one entry per base, from coverage/mappability, NOT from variant positions) as is_accessible; inspect the returned n_bases per window to confirm the denominator.
# is_accessible: bool array over genomic positions (a callable-loci mask), NOT the VCF variant sites.
pi = allel.sequence_diversity(pos, ac, is_accessible=is_accessible)
theta_w = allel.watterson_theta(pos, ac, is_accessible=is_accessible)
# windowed_diversity returns 4 values; n_bases is the accessible-bp denominator PER window.
pi_w, windows, n_bases, counts = allel.windowed_diversity(pos, ac, size=100000, is_accessible=is_accessible)
# windowed_tajima_d returns 3 values (no n_bases): Tajima's D is dimensionless, no is_accessible.
D, td_windows, td_counts = allel.windowed_tajima_d(pos, ac, size=100000)Goal: Get a genome-wide FST point estimate with a jackknife SE, and a per-window landscape, without the mean-of-ratios bias.
Approach: Let average_hudson_fst do the ratio-of-sums plus block-jackknife; if hand-aggregating, sum the components THEN divide; size blocks (blen) to exceed the LD scale.
# Genome-wide estimate + standard error (ratio-of-sums + delete-one-block jackknife):
fst, se, vb, vj = allel.average_hudson_fst(ac1, ac2, blen=2000) # blen must exceed the LD decay length
# Hand-aggregating Hudson correctly (NEVER mean of per-SNP fst):
num, den = allel.hudson_fst(ac1, ac2)
fst_manual = np.sum(num) / np.sum(den)
# Weir-Cockerham returns per-allele components (a, b, c); aggregate over BOTH axes:
a, b, c = allel.weir_cockerham_fst(gt, subpops=[[0, 1, 2, 3, 4], [5, 6, 7, 8, 9]])
fst_wc = np.sum(a) / (np.sum(a) + np.sum(b) + np.sum(c))
# Landscape: per-window FST is already ratio-aggregated within each window.
fst_windows = allel.moving_hudson_fst(ac1, ac2, size=1000)Goal: Formally test whether a population is admixed (f3) or whether gene flow violates a tree (D / ABBA-BABA).
Approach: Call the average_* form for the jackknife z-score; put the test population FIRST in f3; treat a significantly negative f3 (z < ~-3) as admixture and |z| > ~3 for D as treeness violation.
# f3(C; A, B): TEST population C is the FIRST argument. Returns (f3, se, z, vb, vj).
f3, se3, z3, vb3, vj3 = allel.average_patterson_f3(acc, aca, acb, blen=2000)
# Significantly negative f3 (z3 < ~-3) => C is admixed between A and B.
# D-statistic (ABBA-BABA): returns (d, se, z, vb, vj). |z| > ~3 flags gene flow.
d, sed, zd, vbd, vjd = allel.average_patterson_d(aca, acb, acc, acd, blen=2000)Goal: Project samples onto ancestry axes that reflect drift, not LD blocks or inversions.
Approach: Convert to a missing-free 012 matrix, LD-prune iteratively with locate_unlinked, mask known inversions by position, then run Patterson-scaled PCA (randomized at scale).
gn = gt.to_n_alt(fill=-1) # default fill=0 imputes missing to REF; use -1 then handle
gn = np.where(gn < 0, 0, gn) # impute-to-reference is a deliberate choice here
# Iterate LD pruning ~3 rounds; one pass leaves residual LD. Returns a KEEP mask (True = unlinked).
for _ in range(3):
keep = allel.locate_unlinked(gn, size=100, step=20, threshold=0.1)
gn = gn[keep]
coords, model = allel.randomized_pca(gn, n_components=10, scaler='patterson', random_state=0)
explained = model.explained_variance_ratio_ # scree; coords is (n_samples, n_components)Goal: Score the genome for recent selection from haplotype structure.
Approach: Reshape phased genotypes to a HaplotypeArray, compute the raw scan, then standardize - iHS/nSL binned by derived-allele frequency (standardize_by_allele_count), XP-EHH genome-wide (standardize); the raw scores are not directly interpretable.
h = gt.to_haplotypes() # VALID only if data are PHASED
ihs_raw = allel.ihs(h, pos, min_maf=0.05) # unstandardized
ihs_std, bins = allel.standardize_by_allele_count(ihs_raw, ac[:, 1]) # bin by DERIVED count; ac[:,1] is derived only if REF is ancestral (polarize first); |z| > 2 flags candidates
h1, h12, h123, h2_h1 = allel.garud_h(h) # soft-vs-hard-sweep haplotype-homozygosity statsTrigger: calling per-base diversity with no callability mask. Mechanism: divides the numerator by stop-start+1 (total span) instead of callable bp. Symptom: pi/theta deflated 2-5x and the genome-wide landscape distorted because callability varies per window. Fix: pass is_accessible= from a coverage/mappability callable-loci mask and inspect the returned n_bases.
Trigger: averaging per-SNP a/(a+b+c) for the genome-wide FST. Mechanism: mean-of-ratios is dominated by low-frequency SNPs with tiny noisy denominators. Symptom: a biased FST that differs from published estimates of the same comparison (Bhatia 2013). Fix: sum(a)/(sum(a)+sum(b)+sum(c)), or average_hudson_fst/average_weir_cockerham_fst which do it plus a jackknife SE.
Trigger: gt.to_n_alt() with no fill. Mechanism: missing calls become 0 alt alleles = homozygous reference. Symptom: PCA/LD silently biased toward the reference allele. Fix: to_n_alt(fill=-1) then impute deliberately, or pre-filter for high call rate; state the imputation choice.
Trigger: allel.sfs(ac[:, 1]) without a confident ancestral allele. Mechanism: sfs() is unfolded and treats the ALT count as the DERIVED count; ALT != DERIVED. Symptom: mis-polarized spectrum biasing demographic/DFE inference. Fix: use sfs_folded(ac) when polarization is uncertain; use sfs(dac) only with a verified ancestral allele.
Trigger: running selection scans on unphased genotypes or reporting raw scores. Mechanism: these stats need phased haplotype structure, and raw output is on an unstandardized scale. Symptom: meaningless scans; un-binned scores not comparable across the genome. Fix: require PHASED input and standardize - standardize_by_allele_count (DAF bins) for iHS/nSL, genome-wide standardize for XP-EHH.
Trigger: a small blen in any average_* FST or average_patterson_f3/_d. Mechanism: blocks within an LD region are correlated, so the delete-one-block jackknife under-estimates the SE. Symptom: spurious-significant f3 admixture / D-statistics. Fix: size blen to exceed the LD decay length (multi-Mb / >~1 cM for humans).
Trigger: allel.read_vcf('genome.vcf.gz') with no region/fields limits. Mechanism: read_vcf is eager and materializes the entire file in RAM. Symptom: out-of-memory crash on biobank-scale data. Fix: vcf_to_zarr once, then GenotypeDaskArray for out-of-core counting/filtering; limit read_vcf(fields=, region=).
| Item | Value / rule | Rationale |
|---|---|---|
| Accessibility deflation | multiplicative AND per-window | a 40%-accessible window deflates pi ~2.5x, a 90% one ~1.1x - the relative landscape is wrong |
| FST estimator default | Hudson for unequal n / rare variants | Bhatia 2013 recommends the ratio estimator robust to sample-size imbalance |
| Jackknife block size | blen > LD decay length | too-small blocks are correlated -> anticonservative SE -> false significance |
| f3 admixture | z < ~-3 (negative) | a significantly negative f3(C; A, B) is the formal admixture test for C |
| D / ABBA-BABA | |z| > ~3 | conventional treeness-violation / gene-flow threshold |
| iHS/XP-EHH/nSL | standardized |z| > 2, in CLUSTERS | sweeps show clusters of extreme binned z-scores, not isolated SNPs |
| LD pruning rounds | ~3 iterations of locate_unlinked | one pass leaves residual LD; expect to discard most SNPs |
| PCA scaler | 'patterson' (default) | centers then divides each SNP by sqrt(p(1-p)); equal expected variance under drift |
Thresholds are conventions, not laws - inspect distributions and verify current best practice before applying numbers blindly.
| Error / symptom | Cause | Solution |
|---|---|---|
| pi/theta look 2-5x too small | is_accessible= omitted | pass a callable-loci mask; check the returned n_bases |
| FST disagrees with published value | mean(per_snp_fst) aggregation | sum(num)/sum(den) or average_hudson_fst(ac1, ac2, blen) |
hudson_fst/patterson_fst "FST" out of range | treating the first return as FST | they return (num, den); aggregate np.sum(num)/np.sum(den) |
ValueError unpacking windowed_tajima_d | expecting 4 values | it returns 3 (D, windows, counts); windowed_diversity returns 4 |
| PCA skewed toward reference allele | to_n_alt() default fill=0 | to_n_alt(fill=-1) then impute deliberately, or pre-filter |
pca raises on -1/NaN | missing values in the 012 matrix | impute or filter; the patterson scaler cannot handle missing |
| f3 admixture test makes no sense | wrong argument order | average_patterson_f3(acc, aca, acb, blen) - test pop C is FIRST |
blockwise_patterson_f3 AttributeError | old name | use average_patterson_f3 / average_patterson_d |
| raw iHS values uninterpretable | not standardized | standardize_by_allele_count(score, aac) binned by DAF |
MemoryError on read_vcf | eager whole-genome read | vcf_to_zarr + GenotypeDaskArray; limit fields=/region= |
© 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/scikit-allel-analysis 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 Scikit Allel Analysis 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 Scikit Allel Analysis this skillGPTomics/bioSkills | 1.2k | 1 repos | ~5k | Automated safety check: Pass | MIT | |
| Scikit Bioaipoch/medical-research-skills | 2k | — | ~1.4k | Automated safety check: Pass | MIT | |
| PyDESeq2 Differential Expressiondavila7/claude-code-templates | 32k | 12 repos | ~4k | Automated safety check: Pass | MIT | |
| Volcano Plot Scriptaipoch/medical-research-skills | 2k | — | ~2.5k | Automated safety check: Pass | MIT | |
| Tooluniverse Epigenomicswu-yc/LabClaw | 1.1k | 2 repos | ~14k | Automated safety check: Pass | None | |
| StatsmodelszLanqing/codex-claude-academic-skills | 4.6k | 16 repos | ~4.9k | Automated safety check: Pass | BSD-3-Clause |
aipoch/medical-research-skills
A Python bioinformatics toolkit for sequence, phylogeny, and microbiome/community-ecology analysis; use it when you need to compute diversity/ordination/statistics from biological data and standard…
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.
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.
zLanqing/codex-claude-academic-skills
Statistical models library for Python. An agent skill from zLanqing/codex-claude-academic-skills.
oracle/graalpython
Analyze recent GraalPy benchmark regressions on master as part of the weekly rota.
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
Create and use BAI/CSI indices for BAM/CRAM files using samtools and pysam.
GPTomics/bioSkills
Sort alignment files by coordinate or read name using samtools and pysam.
Works with
Categories
In-memory Python population genetics with scikit-allel - GenotypeArray/HaplotypeArray/AlleleCountsArray, diversity (pi, theta, Tajima's D), SFS, FST (Weir-Cockerham, Hudson, Patterson), f3/D…. Bio Population Genetics Scikit Allel Analysis is an agent skill from GPTomics/bioSkills. In-memory Python population genetics with scikit-allel - GenotypeArray/HaplotypeArray/AlleleCountsArray, diversity (pi, theta, Tajima's D), SFS, FST (Weir-Cockerham, Hudson, Patterson), f3/D admixture stats, LD pruning, PCA, and selection scans (iHS, XP-EHH, nSL, Garud H).
Bio Population Genetics Scikit Allel Analysis fits situations like: computing population-genetics statistics in Python; scanning for selection; building array pipelines.
Run `npx skills add GPTomics/bioSkills --skill bio-population-genetics-scikit-allel-analysis -a claude-code`. Or copy the skill folder (population-genetics/scikit-allel-analysis in GPTomics/bioSkills) into .claude/skills/bio-population-genetics-scikit-allel-analysis in your project. Claude Code loads it when a task matches its description.
Run `npx skills add GPTomics/bioSkills --skill bio-population-genetics-scikit-allel-analysis -a codex`. Or copy the skill folder (population-genetics/scikit-allel-analysis in GPTomics/bioSkills) into .agents/skills/bio-population-genetics-scikit-allel-analysis 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-scikit-allel-analysis -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-scikit-allel-analysis, .gemini/skills/bio-population-genetics-scikit-allel-analysis, .github/skills/bio-population-genetics-scikit-allel-analysis and .opencode/skills/bio-population-genetics-scikit-allel-analysis in your project.
Going by SKILL.md and its folder, Bio Population Genetics Scikit Allel Analysis needs Python for the scripts in its folder and the command-line tools its instructions call (pip). Our summary lists: Python 3.
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 Scikit Allel Analysis is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 5k tokens (SKILL.md is roughly 20k 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 Scikit Allel Analysis: Scikit Bio (aipoch/medical-research-skills, 2k stars), PyDESeq2 Differential Expression (davila7/claude-code-templates, 32k stars), Volcano Plot Script (aipoch/medical-research-skills, 2k 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,215 GitHub stars. The repository holds 553 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.