bio-population-genetics-population-structure
Analyze population structure using PCA and admixture analysis with PLINK and ADMIXTURE. Identify population clusters, assess ancestry proportions, visualize genetic structure, and choose optimal K for admixture models. Use when analyzing population stratification with PCA or admixture.
npx skills add BioTender-max/awesome-bio-agent-skills --skill population-structure --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. # Population Structure **"Analyze population structure in my genotype data"** → Detect population stratification using PCA of genotypes and estimate ancestry proportions with ADMIXTURE modeling. - CLI: `plink2 --pca 20` for principal component analysis - CLI: `admixture genotypes.bed K` for admixture proportions Analyze genetic ancestry and population stratification using PCA and ADMIXTURE. ## Principal Component Analysis (PCA) ### PLINK 2.0 PCA ```bash # Basic PCA (10 PCs) plink2 --bfile data --pca 10 --out pca_results # More PCs plink2 --bfile data --pca 20 --out pca_results # Approximate PCA (faster for large datasets) plink2 --bfile data --pca 10 approx --out pca_results # Output variant loadings plink2
- Version Compatibility
- Principal Component Analysis (PCA)
- PLINK 2.0 PCA
- Output Files
- Variance Explained
- PCA Visualization
- LD Pruning (Before Admixture)
- Pruning Parameters
- ADMIXTURE Analysis
- Basic Usage
- Testing Multiple K Values
- Choose Optimal K
- Visualize Admixture
- FlashPCA2 (Fast PCA for Large Datasets)
Basic PCA (10 PCs) plink2 --bfile data --pca 10 --out pca_results More PCs plink2 --bfile data --pca 20 --out pca_results Approximate PCA (faster for large datasets) plink2 --bfile data --pca 10 approx --out pca_results Output variant loadings plink2 --bfile data --pca 10 var-wts --out pca_results Calculate LD and identify pruned set plink2 --bfile data --indep-pairwise 50 10 0.1 --out prune
What does the bio-population-genetics-population-structure skill do?
Analyze population structure using PCA and admixture analysis with PLINK and ADMIXTURE. Identify population clusters, assess ancestry proportions, visualize genetic structure, and choose optimal K for admixture models. Use when analyzing population stratification with PCA or admixture.
How do I install it?
Run `npx skills add BioTender-max/awesome-bio-agent-skills --skill population-structure --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.
