Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Open in Colab

3.2 The selection atlas: is your gene under selection?

Theme: Analysis | Tools & technology

In Module 3.1 we found that the Cyp6aa1 duplication is almost fixed around Busia, and that other variants near our genes are common. A variant that helps mosquitoes survive insecticides should rise in frequency quickly, dragging nearby DNA with it: a selective sweep. If our candidate genes sit inside a sweep in wild Busia mosquitoes, that is independent evidence that something at the locus matters for survival.

In the MalariaGEN–PAMCA course you learned to compute an H12 genome-wide selection scan yourself (W6-M3). Here we use the Malaria Vector Selection Atlas, which has already run H12, G123 and iHS scans for every well-sampled cohort in Ag3 and called the selection signals in each one. We learn how the signals are called, how to read the website, and how to query the signal table for our genes.

Learning objectives

At the end of this module you will be able to:

  • Explain in a few sentences what H12, G123 and iHS measure and when each is useful.

  • Describe how the atlas calls a signal (peak fit, ΔAIC) and what the focus, span1 and span2 intervals mean.

  • Navigate the atlas website (cohort, chromosome and alert pages).

  • Query the signal table for East African cohorts and find signals that overlap your candidate genes, converting between arm (2R, 2L) and compound contig (2RL) coordinates.

  • Compare signals at a locus across cohorts, taxa and years.

Setup

We only need malariagen_data for gene coordinates and contig lengths; the atlas itself is a single table.

Theory: three selection statistics in brief

All three statistics look for the footprint of a recent sweep: a stretch of genome where many mosquitoes carry the same, or very similar, haplotypes because one haplotype rose in frequency faster than recombination could break it up.

  • H12 [1] measures haplotype homozygosity in windows of a fixed number of SNPs, adding together the frequencies of the two most common haplotypes. It is high for hard sweeps (one haplotype) and for soft sweeps (a few haplotypes). It needs phased haplotypes. This is the statistic you computed in W6-M3.

  • G123 [2] is the unphased equivalent: it works on multilocus genotypes, so it does not depend on phasing. It usually tells the same story as H12.

  • iHS [3] compares how far haplotype homozygosity extends around the two alleles of each SNP. It is most sensitive to incomplete sweeps, where the favoured allele is at intermediate frequency, and less sensitive once the sweep is near fixation.

Each statistic depends on the window size (H12, G123) and on the sample size, and demography can mimic sweeps (for example in inbred populations; see W7-M3). A signal says “something here was selected recently”; it does not say which variant.

How the atlas calls a signal

The atlas groups Ag3 mosquitoes into cohorts: females of one taxon from one level-2 administrative unit (district) collected in one quarter (or year). Cohorts need at least 15 mosquitoes; larger ones are downsampled to 100. For each cohort the H12 and G123 window size is calibrated on chromosome 3RL: it is the smallest window for which 95 % of windows have a value below 0.08. Busia 2016 has 24 mosquitoes and an H12 window of 2,000 SNPs.

Signals are then called from the H12 scan only:

  1. Outlier windows are removed with a Hampel filter.

  2. Physical positions (bp) are converted to genetic positions (cM) with a recombination map, so peak widths are comparable along the genome.

  3. In steps of 1 cM along each chromosome, two models are fitted to the H12 values: a flat line (no signal) and a skewed exponential peak with a centre, amplitude, decay (width), skew and baseline.

  4. A signal is kept if the peak fits much better than the flat line, ΔAIC = AIC(flat) − AIC(peak) > 1000, and the highest H12 value in the peak is above 0.1.

  5. Overlapping signals in a cohort are merged, keeping the one with the largest ΔAIC.

From the fitted peak the atlas reports three nested intervals around the centre, on each side using that side’s decay constant:

IntervalWidthUse
focuscentre ± 0.25 × decaythe core, most likely to contain the selected variant
span1centre ± 1 × decaya conservative extent of the signal
span2centre ± 2 × decaythe broad footprint; genes here may just be hitchhiking

Each interval is given in cM (focus_gstart, …) and bp (focus_pstart, …). Other useful columns: pcenter (fitted centre, bp), stat_max (highest observed H12 in the signal, a rough guide to how complete the sweep is) and delta_i (ΔAIC, how confident we are there is a peak).

Chromosome naming. The atlas scans the compound contigs 2RL (2R followed by 2L) and 3RL (3R followed by 3L) so that sweeps near the centromere are not cut in two. Positions on 2L and 3L are therefore shifted by the length of 2R or 3R. We deal with this below.

Reading the website

