Agent skill

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.

majiayu000534★ · 1 repos on radarProfile →
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill population-structure-gptomics-bioskills-2 --agent claude-code

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

Facts
Files in the skill folder: 2
SKILL.md size: 8 KB
Bundled scripts: none
Path: skills/ai-ml/population-structure-gptomics-bioskills-2/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

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

From the SKILL.md

# Population Structure 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 --bfile data --pca 10 var-wts --out pca_results ``` ### Output Files | File | Contents | |------|----------| | `.eigenvec` | PC scores per sample (FID, IID, PC1, PC2, ...) | | `.eigenval` | Eigenvalues (variance explained) | | `.eigenvec.var` | Variant loadings (if var-wts) | ### Variance Explained ```python import numpy as np eigenvalues = np.loadtxt('pca_results.eigenval') variance_explained = eigenvalues / eigenvalues.sum() * 100 cumulative = np.cumsum(variance_explained) for i, (ve, cum) in enumerate(zip(variance_explained, cumulative), 1): print(f'PC{i}: {ve:.2f}% (cumulative: {cum:.2f}%)') ``` ### PCA Visualization ```python import pandas as pd import matplotlib.pyplot as plt eigenvec = pd.read_csv('pca_results.eigenvec', sep='\s+', header=None) eigenvec.col

What's inside
Steps it walks through
  1. Principal Component Analysis (PCA)
  2. PLINK 2.0 PCA
  3. Output Files
  4. Variance Explained
  5. PCA Visualization
  6. LD Pruning (Before Admixture)
  7. Pruning Parameters
  8. ADMIXTURE Analysis
  9. Basic Usage
  10. Testing Multiple K Values
  11. Choose Optimal K
  12. Visualize Admixture
  13. FlashPCA2 (Fast PCA for Large Datasets)
  14. Installation
Ships with 1 file
  • metadata.json
Commands it runs
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
More from claude-skill-registry
All skills →
About this skill
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 majiayu000/claude-skill-registry --skill population-structure-gptomics-bioskills-2 --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 majiayu000/claude-skill-registry, a repository with 534 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