claw-ancestry-pca

Project cohort genotype data onto the SGDP reference panel for ancestry PCA.

1.1k|238|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/ClawBio/ClawBio --skill claw-ancestry-pca
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: claw-ancestry-pca
Source: https://github.com/ClawBio/ClawBio/tree/main/skills/claw-ancestry-pca
Command: npx skills add https://github.com/ClawBio/ClawBio --skill claw-ancestry-pca

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill places a study cohort into global genetic context by computing a joint PCA against a curated global reference panel and automating the complex preprocessing steps required for robust ancestry inference and reproducible reporting.

Core Features & Use Cases

  • Reference-aware PCA: merges cohort VCFs with the Simons Genome Diversity Project (SGDP) reference panel to show global population structure.
  • Robust preprocessing: performs contig name normalization, filters to shared biallelic SNPs, removes related individuals via IBD checks, and mean-imputes missing genotypes.
  • Publication-ready outputs: produces a multi-panel PCA composite figure (PC1vPC2, PC2vPC3, PC1vPC3, scree), CSV tables of PC coordinates and variance, a markdown report with interpretation guidance, and a reproducibility bundle (commands, environment, checksums).
  • Use Case: situate research participants on global ancestry axes, assign likely population labels for downstream analyses, and generate figures and reproducible artifacts for publications or quality control.

Quick Start

Run the ancestry PCA pipeline on your cohort VCF and population map and save the report to a results directory.

Frequently Asked Questions about claw-ancestry-pca

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run ancestry PCA on a VCF cohort against a global reference panel?

Ancestry PCA projects VCF genotype data onto the Simons Genome Diversity Project reference panel. It automates contig normalization, extracts shared biallelic SNPs, removes IBD-related samples, and mean-imputes missing genotypes for PLINK merging.

What is the best way to visualize global population structure for publication?

Visualize global population structure using a multi-panel PCA composite figure showing PC1vPC2, PC2vPC3, PC1vPC3, and a scree plot. This Skill generates publication-ready figures alongside CSV tables of PC coordinates and variance.

Do I need to preprocess VCF files before running population genetics PCA?

Preprocessing VCF files is handled automatically before population genetics PCA. The pipeline normalizes contig names, matches common biallelic SNPs, removes related individuals via IBD checks, and mean-imputes missing genotypes.

Does PLINK work with VCF data for ancestry decomposition?

PLINK works with VCF data for ancestry decomposition by merging cohort genotypes with the SGDP reference panel. The pipeline handles contig normalization and missing genotype imputation to ensure PLINK-compatible joint PCA.

How do I assign likely population labels to study participants from genotype data?

Assign likely population labels by projecting study participants onto global ancestry axes computed from the SGDP reference panel. PC coordinates place cohorts in global context for downstream population assignment and quality control.

Why does ancestry PCA require removing related individuals from genotype data?

Ancestry PCA requires removing related individuals because IBD sharing skews principal components and distorts global population structure. The pipeline detects related samples via IBD checks and excludes them before computing PC coordinates.