The atlas website is at https://anopheles-genomic-surveillance.github.io/selection-atlas/ (choose An. gambiae complex). It has four kinds of page:

  • Cohort pages, e.g. Uganda / Busia / gambiae / 2016 / Q2: sample details, a map, and H12, G123 and iHS tracks for each chromosome with the called signals shaded and a gene track underneath. Hover to see values; zoom to a signal.

  • Chromosome pages, e.g. 2RL: every cohort’s signals stacked along one chromosome, which shows loci under selection in many places at once.

  • Country pages, e.g. Uganda: all cohorts from one country.

  • Selection alerts: named loci with known resistance genes and the cohorts with signals there, e.g. SA-AGAM-04 Cyp6aa/Cyp6p, SA-AGAM-05 Cyp9k1 and SA-AGAM-06 Gste.

The Methods and Glossary pages explain the analysis. Open the Busia 2016 page now and keep it open while you work through the notebook.

Load the signal table

The atlas has no Python API: everything is in one table with one row per signal.

357 signals in 55 cohorts
Loading...

East African cohorts

We keep cohorts from Uganda, Kenya and Tanzania. Muleba and Tarime (Tanzania) are on the southern and eastern shores of Lake Victoria.

Loading...

There is no Kenyan An. gambiae cohort in this version of the atlas. The Teso North (Busia County, Kenya) mosquitoes we used in Module 3.1 were added to Ag3 more recently.

Converting between arms and compound contigs

Gene annotations use the chromosome arms (2R, 2L, 3R, 3L, X); the atlas uses 2RL and 3RL. The offset for a position on 2L is the length of 2R, and for 3L the length of 3R. We read the arm lengths from the reference genome rather than typing them in.

The Busia signal at 2RL ~95.65 Mb is on 2L at ~34.10 Mb. malariagen_data knows about the compound contigs too, so we can check our offsets against its own conversion:

Loading...
Loading...

What is inside the Busia signals?

Let’s list the genes in the focus interval of each Busia 2016 signal. genome_features() accepts compound contig regions directly.

2RL:28392356-28562669 (arm 2R:28,482,008) stat_max=0.80 delta_i=3896: 16 genes; named: CYP6AA1, CYP6AA2, COEAE6O, CYP6P15P, CYP6P3, CYP6P5, CYP6P4, CYP6P1, CYP6P2, CYP6AD1
2RL:95578843-95697699 (arm 2L:34,101,223) stat_max=0.37 delta_i=3121: 31 genes; named: 
3RL:28573591-28623590 (arm 3R:28,591,758) stat_max=0.36 delta_i=2233: 13 genes; named: GSTE8, GSTE6, GSTE5, GSTE4, GSTE2, GSTE1, GSTE7, GSTE3
X:15177805-15399955 (arm X:15,286,664) stat_max=0.15 delta_i=1676: 14 genes; named: CYP9K1, CPR125, CASPS7, MIP

The strongest Busia signal (H12 up to 0.80) is centred on the Cyp6aa/Cyp6p cluster on 2R, almost exactly on Cyp6aa1. This is the locus of the East African triple mutant [4]: the Cyp6aap_Dup1 duplication of Cyp6aa1, CYP6P4 I236M, and a transposable element (ZZB) insertion near Cyp6p4. In Module 3.1 we saw the duplication in 95–100 % of Busia mosquitoes. On Day 4 you will see that two markers of this haplotype on the Ag-vampIR panel, Cyp6p4_I236M and Cyp6_tag8, are associated with surviving deltamethrin in Siaya. The other Busia signals sit on the Gste cluster (3R), on Cyp9k1 (X) and at ~34.1 Mb on 2L.

Seeing the peak model

To make the intervals concrete, we redraw the fitted peak for the Busia Cyp6 signal from its parameters. The model is fitted in genetic coordinates (cM).

Loading...

The observed H12 values that this curve was fitted to are shown on the cohort page of the website, and we recompute them in Module 3.3.

Do signals overlap your candidate genes?

We look up the candidate genes, convert their coordinates to atlas contigs, and find every signal in every cohort whose focus, span1 or span2 overlaps each gene.

Loading...
Loading...

Both default genes are inside the focus of a Busia 2016 signal: CYP6AA1 contains the fitted centre of the 2R signal, and GSTE4 is a few kb from the centre of the Gste signal. Being in the focus is suggestive, not proof: the Gste focus contains several GST genes, and the Cyp6 focus spans about 170 kb and many genes. Which variant was selected needs the follow-up in Module 3.3.

How widespread is selection at your genes?

