claw-ancestry-pca

Analyze population genetic structure with PCA against SGDP data.

Updated May 10, 2026
One-click install
npx skills add https://github.com/MubasherMohammed/opencode-BioInfo --skill claw-ancestry-pca-mubashermohammed
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: claw-ancestry-pca
Source: https://github.com/MubasherMohammed/opencode-BioInfo/tree/main/python/skills/claw-ancestry-pca
Command: npx skills add https://github.com/MubasherMohammed/opencode-BioInfo --skill claw-ancestry-pca-mubashermohammed

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pandas, numpy, matplotlib, scikit-learn, adjustText, pandas, numpy, matplotlib, scikit-learn, adjustText, plink, bcftools, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill allows for the analysis of population genetic structure using PCA against the Simons Genome Diversity Project data, helping users place their study cohort within the global genetic context.

Core Features & Use Cases

  • PCA on SGDP Data: Compute PCA against the Simons Genome Diversity Project dataset for global genetic context analysis.
  • Ancestry Decomposition: Decompose ancestry based on PCA results.
  • Population Mapping: Map study cohort samples to population labels based on the SGDP dataset.
  • Visualization: Generate multi-panel PCA composite figures for visual analysis.
  • Report Generation: Generate markdown report with population assignments and statistics.
  • Use Case: For a researcher working with a VCF file of their study cohort, this skill can help determine population affinities and genetic structure.

Quick Start

Run the 'ancestry_pca' script with the provided VCF and population map files.

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 PCA on VCF files for ancestry analysis using SGDP data?

To run PCA on VCF files for ancestry analysis, execute the 'ancestry_pca' script with your study cohort VCF and a population map to compute genetic structure against SGDP data. It requires PLINK and bcftools to process the VCF and generate multi-panel PCA figures.

What is PCA for population genetics and how does it map ancestry?

PCA for population genetics is a statistical method that decomposes genetic diversity into principal components to map ancestry. By projecting your cohort against the Simons Genome Diversity Project data, it assigns population labels and determines global genetic affinities.

Do I need PLINK and bcftools to compute genetic diversity with SGDP data?

Yes, you need PLINK and bcftools installed to compute genetic diversity with SGDP data. These dependencies handle the underlying VCF processing and genetic data manipulation required before Python libraries like pandas and scikit-learn can perform the statistical analysis.

Can I visualize population structure from a VCF file using matplotlib?

Yes, you can visualize population structure from a VCF file using matplotlib. The skill generates multi-panel PCA composite figures with adjusted text labels to plot the computed ancestry decomposition and population mapping results for visual analysis.

What's the best way to assign population labels to my study cohort?

The best way to assign population labels is to use PCA against the Simons Genome Diversity Project dataset. This maps your study cohort samples to known population affinities and generates a markdown report containing the population assignments and statistics.

What limitations exist when analyzing genetic diversity with scikit-learn?

When analyzing genetic diversity with scikit-learn, limitations include the need for prerequisite VCF formatting via bcftools and PLINK. The analysis relies on Python libraries like pandas and numpy for statistical computation, requiring proper environment setup to avoid processing errors.