COMPUTE, DON'T DESCRIBE
When analysis requires computation (statistics, data processing, scoring, enrichment), write and run Python code via Bash. Don't describe what you would do — execute it and report actual results. Use ToolUniverse tools to retrieve data, then Python (pandas, scipy, statsmodels, matplotlib) to analyze it.
Population Genetics with 1000 Genomes (IGSR)
Use IGSR tools to search 1000 Genomes populations and samples, explore data collections, and
combine with GWAS tools for population-stratified analysis.
When to Use
- "List all African (AFR) populations in the 1000 Genomes Project"
- "Find samples from the YRI (Yoruba) population"
- "What 1000 Genomes data collections are available?"
- "Which GWAS SNPs for type 2 diabetes have population-specific effects?"
- "Find all SNPs mapped to TCF7L2 in GWAS studies"
NOT for (use other skills instead)
- Allele frequencies from gnomAD -> Use
tooluniverse-population-genetics
- ClinVar / OMIM variant interpretation -> Use
tooluniverse-variant-interpretation
- GWAS fine-mapping -> Use
tooluniverse-gwas-finemapping
Phase 1: Search 1000 Genomes Populations
IGSR_search_populations: superpopulation (string/null, one of AFR/AMR/EAS/EUR/SAS), query (string/null, free-text search by name), limit (int).
Returns {status, data: {total, populations: [{code, name, description, sample_count, superpopulation_code, superpopulation_name, latitude, longitude}]}, metadata: {source, filter_superpopulation, filter_query}}.
Superpopulation codes:
| Code |
Ancestry |
| AFR |
African |
| AMR |
Admixed American |
| EAS |
East Asian |
| EUR |
European |
| SAS |
South Asian |
// List all AFR populations
{"superpopulation": "AFR", "limit": 10}
// Search by name (free-text)
{"query": "Yoruba", "limit": 5}
// List all populations
{"limit": 26}
Response example:
{
"status": "success",
"data": {
"total": 3,
"populations": [
{"code": "YRI", "name": "Yoruba", "description": "Yoruba in Ibadan, Nigeria",
"sample_count": 188, "superpopulation_code": "AFR", "superpopulation_name": "African Ancestry"}
]
}
}
Phase 2: Search Samples by Population
IGSR_search_samples: population (string/null, population code e.g. "YRI"), data_collection (string/null, collection title), sample_name (string/null, specific sample e.g. "NA12878"), limit (int).
Returns {status, data: {total, samples: [{name, sex, biosample_id, populations: [{code, name, superpopulation}], data_collections: [...]}]}}.
// Find all YRI samples
{"population": "YRI", "limit": 10}
// Look up the reference sample NA12878
{"sample_name": "NA12878", "limit": 1}
// Find samples in the 30x high-coverage collection
{"data_collection": "1000 Genomes 30x on GRCh38", "limit": 5}
NOTE: population takes a population code (e.g. "YRI", "GBR", "CHB"), not a superpopulation code. Use IGSR_search_populations first to get population codes if starting from a superpopulation.
Phase 3: List Data Collections
IGSR_list_data_collections: limit (int).
Returns {status, data: {total, collections: [{code, title, short_title, sample_count, population_count, data_types, website}]}}.
{"limit": 20}
Key collections available (18 total):
| Collection |
Description |
Data Types |
| 1000 Genomes on GRCh38 |
2709 samples, 26 populations |
sequence, alignment, variants |
| 1000 Genomes 30x on GRCh38 |
High-coverage resequencing |
sequence, alignment, variants |
| 1000 Genomes phase 3 release |
Original phase 3 |
sequence, alignment, variants |
| Human Genome Structural Variation Consortium |
HGSVC SV discovery |
sequence, alignment |
| MAGE RNA-seq |
RNA-seq data |
- |
| Geuvadis |
Expression + genotype |
- |
Phase 4: GWAS Context for Population Stratification
Search GWAS associations for a trait
gwas_search_associations: trait (string, free text), limit (int).
Returns GWAS associations with rsID, p-value, mapped genes, EFO trait IDs.
{"trait": "type 2 diabetes", "limit": 10}
Get variants for a specific trait (by EFO ID)
gwas_get_variants_for_trait: trait (string, EFO ID e.g. "EFO_0001645"), limit (int).
{"trait": "EFO_0001645", "limit": 10}
Find SNPs in a gene from GWAS catalog
gwas_get_snps_for_gene: gene_symbol (string), limit (int).
Returns SNPs mapped to the gene with rsIDs, genomic positions, functional classes.
{"gene_symbol": "TCF7L2", "limit": 10}
Workflow: Population Stratification in GWAS
Step 1 -- Find populations of interest:
// Get all EUR populations
{"superpopulation": "EUR", "limit": 10}
// -> Returns codes like GBR, FIN, CEU, TSI, IBS
Step 2 -- Get samples from target population:
// Get YRI samples (AFR)
{"population": "YRI", "limit": 100}
Step 3 -- Get GWAS SNPs for the gene or trait:
// GWAS hits for TCF7L2 (T2D gene)
{"gene_symbol": "TCF7L2", "limit": 20}
Step 4 -- Cross-reference with population data for stratification analysis.
Common Population Codes
| Code |
Population |
Superpopulation |
| YRI |
Yoruba in Ibadan, Nigeria |
AFR |
| LWK |
Luhya in Webuye, Kenya |
AFR |
| GWD |
Gambian Mandinka |
AFR |
| CEU |
Utah residents (CEPH) |
EUR |
| GBR |
British in England/Scotland |
EUR |
| FIN |
Finnish in Finland |
EUR |
| TSI |
Toscani in Italia |
EUR |
| CHB |
Han Chinese in Beijing |
EAS |
| JPT |
Japanese in Tokyo |
EAS |
| CHS |
Southern Han Chinese |
EAS |
| MXL |
Mexican Ancestry in LA |
AMR |
| PUR |
Puerto Rican in Puerto Rico |
AMR |
| GIH |
Gujarati Indian in Houston |
SAS |
| PJL |
Punjabi from Lahore |
SAS |
Reasoning Framework for Result Interpretation
Evidence Grading
| Grade |
Criteria |
Example |
| Strong |
AF difference > 0.2 across superpopulations, GWAS p < 5e-8, replicated in multiple cohorts |
rs7903146 (TCF7L2) with AF = 0.30 EUR vs 0.05 EAS, GWAS p = 1e-40 |
| Moderate |
AF difference 0.05-0.2, GWAS p < 5e-8 in one ancestry, nominal in others |
Variant with AF = 0.15 AFR vs 0.08 EUR, GWAS p < 5e-8 in EUR only |
| Weak |
AF difference < 0.05, GWAS p < 5e-8 but single study, no cross-ancestry replication |
Common variant with similar AF across populations, significant in one cohort |
| Population-specific |
Variant common (AF > 0.01) in one superpopulation, rare (AF < 0.01) in others |
Sickle cell variant (rs334) AF ~0.10 in AFR, < 0.001 elsewhere |
Interpretation Guidance
- Allele frequency interpretation by ancestry: Allele frequencies vary across superpopulations (AFR, AMR, EAS, EUR, SAS) due to genetic drift, selection, and demographic history. AFR populations have the highest genetic diversity and longest haplotypes broken by recombination. Disease-risk alleles may be common in one ancestry and rare in another, leading to differential genetic risk across populations.
- Fst significance thresholds: Fst measures population differentiation (0 = no differentiation, 1 = complete fixation of different alleles). Global Fst for human populations averages ~0.12. Locus-specific Fst > 0.3 suggests strong differentiation (possible selection). Fst > 0.5 is extreme and rare in humans outside known selection targets (e.g., SLC24A5 for skin pigmentation). Compare locus Fst against genome-wide distribution to identify outliers.
- LD interpretation: Linkage disequilibrium (LD) patterns differ by ancestry. AFR populations have shorter LD blocks due to older demographic history, requiring denser genotyping for fine-mapping. EUR and EAS populations have longer LD blocks. When a GWAS hit is in LD with multiple variants, the causal variant is more likely to be resolved in AFR-ancestry data. Report r-squared values: r2 > 0.8 = strong LD, 0.2-0.8 = moderate, < 0.2 = weak.
- Population stratification: Uncontrolled population structure in GWAS inflates false positives. The 1000 Genomes superpopulation labels provide a framework for stratified analysis. Mixed-ancestry samples (e.g., AMR) require local ancestry deconvolution for accurate interpretation.
- Sample size context: 1000 Genomes has ~2500 samples across 26 populations. Population-specific allele frequencies have limited precision for smaller populations (N < 100). For rare variants (AF < 0.01), larger resources like gnomAD provide more reliable estimates.
Synthesis Questions
- Does the allele frequency of the variant of interest differ meaningfully (> 5%) across superpopulations, and could this explain differential disease prevalence or GWAS effect sizes?
- Is the GWAS association replicated across ancestries, or is it population-specific, potentially due to LD structure differences or population-specific selection?
- For fine-mapping, does the LD pattern in AFR populations narrow the association signal compared to EUR, helping identify the likely causal variant?
- Are the population labels and sample sizes in the 1000 Genomes dataset adequate for the analysis, or is the target population underrepresented?
- Could population stratification (uncontrolled ancestry differences between cases and controls) explain the observed association, rather than a true genetic effect?
Tool Parameter Quick Reference
| Tool |
Key Parameters |
Notes |
| IGSR_search_populations |
superpopulation, query, limit |
superpopulation: AFR/AMR/EAS/EUR/SAS |
| IGSR_search_samples |
population, data_collection, sample_name, limit |
population = population code (e.g. YRI) |
| IGSR_list_data_collections |
limit |
18 collections total |
| gwas_search_associations |
trait, limit |
free-text trait search |
| gwas_get_variants_for_trait |
trait, limit |
trait = EFO ID |
| gwas_get_snps_for_gene |
gene_symbol, limit |
returns mapped SNPs |
1---
2name: tooluniverse-population-genetics-1000genomes
3description: Population genetics using the 1000 Genomes Project (IGSR) — superpopulation/population search, sample metadata, variant frequencies across AFR/AMR/EAS/EUR/SAS, ancestry-specific analyses. Use for ancestry comparison, population-aware allele frequency lookups, and 1000-Genomes-cohort-specific analyses (distinct from gnomAD which has different sample composition).
4triggers:
5 - keywords: [1000 Genomes, IGSR, population, superpopulation, AFR, AMR, EAS, EUR, SAS, YRI, GBR, CHB, population stratification, ancestry, admixture, allele frequency, population genetics]
6 - patterns: ["population code", "population stratification", "ancestral population", "1000 Genomes sample", "continental ancestry", "superpopulation filter"]
7disable-model-invocation: true
8---
9
10## COMPUTE, DON'T DESCRIBE
11When analysis requires computation (statistics, data processing, scoring, enrichment), write and run Python code via Bash. Don't describe what you would do — execute it and report actual results. Use ToolUniverse tools to retrieve data, then Python (pandas, scipy, statsmodels, matplotlib) to analyze it.
12
13# Population Genetics with 1000 Genomes (IGSR)
14
15Use IGSR tools to search 1000 Genomes populations and samples, explore data collections, and
16combine with GWAS tools for population-stratified analysis.
17
18## When to Use
19
20- "List all African (AFR) populations in the 1000 Genomes Project"
21- "Find samples from the YRI (Yoruba) population"
22- "What 1000 Genomes data collections are available?"
23- "Which GWAS SNPs for type 2 diabetes have population-specific effects?"
24- "Find all SNPs mapped to TCF7L2 in GWAS studies"
25
26## NOT for (use other skills instead)
27
28- Allele frequencies from gnomAD -> Use `tooluniverse-population-genetics`
29- ClinVar / OMIM variant interpretation -> Use `tooluniverse-variant-interpretation`
30- GWAS fine-mapping -> Use `tooluniverse-gwas-finemapping`
31
32---
33
34## Phase 1: Search 1000 Genomes Populations
35
36**IGSR_search_populations**: `superpopulation` (string/null, one of AFR/AMR/EAS/EUR/SAS), `query` (string/null, free-text search by name), `limit` (int).
37Returns `{status, data: {total, populations: [{code, name, description, sample_count, superpopulation_code, superpopulation_name, latitude, longitude}]}, metadata: {source, filter_superpopulation, filter_query}}`.
38
39Superpopulation codes:
40| Code | Ancestry |
41|------|----------|
42| AFR | African |
43| AMR | Admixed American |
44| EAS | East Asian |
45| EUR | European |
46| SAS | South Asian |
47
48```json
49// List all AFR populations
50{"superpopulation": "AFR", "limit": 10}
51
52// Search by name (free-text)
53{"query": "Yoruba", "limit": 5}
54
55// List all populations
56{"limit": 26}
57```
58
59Response example:
60```json
61{
62 "status": "success",
63 "data": {
64 "total": 3,
65 "populations": [
66 {"code": "YRI", "name": "Yoruba", "description": "Yoruba in Ibadan, Nigeria",
67 "sample_count": 188, "superpopulation_code": "AFR", "superpopulation_name": "African Ancestry"}
68 ]
69 }
70}
71```
72
73---
74
75## Phase 2: Search Samples by Population
76
77**IGSR_search_samples**: `population` (string/null, population code e.g. "YRI"), `data_collection` (string/null, collection title), `sample_name` (string/null, specific sample e.g. "NA12878"), `limit` (int).
78Returns `{status, data: {total, samples: [{name, sex, biosample_id, populations: [{code, name, superpopulation}], data_collections: [...]}]}}`.
79
80```json
81// Find all YRI samples
82{"population": "YRI", "limit": 10}
83
84// Look up the reference sample NA12878
85{"sample_name": "NA12878", "limit": 1}
86
87// Find samples in the 30x high-coverage collection
88{"data_collection": "1000 Genomes 30x on GRCh38", "limit": 5}
89```
90
91NOTE: `population` takes a population code (e.g. "YRI", "GBR", "CHB"), not a superpopulation code. Use IGSR_search_populations first to get population codes if starting from a superpopulation.
92
93---
94
95## Phase 3: List Data Collections
96
97**IGSR_list_data_collections**: `limit` (int).
98Returns `{status, data: {total, collections: [{code, title, short_title, sample_count, population_count, data_types, website}]}}`.
99
100```json
101{"limit": 20}
102```
103
104Key collections available (18 total):
105| Collection | Description | Data Types |
106|------------|-------------|------------|
107| 1000 Genomes on GRCh38 | 2709 samples, 26 populations | sequence, alignment, variants |
108| 1000 Genomes 30x on GRCh38 | High-coverage resequencing | sequence, alignment, variants |
109| 1000 Genomes phase 3 release | Original phase 3 | sequence, alignment, variants |
110| Human Genome Structural Variation Consortium | HGSVC SV discovery | sequence, alignment |
111| MAGE RNA-seq | RNA-seq data | - |
112| Geuvadis | Expression + genotype | - |
113
114---
115
116## Phase 4: GWAS Context for Population Stratification
117
118### Search GWAS associations for a trait
119
120**gwas_search_associations**: `trait` (string, free text), `limit` (int).
121Returns GWAS associations with rsID, p-value, mapped genes, EFO trait IDs.
122
123```json
124{"trait": "type 2 diabetes", "limit": 10}
125```
126
127### Get variants for a specific trait (by EFO ID)
128
129**gwas_get_variants_for_trait**: `trait` (string, EFO ID e.g. "EFO_0001645"), `limit` (int).
130
131```json
132{"trait": "EFO_0001645", "limit": 10}
133```
134
135### Find SNPs in a gene from GWAS catalog
136
137**gwas_get_snps_for_gene**: `gene_symbol` (string), `limit` (int).
138Returns SNPs mapped to the gene with rsIDs, genomic positions, functional classes.
139
140```json
141{"gene_symbol": "TCF7L2", "limit": 10}
142```
143
144---
145
146## Workflow: Population Stratification in GWAS
147
148Step 1 -- Find populations of interest:
149```json
150// Get all EUR populations
151{"superpopulation": "EUR", "limit": 10}
152// -> Returns codes like GBR, FIN, CEU, TSI, IBS
153```
154
155Step 2 -- Get samples from target population:
156```json
157// Get YRI samples (AFR)
158{"population": "YRI", "limit": 100}
159```
160
161Step 3 -- Get GWAS SNPs for the gene or trait:
162```json
163// GWAS hits for TCF7L2 (T2D gene)
164{"gene_symbol": "TCF7L2", "limit": 20}
165```
166
167Step 4 -- Cross-reference with population data for stratification analysis.
168
169---
170
171## Common Population Codes
172
173| Code | Population | Superpopulation |
174|------|-----------|-----------------|
175| YRI | Yoruba in Ibadan, Nigeria | AFR |
176| LWK | Luhya in Webuye, Kenya | AFR |
177| GWD | Gambian Mandinka | AFR |
178| CEU | Utah residents (CEPH) | EUR |
179| GBR | British in England/Scotland | EUR |
180| FIN | Finnish in Finland | EUR |
181| TSI | Toscani in Italia | EUR |
182| CHB | Han Chinese in Beijing | EAS |
183| JPT | Japanese in Tokyo | EAS |
184| CHS | Southern Han Chinese | EAS |
185| MXL | Mexican Ancestry in LA | AMR |
186| PUR | Puerto Rican in Puerto Rico | AMR |
187| GIH | Gujarati Indian in Houston | SAS |
188| PJL | Punjabi from Lahore | SAS |
189
190---
191
192## Reasoning Framework for Result Interpretation
193
194### Evidence Grading
195
196| Grade | Criteria | Example |
197|-------|----------|---------|
198| **Strong** | AF difference > 0.2 across superpopulations, GWAS p < 5e-8, replicated in multiple cohorts | rs7903146 (TCF7L2) with AF = 0.30 EUR vs 0.05 EAS, GWAS p = 1e-40 |
199| **Moderate** | AF difference 0.05-0.2, GWAS p < 5e-8 in one ancestry, nominal in others | Variant with AF = 0.15 AFR vs 0.08 EUR, GWAS p < 5e-8 in EUR only |
200| **Weak** | AF difference < 0.05, GWAS p < 5e-8 but single study, no cross-ancestry replication | Common variant with similar AF across populations, significant in one cohort |
201| **Population-specific** | Variant common (AF > 0.01) in one superpopulation, rare (AF < 0.01) in others | Sickle cell variant (rs334) AF ~0.10 in AFR, < 0.001 elsewhere |
202
203### Interpretation Guidance
204
205- **Allele frequency interpretation by ancestry**: Allele frequencies vary across superpopulations (AFR, AMR, EAS, EUR, SAS) due to genetic drift, selection, and demographic history. AFR populations have the highest genetic diversity and longest haplotypes broken by recombination. Disease-risk alleles may be common in one ancestry and rare in another, leading to differential genetic risk across populations.
206- **Fst significance thresholds**: Fst measures population differentiation (0 = no differentiation, 1 = complete fixation of different alleles). Global Fst for human populations averages ~0.12. Locus-specific Fst > 0.3 suggests strong differentiation (possible selection). Fst > 0.5 is extreme and rare in humans outside known selection targets (e.g., SLC24A5 for skin pigmentation). Compare locus Fst against genome-wide distribution to identify outliers.
207- **LD interpretation**: Linkage disequilibrium (LD) patterns differ by ancestry. AFR populations have shorter LD blocks due to older demographic history, requiring denser genotyping for fine-mapping. EUR and EAS populations have longer LD blocks. When a GWAS hit is in LD with multiple variants, the causal variant is more likely to be resolved in AFR-ancestry data. Report r-squared values: r2 > 0.8 = strong LD, 0.2-0.8 = moderate, < 0.2 = weak.
208- **Population stratification**: Uncontrolled population structure in GWAS inflates false positives. The 1000 Genomes superpopulation labels provide a framework for stratified analysis. Mixed-ancestry samples (e.g., AMR) require local ancestry deconvolution for accurate interpretation.
209- **Sample size context**: 1000 Genomes has ~2500 samples across 26 populations. Population-specific allele frequencies have limited precision for smaller populations (N < 100). For rare variants (AF < 0.01), larger resources like gnomAD provide more reliable estimates.
210
211### Synthesis Questions
212
2131. Does the allele frequency of the variant of interest differ meaningfully (> 5%) across superpopulations, and could this explain differential disease prevalence or GWAS effect sizes?
2142. Is the GWAS association replicated across ancestries, or is it population-specific, potentially due to LD structure differences or population-specific selection?
2153. For fine-mapping, does the LD pattern in AFR populations narrow the association signal compared to EUR, helping identify the likely causal variant?
2164. Are the population labels and sample sizes in the 1000 Genomes dataset adequate for the analysis, or is the target population underrepresented?
2175. Could population stratification (uncontrolled ancestry differences between cases and controls) explain the observed association, rather than a true genetic effect?
218
219---
220
221## Tool Parameter Quick Reference
222
223| Tool | Key Parameters | Notes |
224|------|---------------|-------|
225| IGSR_search_populations | superpopulation, query, limit | superpopulation: AFR/AMR/EAS/EUR/SAS |
226| IGSR_search_samples | population, data_collection, sample_name, limit | population = population code (e.g. YRI) |
227| IGSR_list_data_collections | limit | 18 collections total |
228| gwas_search_associations | trait, limit | free-text trait search |
229| gwas_get_variants_for_trait | trait, limit | trait = EFO ID |
230| gwas_get_snps_for_gene | gene_symbol, limit | returns mapped SNPs |