Counting cohorts with a signal at the gene across the whole atlas shows whether the locus is under selection in many places and taxa (parallel selection) or only locally.

Loading...

Comparing cohorts around Lake Victoria

A lane plot shows each cohort’s signals at a locus as nested bars (thin = span2, medium = span1, thick = focus), with a dot at the centre coloured by stat_max. Vertical lines mark genes of interest. We plot in arm coordinates.

Loading...

Every East African cohort, including the An. arabiensis cohorts, has a signal at the Cyp6 cluster. In the An. gambiae cohorts the centres fall within a few tens of kb of Cyp6aa1. Now the Gste cluster on 3R:

Loading...

Signals through time

Uganda has An. gambiae cohorts from 2012 to 2017. Below, for each Ugandan cohort we take the strongest signal at four loci and plot its stat_max by year.

Loading...

Read trends like this with care. The cohorts come from different districts, the sample sizes and window sizes differ, and H12 is not an allele frequency: a sweep can become less visible to H12 as it approaches fixation and recombination erodes the haplotype, or if several haplotypes are selected (a soft sweep). Frequencies of the selected variants (Module 3.1) are the better way to track change over time.

Exercise 1

For each of your own candidate genes, which Busia 2016 signal (if any) contains it, and in which interval? How far is it from the signal centre? How many genes are in that signal’s focus?

Show answer

Use hits.query("cohort_id == @BUSIA") for the interval and distance, and the gene listing loop above for the focus contents. With the defaults: CYP6AA1 contains the centre of the 2R signal (distance 0), and GSTE4 lies a few kb from the centre of the 3R Gste signal, inside its focus. A gene 500 kb from the centre and only in span2 is much weaker evidence than a gene at the centre.

Exercise 2

Tororo, Kanungu and Kalangala have a strong signal on 2RL at ~64.3 Mb. Convert it to arm coordinates, list the genes in its span1 and name the best-known one. Busia 2016 has no signal there: suggest two reasons.

Show answer
vgsc = signals.query("contig == '2RL' and 63_000_000 < pcenter < 66_000_000")
vgsc[["cohort_id", "arm", "arm_pcenter", "stat_max", "span1_pstart", "span1_pstop"]]

The centres are on 2L at ~2.72–2.85 Mb, and span1 includes Vgsc (AGAP004707, 2L:2,358,158–2,431,617), the pyrethroid target site (kdr). Across the whole atlas, signals here centre ~0.3 Mb to the right of Vgsc and the focus usually misses the gene: a reminder that the centre is not always on the selected gene (skew, recombination rate and hitchhiking all shift it). Busia may lack a signal because kdr is near fixation on several haplotypes (a soft or old sweep that H12 with 24 mosquitoes does not detect as a peak), or simply because of the small sample; check kdr frequencies (Module 2.2) and the Busia page on the website.

Exercise 3

Across the whole atlas, how many cohorts, countries and taxa have a signal whose focus overlaps Gste2 (AGAP009194)? Is the Gste locus under selection only in East Africa?

Show answer
g = gf.query("ID == 'AGAP009194'").iloc[0]
c, a = to_atlas(g.contig, g.start)
gste = signals_at(c, a, a + (g.end - g.start)).query("interval == 'focus'")
gste["cohort_id"].nunique(), gste["country"].nunique(), gste["taxon"].unique()

31 cohorts from 9 countries (Burkina Faso, Benin, DRC, CAR, Côte d’Ivoire, Cameroon, Ghana, Mali and Uganda), 19 of them An. coluzzii and 12 An. gambiae. Selection at Gste is widespread across West, Central and East Africa, not a local Busia phenomenon.

Exercise 4

Rank the four Busia 2016 signals by delta_i and by stat_max. Do the rankings agree? What does each column tell you?

Show answer

Both rank the Cyp6 signal first (ΔAIC ~3,900, H12 0.80), then 2L ~34.1 Mb, then Gste, then Cyp9k1 (ΔAIC ~1,700, H12 0.15). delta_i measures how clearly a peak shape stands out from a flat background; stat_max measures how much haplotype homozygosity there is at the top of the peak (roughly, how far the sweep has gone). A broad, low peak can have a high ΔAIC.

Exercise 5

On the website, open the Busia 2016 cohort page and the Cyp9k1 alert. On the X chromosome, do H12, G123 and iHS agree about the Cyp9k1 signal? Which other East African cohorts have a Cyp9k1 signal?

Show answer

The Busia Cyp9k1 signal is weak in H12 (max ~0.15). That fits Module 3.1: the amplified Cyp9k1 haplotype is carried by only about a third of Busia mosquitoes, an incomplete sweep. iHS is the statistic most sensitive to incomplete sweeps, so check whether the iHS track shows the locus more clearly than H12 and G123. The alert page (or hits-style queries on X:15.24 Mb) lists Kanungu, Kalangala, Tororo and Mayuge as other East African cohorts with signals near Cyp9k1; Kanungu’s is the strongest (H12 ~0.48), matching the high Cyp9k1_Dup8 frequency there.

Quiz

Check your understanding. The quiz runs in Colab and in the course book.

Loading...

Summary

  • H12, G123 and iHS detect the haplotype footprints of recent selection; the atlas calls signals from H12 by fitting a skewed exponential peak and keeping peaks with ΔAIC > 1000 and H12 > 0.1.

  • focus, span1 and span2 are nested intervals around the fitted centre; use focus for the likely target and span2 for the broad footprint.

  • The atlas scans compound contigs: 2RL = 2R then 2L, 3RL = 3R then 3L; convert with the arm lengths.

  • Busia 2016 has four signals: Cyp6aa/Cyp6p (the triple-mutant locus, the strongest), 2L ~34.1 Mb, Gste and Cyp9k1. Every East African cohort has a signal at the Cyp6 cluster; the Gste signal is shared with Tororo and Kanungu.

Well done!

Add the selection evidence for your genes to your dossier. In the optional Module 3.3 we zoom in on the Busia Cyp6 sweep, find the swept haplotypes and choose SNPs that tag them for the assays on Day 4.

References

  1. Garud NR, Messer PW, Buzbas EO, Petrov DA (2015). Recent selective sweeps in North American Drosophila melanogaster show signatures of soft sweeps. PLoS Genetics 11:e1005004. Garud et al. (2015)

  2. Harris AM, Garud NR, DeGiorgio M (2018). Detection and classification of hard and soft sweeps from unphased genotypes by multilocus genotype identity. Genetics 210:1429–1452. Harris et al. (2018)

  3. Voight BF, Kudaravalli S, Wen X, Pritchard JK (2006). A map of recent positive selection in the human genome. PLoS Biology 4:e72. Voight et al. (2006)

  4. Njoroge H et al. (2022). Identification of a rapidly-spreading triple mutant for high-level metabolic insecticide resistance in Anopheles gambiae provides a real-time molecular diagnostic for antimalarial intervention deployment. Molecular Ecology. Njoroge et al. (2022)

  5. Nagi SC, Harding NJ, Lawniczak MKN, Donnelly MJ, Miles A. An atlas of positive selection in the genomes of major malaria vectors (in preparation). Website: https://anopheles-genomic-surveillance.github.io/selection-atlas/

  6. The Anopheles gambiae 1000 Genomes Consortium (2017). Genetic diversity of the African malaria vector Anopheles gambiae. Nature 552:96–100. Springer Science,Business Media LLC (2017)

References
  1. Garud, N. R., Messer, P. W., Buzbas, E. O., & Petrov, D. A. (2015). Recent Selective Sweeps in North American Drosophila melanogaster Show Signatures of Soft Sweeps. PLOS Genetics, 11(2), e1005004. 10.1371/journal.pgen.1005004
  2. Harris, A. M., Garud, N. R., & DeGiorgio, M. (2018). Detection and Classification of Hard and Soft Sweeps from Unphased Genotypes by Multilocus Genotype Identity. Genetics, 210(4), 1429–1452. 10.1534/genetics.118.301502
  3. Voight, B. F., Kudaravalli, S., Wen, X., & Pritchard, J. K. (2006). A Map of Recent Positive Selection in the Human Genome. PLoS Biology, 4(3), e72. 10.1371/journal.pbio.0040072
  4. Njoroge, H., van’t Hof, A., Oruni, A., Pipini, D., Nagi, S. C., Lynd, A., Lucas, E. R., Tomlinson, S., Grau‐Bove, X., McDermott, D., Wat’senga, F. T., Manzambi, E. Z., Agossa, F. R., Mokuba, A., Irish, S., Kabula, B., Mbogo, C., Bargul, J., Paine, M. J. I., … Donnelly, M. J. (2022). Identification of a rapidly‐spreading triple mutant for high‐level metabolic insecticide resistance in Anopheles gambiae provides a real‐time molecular diagnostic for antimalarial intervention deployment. Molecular Ecology, 31(16), 4307–4318. 10.1111/mec.16591
  5. (2017). Nature, 552(7683), 96–100. 10.1038/nature24995