<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article SYSTEM "http://jats.nlm.nih.gov/archiving/1.2/JATS-archivearticle1.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="1.2" article-type="research-article" xml:lang="en"><?properties open_access?><front><journal-meta><journal-id journal-id-type="publisher-id">41467</journal-id><journal-id journal-id-type="doi">10.1038/41467.2041-1723</journal-id><journal-title-group><journal-title>Nature Communications</journal-title><abbrev-journal-title abbrev-type="publisher">Nat Commun</abbrev-journal-title></journal-title-group><issn pub-type="epub">2041-1723</issn><publisher><publisher-name>Nature Publishing Group UK</publisher-name><publisher-loc>London</publisher-loc></publisher></journal-meta><article-meta><article-id pub-id-type="publisher-id">s41467-022-32316-x</article-id><article-id pub-id-type="manuscript">32316</article-id><article-id pub-id-type="doi">10.1038/s41467-022-32316-x</article-id><article-categories><subj-group subj-group-type="heading"><subject>Article</subject></subj-group><subj-group subj-group-type="SubjectPath"><subject>/631/181/457</subject></subj-group><subj-group subj-group-type="SubjectPath"><subject>/631/181/2474</subject></subj-group><subj-group subj-group-type="SubjectPath"><subject>/631/208/457/649</subject></subj-group><subj-group subj-group-type="SubjectPath"><subject>/631/208/182</subject></subj-group><subj-group subj-group-type="TechniquePath"><subject>/45/23</subject></subj-group><subj-group subj-group-type="NatureArticleTypeID"><subject>article</subject></subj-group></article-categories><title-group><article-title xml:lang="en">Repeated genetic adaptation to altitude in two tropical butterflies</article-title></title-group><contrib-group><contrib contrib-type="author" corresp="yes" id="Au1"><contrib-id contrib-id-type="orcid">http://orcid.org/0000-0003-3716-9929</contrib-id><name><surname>Montejo-Kovacevich</surname><given-names>Gabriela</given-names></name><xref ref-type="aff" rid="Aff1">1</xref><xref ref-type="corresp" rid="IDs4146702232316x_cor1">a</xref></contrib><contrib contrib-type="author" id="Au2"><contrib-id contrib-id-type="orcid">http://orcid.org/0000-0001-7726-2875</contrib-id><name><surname>Meier</surname><given-names>Joana I.</given-names></name><xref ref-type="aff" rid="Aff1">1</xref><xref ref-type="aff" rid="Aff2">2</xref></contrib><contrib contrib-type="author" id="Au3"><contrib-id contrib-id-type="orcid">http://orcid.org/0000-0002-1954-1806</contrib-id><name><surname>Bacquet</surname><given-names>Caroline N.</given-names></name><xref ref-type="aff" rid="Aff3">3</xref></contrib><contrib contrib-type="author" id="Au4"><name><surname>Warren</surname><given-names>Ian A.</given-names></name><xref ref-type="aff" rid="Aff1">1</xref></contrib><contrib contrib-type="author" id="Au5"><contrib-id contrib-id-type="orcid">http://orcid.org/0000-0001-6292-9681</contrib-id><name><surname>Chan</surname><given-names>Yingguang Frank</given-names></name><xref ref-type="aff" rid="Aff4">4</xref></contrib><contrib contrib-type="author" id="Au6"><name><surname>Kucka</surname><given-names>Marek</given-names></name><xref ref-type="aff" rid="Aff4">4</xref></contrib><contrib contrib-type="author" id="Au7"><contrib-id contrib-id-type="orcid">http://orcid.org/0000-0001-9217-6588</contrib-id><name><surname>Salazar</surname><given-names>Camilo</given-names></name><xref ref-type="aff" rid="Aff5">5</xref></contrib><contrib contrib-type="author" id="Au8"><contrib-id contrib-id-type="orcid">http://orcid.org/0000-0003-4424-9695</contrib-id><name><surname>Rueda-M</surname><given-names>Nicol</given-names></name><xref ref-type="aff" rid="Aff5">5</xref></contrib><contrib contrib-type="author" id="Au9"><contrib-id contrib-id-type="orcid">http://orcid.org/0000-0002-5474-5695</contrib-id><name><surname>Montgomery</surname><given-names>Stephen H.</given-names></name><xref ref-type="aff" rid="Aff6">6</xref></contrib><contrib contrib-type="author" id="Au10"><name><surname>McMillan</surname><given-names>W. Owen</given-names></name><xref ref-type="aff" rid="Aff7">7</xref></contrib><contrib contrib-type="author" id="Au11"><name><surname>Kozak</surname><given-names>Krzysztof M.</given-names></name><xref ref-type="aff" rid="Aff7">7</xref></contrib><contrib contrib-type="author" id="Au12"><contrib-id contrib-id-type="orcid">http://orcid.org/0000-0002-9319-921X</contrib-id><name><surname>Nadeau</surname><given-names>Nicola J.</given-names></name><xref ref-type="aff" rid="Aff8">8</xref></contrib><contrib contrib-type="author" id="Au13"><contrib-id contrib-id-type="orcid">http://orcid.org/0000-0002-0747-7456</contrib-id><name><surname>Martin</surname><given-names>Simon H.</given-names></name><xref ref-type="aff" rid="Aff9">9</xref></contrib><contrib contrib-type="author" corresp="yes" id="Au14"><name><surname>Jiggins</surname><given-names>Chris D.</given-names></name><xref ref-type="aff" rid="Aff1">1</xref><xref ref-type="corresp" rid="IDs4146702232316x_cor14">q</xref></contrib><aff id="Aff1"><label>1</label><institution-wrap><institution-id institution-id-type="GRID">grid.5335.0</institution-id><institution-id institution-id-type="ISNI">0000000121885934</institution-id><institution content-type="org-division">Department of Zoology</institution><institution content-type="org-name">University of Cambridge</institution></institution-wrap><addr-line content-type="postcode">CB2 3EJ</addr-line><addr-line content-type="city">Cambridge</addr-line><country country="GB">UK</country></aff><aff id="Aff2"><label>2</label><institution-wrap><institution-id institution-id-type="GRID">grid.5335.0</institution-id><institution-id institution-id-type="ISNI">0000000121885934</institution-id><institution content-type="org-division">St John’s College</institution><institution content-type="org-name">University of Cambridge</institution></institution-wrap><addr-line content-type="postcode">CB2 3EJ</addr-line><addr-line content-type="city">Cambridge</addr-line><country country="GB">UK</country></aff><aff id="Aff3"><label>3</label><institution-wrap><institution-id institution-id-type="GRID">grid.499611.2</institution-id><institution-id institution-id-type="ISNI">0000 0004 4909 487X</institution-id><institution content-type="org-name">Universidad Regional Amazónica Ikiam</institution></institution-wrap><addr-line content-type="city">Tena</addr-line><country country="EC">Ecuador</country></aff><aff id="Aff4"><label>4</label><institution-wrap><institution-id institution-id-type="GRID">grid.418026.9</institution-id><institution-id institution-id-type="ISNI">0000 0004 0492 0357</institution-id><institution content-type="org-name">Friedrich Miescher Laboratory of the Max Planck Society</institution></institution-wrap><addr-line content-type="street">Max Planck Ring 9</addr-line><addr-line content-type="postcode">72076</addr-line><addr-line content-type="city">Tübingen</addr-line><country country="DE">Germany</country></aff><aff id="Aff5"><label>5</label><institution-wrap><institution-id institution-id-type="GRID">grid.412191.e</institution-id><institution-id institution-id-type="ISNI">0000 0001 2205 5940</institution-id><institution content-type="org-division">Department of Biology, Faculty of Natural Sciences</institution><institution content-type="org-name">Universidad del Rosario</institution></institution-wrap><addr-line content-type="street">Carrera 24 # 63C-69</addr-line><addr-line content-type="postcode">111221</addr-line><addr-line content-type="city">Bogotá</addr-line><country country="CO">Colombia</country></aff><aff id="Aff6"><label>6</label><institution-wrap><institution-id institution-id-type="GRID">grid.5337.2</institution-id><institution-id institution-id-type="ISNI">0000 0004 1936 7603</institution-id><institution content-type="org-division">School of Biological Sciences</institution><institution content-type="org-name">University of Bristol</institution></institution-wrap><addr-line content-type="city">Bristol</addr-line><country country="GB">UK</country></aff><aff id="Aff7"><label>7</label><institution-wrap><institution-id institution-id-type="GRID">grid.438006.9</institution-id><institution-id institution-id-type="ISNI">0000 0001 2296 9689</institution-id><institution content-type="org-name">Smithsonian Tropical Research Institute</institution></institution-wrap><addr-line content-type="city">Panamá</addr-line><country country="PA">Panamá</country></aff><aff id="Aff8"><label>8</label><institution-wrap><institution-id institution-id-type="GRID">grid.11835.3e</institution-id><institution-id institution-id-type="ISNI">0000 0004 1936 9262</institution-id><institution content-type="org-division">Ecology and Evolutionary Biology, School of Biosciences</institution><institution content-type="org-name">University of Sheffield</institution></institution-wrap><addr-line content-type="postcode">S10 2TN</addr-line><addr-line content-type="city">Sheffield</addr-line><country country="GB">UK</country></aff><aff id="Aff9"><label>9</label><institution-wrap><institution-id institution-id-type="GRID">grid.4305.2</institution-id><institution-id institution-id-type="ISNI">0000 0004 1936 7988</institution-id><institution content-type="org-division">Institute of Evolutionary Biology</institution><institution content-type="org-name">University of Edinburgh</institution></institution-wrap><addr-line content-type="city">Edinburgh</addr-line><country country="GB">UK</country></aff></contrib-group><author-notes><corresp id="IDs4146702232316x_cor1"><label>a</label><email>gmontejokovacevich@gmail.com</email></corresp><corresp id="IDs4146702232316x_cor14"><label>q</label><email>cj107@cam.ac.uk</email></corresp></author-notes><pub-date date-type="pub" publication-format="electronic"><day>9</day><month>8</month><year>2022</year></pub-date><pub-date date-type="collection" publication-format="electronic"><month>12</month><year>2022</year></pub-date><volume>13</volume><issue seq="4676">1</issue><elocation-id>4676</elocation-id><history><date date-type="registration"><day>26</day><month>7</month><year>2022</year></date><date date-type="received"><day>5</day><month>12</month><year>2021</year></date><date date-type="accepted"><day>26</day><month>7</month><year>2022</year></date><date date-type="online"><day>9</day><month>8</month><year>2022</year></date></history><permissions><copyright-statement>© The Author(s) 2022</copyright-statement><copyright-year>2022</copyright-year><license license-type="open-access" xlink:href="http://creativecommons.org/licenses/by/4.0/"><license-p><bold>Open Access</bold> This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit <ext-link xlink:href="http://creativecommons.org/licenses/by/4.0/" ext-link-type="url">http://creativecommons.org/licenses/by/4.0/</ext-link>.</license-p></license></permissions><abstract id="Abs1" xml:lang="en"><title>Abstract</title><p id="Par1">Repeated evolution can provide insight into the mechanisms that facilitate adaptation to novel or changing environments. Here we study adaptation to altitude in two tropical butterflies, <italic>Heliconius erato</italic> and <italic>H. melpomene</italic>, which have repeatedly and independently adapted to montane habitats on either side of the Andes. We sequenced 518 whole genomes from altitudinal transects and found many regions differentiated between highland (~ 1200 m) and lowland (~ 200 m) populations. We show repeated genetic differentiation across replicate populations within species, including allopatric comparisons. In contrast, there is little molecular parallelism between the two species. By sampling five close relatives, we find that a large proportion of divergent regions identified within species have arisen from standing variation and putative adaptive introgression from high-altitude specialist species. Taken together our study supports a role for both standing genetic variation and gene flow from independently adapted species in promoting parallel local adaptation to the environment.</p></abstract><abstract id="Abs2" xml:lang="en"><p id="Par2">Here, the authors study adaptation to altitude in 518 whole genomes from two species of tropical butterflies. They find repeated genetic differentiation within species, little molecular parallelism between these species, and introgression from closely related species, concluding that standing genetic variation promotes parallel local adaptation.</p></abstract><funding-group><award-group><funding-source><institution-wrap><institution>RCUK | Natural Environment Research Council (NERC)</institution><institution-id institution-id-type="doi" vocab="open-funder-registry">https://doi.org/10.13039/501100000270</institution-id></institution-wrap></funding-source><award-id award-type="FundRef grant">NE/L002507/1</award-id><award-id award-type="FundRef grant">NE/R010331/1</award-id><award-id award-type="FundRef grant">NE/K008498/1</award-id><award-id award-type="FundRef grant">NE/N014936/1</award-id><principal-award-recipient><name><surname>Montejo-Kovacevich</surname><given-names>Gabriela</given-names></name></principal-award-recipient><principal-award-recipient><name><surname>Montejo-Kovacevich</surname><given-names>Gabriela</given-names></name></principal-award-recipient><principal-award-recipient><name><surname>Montejo-Kovacevich</surname><given-names>Gabriela</given-names></name></principal-award-recipient><principal-award-recipient><name><surname>Montejo-Kovacevich</surname><given-names>Gabriela</given-names></name></principal-award-recipient></award-group><award-group><funding-source><institution-wrap><institution>EC | EC Seventh Framework Programm | FP7 Ideas: European Research Council (FP7-IDEAS-ERC - Specific Programme: ‘Ideas’ Implementing the Seventh Framework Programme of the European Community for Research, Technological Development and Demonstration Activities (2007 to 2013))</institution><institution-id institution-id-type="doi" vocab="open-funder-registry">https://doi.org/10.13039/100011199</institution-id></institution-wrap></funding-source><award-id award-type="FundRef grant">339873</award-id><award-id award-type="FundRef grant">639096</award-id><principal-award-recipient><name><surname>Montejo-Kovacevich</surname><given-names>Gabriela</given-names></name></principal-award-recipient><principal-award-recipient><name><surname>Montejo-Kovacevich</surname><given-names>Gabriela</given-names></name></principal-award-recipient></award-group><award-group><funding-source><institution-wrap><institution>Universidad del Rosario (University of Rosario)</institution><institution-id institution-id-type="doi" vocab="open-funder-registry">https://doi.org/10.13039/501100008793</institution-id></institution-wrap></funding-source><award-id award-type="FundRef grant">FGD005/ IV-FGI006</award-id><principal-award-recipient><name><surname>Montejo-Kovacevich</surname><given-names>Gabriela</given-names></name></principal-award-recipient></award-group></funding-group><custom-meta-group><custom-meta><meta-name>publisher-imprint-name</meta-name><meta-value>Nature Portfolio</meta-value></custom-meta><custom-meta><meta-name>volume-issue-count</meta-name><meta-value>1</meta-value></custom-meta><custom-meta><meta-name>issue-article-count</meta-name><meta-value>4675</meta-value></custom-meta><custom-meta><meta-name>issue-toc-levels</meta-name><meta-value>0</meta-value></custom-meta><custom-meta><meta-name>issue-pricelist-year</meta-name><meta-value>2022</meta-value></custom-meta><custom-meta><meta-name>issue-copyright-holder</meta-name><meta-value>The Author(s)</meta-value></custom-meta><custom-meta><meta-name>issue-copyright-year</meta-name><meta-value>2022</meta-value></custom-meta><custom-meta><meta-name>article-contains-esm</meta-name><meta-value>Yes</meta-value></custom-meta><custom-meta><meta-name>article-numbering-style</meta-name><meta-value>Unnumbered</meta-value></custom-meta><custom-meta><meta-name>article-registration-date-year</meta-name><meta-value>2022</meta-value></custom-meta><custom-meta><meta-name>article-registration-date-month</meta-name><meta-value>7</meta-value></custom-meta><custom-meta><meta-name>article-registration-date-day</meta-name><meta-value>26</meta-value></custom-meta><custom-meta><meta-name>article-toc-levels</meta-name><meta-value>0</meta-value></custom-meta><custom-meta><meta-name>toc-levels</meta-name><meta-value>0</meta-value></custom-meta><custom-meta><meta-name>volume-type</meta-name><meta-value>Regular</meta-value></custom-meta><custom-meta><meta-name>journal-product</meta-name><meta-value>NonStandardArchiveJournal</meta-value></custom-meta><custom-meta><meta-name>numbering-style</meta-name><meta-value>Unnumbered</meta-value></custom-meta><custom-meta><meta-name>article-grants-type</meta-name><meta-value>OpenChoice</meta-value></custom-meta><custom-meta><meta-name>metadata-grant</meta-name><meta-value>OpenAccess</meta-value></custom-meta><custom-meta><meta-name>abstract-grant</meta-name><meta-value>OpenAccess</meta-value></custom-meta><custom-meta><meta-name>bodypdf-grant</meta-name><meta-value>OpenAccess</meta-value></custom-meta><custom-meta><meta-name>bodyhtml-grant</meta-name><meta-value>OpenAccess</meta-value></custom-meta><custom-meta><meta-name>bibliography-grant</meta-name><meta-value>OpenAccess</meta-value></custom-meta><custom-meta><meta-name>esm-grant</meta-name><meta-value>OpenAccess</meta-value></custom-meta><custom-meta><meta-name>online-first</meta-name><meta-value>false</meta-value></custom-meta><custom-meta><meta-name>pdf-file-reference</meta-name><meta-value>BodyRef/PDF/41467_2022_Article_32316.pdf</meta-value></custom-meta><custom-meta><meta-name>pdf-type</meta-name><meta-value>Typeset</meta-value></custom-meta><custom-meta><meta-name>target-type</meta-name><meta-value>OnlinePDF</meta-value></custom-meta><custom-meta><meta-name>issue-type</meta-name><meta-value>Regular</meta-value></custom-meta><custom-meta><meta-name>article-type</meta-name><meta-value>OriginalPaper</meta-value></custom-meta><custom-meta><meta-name>journal-subject-primary</meta-name><meta-value>Science, Humanities and Social Sciences, multidisciplinary</meta-value></custom-meta><custom-meta><meta-name>journal-subject-secondary</meta-name><meta-value>Science, Humanities and Social Sciences, multidisciplinary</meta-value></custom-meta><custom-meta><meta-name>journal-subject-secondary</meta-name><meta-value>Science, multidisciplinary</meta-value></custom-meta><custom-meta><meta-name>journal-subject-collection</meta-name><meta-value>Science (multidisciplinary)</meta-value></custom-meta><custom-meta><meta-name>open-access</meta-name><meta-value>true</meta-value></custom-meta></custom-meta-group></article-meta><notes notes-type="AuthorContribution"><p>These authors contributed equally: Simon H. Martin, Chris D. Jiggins.</p></notes></front><body><sec id="Sec1" sec-type="introduction"><title>Introduction</title><p id="Par3">Understanding how organisms adapt to the environment is a central goal of evolutionary biology and highly relevant given the pace of global change. One approach is to explore the repeatability of local adaptation in the wild in order to understand whether phenotypic and genetic changes are predictable. On the one hand, repeated adaptation to similar environments can act as a ‘natural experiment’ and provide the means to identify the targets of selection, by distinguishing locally adaptive from neutral or globally beneficial changes<sup><xref ref-type="bibr" rid="CR1">1</xref></sup>. On the other hand, these scenarios can allow us to test whether the same loci are repeatedly targeted across populations and species<sup><xref ref-type="bibr" rid="CR2">2</xref></sup>. Despite many studies reporting repeated adaptation involving the same genes or alleles across lineages<sup><xref ref-type="bibr" rid="CR3">3</xref>–<xref ref-type="bibr" rid="CR5">5</xref></sup>, which we here term ‘molecular parallelism’, we know relatively little about the evolutionary mechanisms that facilitate this process.</p><p id="Par4">Three main mechanisms can give rise to molecular parallelism in repeated adaptation (Fig. <xref rid="Fig1" ref-type="fig">1</xref>). Genetic variation upon which selection repeatedly acts may arise via independent mutations at the same gene or locus<sup><xref ref-type="bibr" rid="CR6">6</xref></sup>. Beneficial variants may be recruited from ancestral standing variation<sup><xref ref-type="bibr" rid="CR7">7</xref></sup> or shared across populations of the same species via migration and gene flow<sup><xref ref-type="bibr" rid="CR8">8</xref></sup>. Lastly, gene flow between species can facilitate the introgression of adaptive alleles<sup><xref ref-type="bibr" rid="CR9">9</xref>–<xref ref-type="bibr" rid="CR11">11</xref></sup>. A combination of these mechanisms may also be at play, for instance the high altitude adaptation Tibetan-EPAS1 haplotype was introgressed from Denisovan hominins but remained as neutral standing variation before positive selection occurred<sup><xref ref-type="bibr" rid="CR12">12</xref></sup>.<fig id="Fig1"><label>Fig. 1</label><caption xml:lang="en"><title>The study of repeated adaptation to the environment and the mechanisms potentially facilitating it.</title><p><bold>A</bold> We hypothesise that increasing divergence between the lineages under study reduces the likelihood of molecular parallelism (same genes or alleles) underlying repeated adaptation to the environment. In this study, we test this hypothesis by sampling replicate (within sides of the Andes) or allopatric (across sides of the Andes) altitudinal transects of the same species, i.e., connected via gene flow or not (divergence times indicated in Million years ago, Mya), and all replicated in two divergent <italic>Heliconius</italic> species. <bold>B</bold> Three main mechanisms can give rise to the genetic variation upon which selection acts repeatedly, giving rise to molecular parallelism: (i) adaptive <italic>de-novo</italic> mutations independently arise in two or more lineages, (ii) existing shared standing variation is repeatedly selected across lineages or shared via gene flow within species, and (iii) adaptive alleles are shared via gene flow across species (adaptive introgression). We tested for the relative importance of these mechanisms with a range of analyses on the relevant transect comparisons. Illustrative tree including four highland populations from four transects (with the Andes preventing gene flow between replicate transects across sides) of our focal species, either <italic>H. erato</italic> or <italic>H. melpomene</italic>, and a lineage of a related high-altitude specialist species from which adaptive introgression is plausible. Sample sizes for the full datasets (including lowland populations when present) are shown in brackets.</p></caption><p><graphic specific-use="HTML" mime-subtype="PNG" xlink:href="MediaObjects/41467_2022_32316_Fig1_HTML.png"/></p></fig></p><p id="Par5">The likelihood of molecular parallelism and the relative importance of each mechanism may be largely dependent on the divergence between the lineages under study (Fig. <xref rid="Fig1" ref-type="fig">1</xref>), but this has seldom been empirically tested<sup><xref ref-type="bibr" rid="CR3">3</xref></sup>. For instance, populations that diverged recently and retain a large pool of standing genetic variation tend to reuse pre-existing alleles during repeated adaptation, as seen in freshwater adaptation in sticklebacks<sup><xref ref-type="bibr" rid="CR13">13</xref></sup>, crypsis in beach mice<sup><xref ref-type="bibr" rid="CR14">14</xref></sup>, or coastal ecotypes of bottlenose dolphins<sup><xref ref-type="bibr" rid="CR7">7</xref></sup>. Similarly, organisms that readily hybridise in the wild are more likely to share beneficial alleles via adaptive introgression. This allows populations to rapidly adapt to, for instance, novel anthropogenic stressors such as pollutants<sup><xref ref-type="bibr" rid="CR15">15</xref></sup> or insecticides<sup><xref ref-type="bibr" rid="CR16">16</xref></sup>.</p><p id="Par6">Anthropogenic change is forcing organisms to move, adapt, or die, with many predicted to expand their ranges towards the highlands to escape warming and degrading lowland habitats<sup><xref ref-type="bibr" rid="CR17">17</xref></sup>. We know very little about the genomics or predictability of adaptation to altitude, especially in the tropical insects despite making up about half of all described species (but see)<sup><xref ref-type="bibr" rid="CR18">18</xref>–<xref ref-type="bibr" rid="CR20">20</xref></sup>. The type and genomic architecture of the trait under study may also determine its predictability<sup><xref ref-type="bibr" rid="CR21">21</xref></sup>. Phenotypes controlled by few, large-effect loci typically show predictable genetic paths of evolution, such as melanic colouration in mammals, fish, and birds<sup><xref ref-type="bibr" rid="CR22">22</xref>–<xref ref-type="bibr" rid="CR25">25</xref></sup>, perhaps due to selective constraints on genetic pathways<sup><xref ref-type="bibr" rid="CR21">21</xref>,<xref ref-type="bibr" rid="CR26">26</xref>,<xref ref-type="bibr" rid="CR27">27</xref></sup>. Organisms adapting to complex environmental challenges that face multifarious selective regimes may show less predictable patterns, with functional redundancy among genes allowing for different combinations of alleles to achieve similar phenotypes<sup><xref ref-type="bibr" rid="CR28">28</xref>,<xref ref-type="bibr" rid="CR29">29</xref></sup>. Thus, understanding the relative importance of these mechanisms in determining the predictability of adaptation to the environment could inform future research into conservation strategies to protect biodiversity<sup><xref ref-type="bibr" rid="CR30">30</xref></sup>.</p><p id="Par7">Here, we study the genetic basis of repeated adaptation to altitude in two divergent <italic>Heliconius</italic> tropical butterflies, <italic>H. erato</italic> and <italic>H. melpomene</italic>. These aposematic, toxic species have very wide ranges and co-mimic each other across South America, commonly found from sea level to around 1600 m on both sides of the Andes<sup><xref ref-type="bibr" rid="CR31">31</xref></sup>. In contrast, most other species in this genus have specialised to either highland Andean or lowland Amazonian habitats, with topography and climate shown to correlate with speciation rates across the clade<sup><xref ref-type="bibr" rid="CR32">32</xref></sup>. The biogeography of these species’ ancestral ranges across the Andes is uncertain, with multiple plausible adaptive histories: ancestral adaptation to the highlands on one side of the Andes followed by expansion, gene flow of adaptive alleles between sides of the Andes, or fully independent in situ adaptation to altitude on either side of the Andes.</p><p id="Par8">A recent study in this system showed that even a modest 800 m change in elevation in the Ecuadorian Andes leads to strong environmental differences, with temperatures in the lowlands more variable and, on average, 4 °C hotter, as well as threefold increase in the ‘drying power of the air’ (Vapour Pressure Deficit) which correlates with desiccation risk in ectotherms<sup><xref ref-type="bibr" rid="CR33">33</xref></sup>. Phenotypic differences between highland and lowland populations of <italic>Heliconius</italic> have recently been identified, such as in wing shape<sup><xref ref-type="bibr" rid="CR34">34</xref>,<xref ref-type="bibr" rid="CR35">35</xref></sup> and heat tolerance<sup><xref ref-type="bibr" rid="CR33">33</xref></sup>, and are of similar magnitude in <italic>H. erato</italic> and <italic>H. melpomene</italic>. Thus, the observed environmental and phenotypic differences point towards an important role of local adaptation enabling these two species to inhabit wide altitudinal ranges.</p><p id="Par9">We search for signatures of local adaptation to montane habitats with extensive sampling that harnesses the power of natural spatial replication within and across sides of the Andes, to assess the extent of molecular parallelism in adaptation to montane habitats at the upper end of the species altitudinal range (∼1200 m). We quantify parallelism at multiple levels of divergence: (i) replicate three-population transects within sides of the Andes connected via gene flow, (ii) trans-Andean allopatric three-population transects with no gene flow at these latitudes (but potential for gene flow in other regions), and (iii) two species that diverged 12 million years ago (Fig. <xref rid="Fig1" ref-type="fig">1A</xref>). Furthermore, we test whether the same haplotypes are under selection across transects and search for the mutational origin of candidate adaptive alleles (Fig. <xref rid="Fig1" ref-type="fig">1B</xref>). Overall, this large empirical study deepens our understanding of how organisms adapt to the environment and identifies both standing genetic variation and adaptive introgression from pre-adapted species as important mechanisms facilitating local adaptation.</p></sec><sec id="Sec2" sec-type="results"><title>Results and discussion</title><sec id="Sec3"><title>Divergence and diversity across elevations and transects</title><p id="Par10">To study adaptation to altitude in <italic>H. erato</italic> and <italic>H. melpomene</italic>, we used whole-genome data from 518 re-sequenced individuals, 444 of which were sequenced for this study. Samples were collected from 111 different locations, which we grouped into 30 populations, corresponding to four three-population transects: Colombia West/East, and Ecuador West/East (Fig. <xref rid="Fig2" ref-type="fig">2</xref>, Supplementary Table <xref ref-type="supplementary-material" rid="MOESM1">1</xref>). In each three-population transect, populations were either in the highlands (~1200 m) or lowlands (~200 m), itself divided into nearby or distant lowland sites (Fig. <xref rid="Fig2" ref-type="fig">2A</xref>). The Andes act as a barrier to gene flow at these latitudes, with populations on opposite sides of the Andes thought to have split ~0.9 and ~1.7 million years ago for <italic>H. erato</italic> and <italic>H. melpomene</italic>, respectively<sup><xref ref-type="bibr" rid="CR36">36</xref>–<xref ref-type="bibr" rid="CR38">38</xref></sup> (for natural history see Supplementary Note <xref ref-type="supplementary-material" rid="MOESM1">1</xref>). Individuals of each species clustered strongly into Western and Eastern groups in genome wide PCAs (S.I., Supplementary Fig. <xref ref-type="supplementary-material" rid="MOESM1">1</xref>). In PCAs that only included populations from replicate transects of the same side of the Andes (two per species), structuring by altitude was absent in all but one comparison, <italic>H. erato</italic> East, where the <italic>H. erato</italic> highland population in Colombia corresponds to a different colour pattern subspecies and diverged moderately from other populations (S.I., Supplementary Fig. <xref ref-type="supplementary-material" rid="MOESM1">1</xref>). Intraspecific pairwise differentiation between populations on the same side of the Andes increased with geographic distance but was generally low (F<sub>st</sub> &lt; 0.1; S.I., Supplementary Fig. <xref ref-type="supplementary-material" rid="MOESM1">2</xref>). The effective replication over space and extensive gene flow within transects provide a powerful setting to study the genomics of parallel adaptation to altitude in the wild.<fig id="Fig2"><label>Fig. 2</label><caption xml:lang="en"><title>Sampling design.</title><p><bold>A</bold> Elevation map of the 30 populations sampled for this study in four geographical transects (Colombia West/East, Ecuador West/East). More details of each population can be found in Supplementary Table <xref ref-type="supplementary-material" rid="MOESM1">1</xref>, number of whole-genome sequences included per altitude and transect is indicated above each map (<italic>H. erato</italic>, <italic>H. melpomene</italic>). Source data are provided as a Source Data file and Supplementary Data <xref ref-type="supplementary-material" rid="MOESM3">1</xref>. The black scale bar represents 25 km. Maps and <italic>Heliconius</italic> subspecies present are depicted per transect (photo credit: C.D.J. McGuire Center for Lepidoptera and Biodiversity, Florida Museum of Natural History; Map data ©2019 Google obtained via RgoogleMaps package<sup><xref ref-type="bibr" rid="CR120">120</xref></sup>), note that only Colombia East has different subspecies in the highlands compared to the lowlands. <bold>B</bold> Plot depicts trio sampling scheme, with mean altitudinal and geographical distance of the three population types (high, low, low distant) for both species. <bold>C</bold> Mean genome-wide Population Branch Statistic (PBS) trees averaged across the four transects per species and respective total sample size in brackets. Source data are provided in the Source Data file.</p></caption><p><graphic specific-use="HTML" mime-subtype="PNG" xlink:href="MediaObjects/41467_2022_32316_Fig2_HTML.png"/></p></fig></p><p id="Par11">Genetic distance between populations can be increased by environmental differences that affect dispersal or survival of locally adapted migrants<sup><xref ref-type="bibr" rid="CR39">39</xref>,<xref ref-type="bibr" rid="CR40">40</xref></sup>. We tested for such isolation by environment, in our case altitude, with pairwise F<sub>st</sub> across all populations of the same side of the Andes and species. At similar geographic distances, genetic differentiation was higher when comparing highland vs. lowland populations than when comparing lowland vs lowland populations. Isolation by altitude could be driven by local adaptation reducing gene flow between elevations or due to many adaptive sites diverging across the genome. This difference was stronger in <italic>H. erato</italic> than in <italic>H. melpomene</italic> (S.I., Supplementary Fig. <xref ref-type="supplementary-material" rid="MOESM1">2</xref>). F<sub>st</sub> was generally highest when comparing two highland sampling sites at relatively short distances, despite using a topographically informed ‘least-cost path’ as our measure of geographic distance (Supplementary Fig. <xref ref-type="supplementary-material" rid="MOESM1">3</xref>). This could indicate topographical barriers decreasing gene flow, beyond what was captured by the least-cost path, or local adaptation in the highlands leading to increased selection against migrants. A pattern of isolation by environment could also arise due to, for instance, different demographic histories and higher levels of inbreeding in range-edge populations<sup><xref ref-type="bibr" rid="CR41">41</xref>–<xref ref-type="bibr" rid="CR43">43</xref></sup>. We found no consistent differences in nucleotide diversity (π) between elevations (S.I., Supplementary Fig. <xref ref-type="supplementary-material" rid="MOESM1">4</xref>). Tajima’s D was negative across populations, characteristic of population expansion, but generally less negative in highland populations, suggesting less pronounced expansion or more recent/ongoing contractions in the highlands (S.I., Supplementary Fig. <xref ref-type="supplementary-material" rid="MOESM1">4</xref>). Thus, both heterogenous demographic histories and selection against locally adapted migrants across elevations may lead to genome-wide isolation by environment.</p></sec><sec id="Sec4"><title>Parallel high-altitude differentiation detected with population branch statistics</title><p id="Par12">To identify genomic regions with high-altitude specific differentiation we calculated Population Branch Statistics (PBS) for three transects in each species, and F<sub>st</sub> for the remaining two transects with more limited sampling (<italic>H. erato</italic> Colombia West, <italic>H. melpomene</italic> Ecuador West; Fig. <xref rid="Fig2" ref-type="fig">2A</xref>). PBS was originally developed to study high-altitude adaptation in humans<sup><xref ref-type="bibr" rid="CR44">44</xref></sup> and can distinguish between global and lineage specific differentiation by constructing a trifurcating population tree based on F<sub>st</sub> that includes a geographically distant population<sup><xref ref-type="bibr" rid="CR15">15</xref>,<xref ref-type="bibr" rid="CR42">42</xref>,<xref ref-type="bibr" rid="CR45">45</xref>–<xref ref-type="bibr" rid="CR49">49</xref></sup>. By attributing fractions of differentiation to each branch, PBS identifies genomic regions disproportionally diverged in the focal population, consistent with loci positively selected in the highlands and either selected against or neutral in the lowlands<sup><xref ref-type="bibr" rid="CR44">44</xref>,<xref ref-type="bibr" rid="CR50">50</xref></sup>.</p><p id="Par13">When assessing genome-wide average PBS trees the longest PBS branches corresponded to the low distant populations of both species, as expected under a model of neutral isolation by distance (Fig. <xref rid="Fig2" ref-type="fig">2B</xref>). <italic>H. erato</italic> had a consistently longer high-altitude branch compared to the lowland, but geographically nearby population, which could be indicative of increased drift or extensive local adaptation to altitude throughout the genome. Indeed, we detected many regions across the genome strongly differentiated in the highland populations across transects and species (Fig. <xref rid="Fig3" ref-type="fig">3</xref>). We defined High Differentiation Regions (HDRs hereafter) by adding a ± 50 kb buffer around outlier windows, i.e. those with zPBS<sub>high</sub> (high-altitude branch) or zF<sub>st</sub> values above 4 (standardised Z-transformed, equivalent to &gt;4 SD<sup><xref ref-type="bibr" rid="CR51">51</xref></sup>), and merging overlapping intervals into discrete regions. The transects for which only two populations were sampled (F<sub>st</sub>), had a higher number of HDRs: 400 and 405 HDRs, covering 11.4% and 17.1% of the genome for <italic>H. erato</italic> and <italic>H. melpomene</italic>, respectively (compared to, on average, 229 PBS-based HDRs covering 8%; details on S.I., Supplementary Note <xref ref-type="supplementary-material" rid="MOESM1">2</xref>). This likely reflects the property of PBS to discern between population-specific and globally differentiated alleles.<fig id="Fig3"><label>Fig. 3</label><caption xml:lang="en"><title>Molecular parallelism in PBS/F<sub>st</sub> regions of differentiation across eight altitude transects of <italic>H. erato</italic> and <italic>H. melpomene.</italic></title><p><bold>A</bold> Number of high-differentiation regions per species (HDRs, including ± 50kb buffers), in blue/green if shared across replicate transects within sides of the Andes (SHDR: blue=within West, green=within East) and in red those additionally shared across allopatric transects, i.e. shared across all four transects (also SHDR). Source data are provided in the Source Data file. <bold>B</bold> Vertical lines represent percentage of outlier windows shared across transects (jackknife resampling confidence intervals as dashed lines), compared to 10,000 simulations (grey distributions). <bold>C</bold> Density plots of local recombination rate (cM/Mb) for all genomic windows (grey), or for only windows within HDRs (coloured). <bold>D</bold>, <bold>E</bold> Patterns of highland-specific differentiation (zPBS<sub>high</sub>) across the genome in four transects of <italic>H. erato</italic> (<bold>D</bold>) and <italic>H. melpomene</italic><bold>E</bold>. In the two transects where only two populations were sampled zF<sub>st</sub> is presented. Horizontal dashed line indicates threshold of 4 standard deviations from the mean. HDRs private to one transect are highlighted in dark grey.</p></caption><p><graphic specific-use="HTML" mime-subtype="PNG" xlink:href="MediaObjects/41467_2022_32316_Fig3_HTML.png"/></p></fig></p><p id="Par14">To test for molecular parallelism in local adaptation, we assessed whether the same individual HDRs were repeatedly found in the highlands across replicate (same side of the Andes) or allopatric (opposite side of the Andes) transects within each species (Fig. <xref rid="Fig1" ref-type="fig">1A</xref>). In <italic>H. erato</italic>, 45% (±3.8 SD) and 38% (±4.4 SD) of HDRs overlapped between replicate transects within the Western and the Eastern Andes, respectively (shared HDRs, SHDRs hereafter; Fig. <xref rid="Fig3" ref-type="fig">3D</xref> blue, green). Of those SHDRs, more than a third were also shared across allopatric transects not connected via gene flow, 15% of the total HDRs (allopatric SHDRs hereafter; Fig. <xref rid="Fig3" ref-type="fig">3D</xref> red). <italic>H. melpomene</italic> had a slightly lower percentage of HDRs shared within sides of the Andes (West 33% ± 11 SD; East 27% ± 11 SD), but very few shared across sides of the Andes (allopatric SHDRs: 4% of the total). We then tested if the observed level of sharing was higher than expected under a null distribution of genomic regions, obtained by assessing sharing in randomly placed blocks across the genome of the same size and number as observed HDRs per transect. <italic>H. erato</italic> HDR sharing was higher than predicted under a null distribution in all three comparisons (replicate Eastern/Western and all transects, Fig. <xref rid="Fig3" ref-type="fig">3B</xref>). In <italic>H. melpomene</italic>, HDR sharing was significant between transects where gene flow is present (replicate Eastern/Western transects), whereas the low levels of allopatric parallelism did not differ from the null distribution (Fig. <xref rid="Fig3" ref-type="fig">3B</xref>, red). On average, 15.6% of SHDRs detected overlapped between species, but this fell within the null distribution given the number and size of SHDRs in each species (mean overlap = 14.06% ± 1.19).</p><p id="Par15">In summary, we show that levels of parallelism are highest between populations of the same species connected by gene flow or sharing considerable ancestral variation, but low between species. Molecular parallelism within species could be facilitated by the high levels of nucleotide diversity observed<sup><xref ref-type="bibr" rid="CR52">52</xref>,<xref ref-type="bibr" rid="CR53">53</xref></sup>, indicating a large pool of shared variants upon which selection can repeatedly act. Furthermore, recurrent gene flow between replicate populations could facilitate the recruitment of new or standing adaptive alleles, as expected from theory<sup><xref ref-type="bibr" rid="CR54">54</xref></sup> and seen in other systems such as maize, <italic>Arabidopsis</italic>, or sticklebacks<sup><xref ref-type="bibr" rid="CR3">3</xref>,<xref ref-type="bibr" rid="CR8">8</xref>,<xref ref-type="bibr" rid="CR55">55</xref></sup>. The reduced parallelism observed between allopatric populations of <italic>H. melpomene</italic> could be due to lower standing variation or less gene flow across the Andes, compared to <italic>H. erato</italic>.</p><p id="Par16">The lack of significant molecular parallelism in altitude candidate loci between <italic>H. erato</italic> and <italic>H. melpomene</italic>, whose clades diverged 12 million years ago<sup><xref ref-type="bibr" rid="CR38">38</xref></sup>, is in stark contrast with colour patterns<sup><xref ref-type="bibr" rid="CR56">56</xref></sup>, where near-perfect local Müllerian mimics have arisen repeatedly in both species through independent mutations at a handful of conserved loci<sup><xref ref-type="bibr" rid="CR57">57</xref>,<xref ref-type="bibr" rid="CR58">58</xref></sup>. This difference in the extent of molecular parallelism might be explained by the nature of the trait under study: adaptation to altitude is multifarious and, as shown here, involves many genes. Genetic redundancy in polygenic adaptation may lead to evolution taking different paths to reach similar solutions, as shown for quantitative iridescent colouration in these two <italic>Heliconius</italic> species<sup><xref ref-type="bibr" rid="CR59">59</xref></sup> or in recent experimental evolution of thermal adaptation in <italic>Drosophila</italic><sup><xref ref-type="bibr" rid="CR28">28</xref>,<xref ref-type="bibr" rid="CR60">60</xref></sup>. In contrast, the major effect loci that underlie switches in discrete colour patterning may favour genetic predictability even across divergent taxa, especially when selection is strong and reaching adaptive peaks requires large phenotypic shifts.</p></sec><sec id="Sec5"><title>Highly differentiated regions show additional signatures of selection and, generally, are not associated with low recombination rates</title><p id="Par17">We tested whether highly differentiated genomic regions shared across transects (SHDRs) showed additional evidence of positive selection by computing difference in nucleotide diversity (π) across elevations (Δπ = π<sub>high</sub>− π<sub>low</sub>), deviation from neutrality in site frequency distributions (Tajima’s D), and absolute divergence (Dxy) for the same 5 kb windows. Processes other than positive selection, such as background selection, can decrease within-population diversity and thus lead to increased relative differentiation (F<sub>st</sub>), especially in the absence of gene flow between populations<sup><xref ref-type="bibr" rid="CR61">61</xref>,<xref ref-type="bibr" rid="CR62">62</xref></sup>. Thus, it is important to test for enrichment of different selection statistics to strengthen our inference of locally adaptive loci. A reduced Δπ compared to the background would indicate that a selective sweep in the highlands reduced nucleotide diversity compared to the lowlands. In selective sweep regions, Tajima’s D is expected to be low, as regions with selected haplotypes that rapidly increased in frequency would have an excess of rare alleles. Finally, absolute sequence divergence (Dxy), is expected to be high in old selective sweeps or variants, and less affected by genetic variation within populations than relative measures of differentiation such as F<sub>st</sub><sup><xref ref-type="bibr" rid="CR63">63</xref></sup>.</p><p id="Par18">SHDRs were considered outliers for Δπ, Tajima’s D, or D<sub>xy</sub>, if the observed maximum or minimum values within SHDRs &lt; 10th percentile (or &gt; 90th in Tajima’s D) of the simulated values, obtained from 10000 permutations that randomly placed blocks of equal number and size to observed HDRs across the genome. Of the SHDRs differentiated on both Ecuadorian and Colombian transects but in one side of the Andes only, i.e. across replicate transects, on average 74% and 48% of <italic>H. erato</italic> and <italic>H. melpomene</italic> SHDRs, respectively, were outliers for at least one other statistic, in addition to zPBS/zF<sub>st</sub> (Fig. <xref rid="Fig4" ref-type="fig">4A</xref> grey). Of the <italic>H. erato</italic> and <italic>H. melpomene</italic> SHDRs shared across all transects (allopatric SHDRs), 94% and 86% had at least one additional outlier statistic, respectively (Fig. <xref rid="Fig4" ref-type="fig">4A, C</xref>). In <italic>H. erato</italic>, SHDRs were often outliers for both, high D<sub>xy</sub> and reduced Tajima’s D (36% of SHDRs with additional outlier statistics, on average). In contrast, <italic>H. melpomene</italic> SHDRs were rarely outliers for Tajima’s D, whereas 22-33% of them were outliers for both Δπ and D<sub>xy</sub>. This could point towards different selection histories in each species, with <italic>H. erato</italic> showing signatures of recent or ongoing selective sweeps leading to an excess of rare alleles (negative Tajima’s D). The Andean split is dated ~0.8 million years older in <italic>H. melpomene</italic> populations<sup><xref ref-type="bibr" rid="CR36">36</xref>,<xref ref-type="bibr" rid="CR37">37</xref></sup> and their altitudinal range is wider than that of <italic>H. erato</italic>, which is rarely found &gt; 1500 m at these latitudes. Thus, it is possible that <italic>H. melpomene</italic> SHDRs represent more ancient sweeps, reflected in the high prevalence of SHDRs outliers for D<sub>xy</sub>. Alternatively, high absolute sequence divergence (D<sub>xy</sub>) between elevations could be indicative of selected haplotypes arising through adaptive introgression from other species into the highland populations.<fig id="Fig4"><label>Fig. 4</label><caption xml:lang="en"><title>Signatures of positive selection across shared high differentiation regions (SHDRs).</title><p>Number of SHDR with additional outlier selection statistics in <italic>H. erato</italic> (<bold>A</bold>) and <italic>H. melpomene</italic> (<bold>C</bold>), statistics included were nucleotide diversity difference between highlands and lowlands (Δπ), Tajima’s D, and absolute genetic differentiation (Dxy). Bars are coloured according to whether they are shared between replicate transects within sides of the Andes (blue or green) or across all transects (allopatric, in red). Shading indicates number of statistics that were above 90th percentile of simulations, white = 1 (only zPBS), light grey = 2, dark grey = 3, and black = 4 statistics. Example close-ups of regional zPBS highland values and selection statistic patterns in Eastern SHDR (<bold>B</bold>; number #005 in Supplementary Figs. <xref ref-type="supplementary-material" rid="MOESM1">8</xref>–<xref ref-type="supplementary-material" rid="MOESM1">10</xref>). Each line represents the values for one of the two Eastern transects, solid line is the Colombian transect and dashed in Ecuador. In this example, all three additional selection statistics ranked as outliers among simulations. Green shading highlights the region of the eastern SHDR with zPBS<sub>high</sub> &gt; 4.</p></caption><p><graphic specific-use="HTML" mime-subtype="PNG" xlink:href="MediaObjects/41467_2022_32316_Fig4_HTML.png"/></p></fig></p><p id="Par19">As an additional independent line of evidence that SHDRs are under selection, we checked for overlaps with selection statistics and altitude-associated regions obtained from an altitudinal transect in southern Ecuador on the East of the Andes, sequenced with a linked-read technology called ‘haplotagging’<sup><xref ref-type="bibr" rid="CR64">64</xref></sup>. We found that, on average, 59% ( ± 10 SD) of Eastern SHDRs of each species overlapped with at least one additional outlier selection statistic estimated with the haplotagging dataset, whereas, as expected, fewer Western SHDRs did (32% ±8 SD, on average; S.I., Supplementary Note <xref ref-type="supplementary-material" rid="MOESM1">3</xref>, Supplementary Fig. <xref ref-type="supplementary-material" rid="MOESM1">5</xref>). In contrast, SHDRs shared in all transects showed high levels of overlap with haplotagging-derived selection statistics in all transects (52% ± 15 SD, on average).</p><p id="Par20">We tested if SHDRs were associated with low-recombining regions. Regions of high differentiation and low recombination could be indicative of purifying selection against deleterious mutations (background selection) or maladaptive introgression<sup><xref ref-type="bibr" rid="CR62">62</xref>,<xref ref-type="bibr" rid="CR65">65</xref>,<xref ref-type="bibr" rid="CR66">66</xref></sup>. Background selection has been shown to be a major driver of differentiation landscapes between populations with little gene flow<sup><xref ref-type="bibr" rid="CR63">63</xref></sup> but is less plausible when populations readily exchange genetic material, as in this study<sup><xref ref-type="bibr" rid="CR67">67</xref>,<xref ref-type="bibr" rid="CR68">68</xref></sup>. However, in low recombining regions, selection may be more efficient due to reduced effective gene flow and segregation of co-adapted alleles, and thus facilitate the maintenance of locally adaptive loci<sup><xref ref-type="bibr" rid="CR62">62</xref>,<xref ref-type="bibr" rid="CR69">69</xref>,<xref ref-type="bibr" rid="CR70">70</xref></sup>. Several strongly selected <italic>Heliconius</italic> colour pattern loci have been previously associated with regions of low recombination (Fig. <xref rid="Fig3" ref-type="fig">3</xref> chromosomes 15 and 18)<sup><xref ref-type="bibr" rid="CR58">58</xref>,<xref ref-type="bibr" rid="CR71">71</xref></sup>. Nevertheless, here we found that recombination rate at SHDRs did not differ from background levels, except in comparisons that included strongly selected colour pattern loci (Fig. <xref rid="Fig3" ref-type="fig">3C</xref>, Supplementary Fig. <xref ref-type="supplementary-material" rid="MOESM1">6</xref>). Overall, these additional signatures of selection strongly support the action of repeated divergent selection in the highlands rather than background selection driving the differentiation detected at SHDRs.</p></sec><sec id="Sec6"><title>Known genes of interest overlap with SHDRs</title><p id="Par21">We retrieved 908 and 747 genes overlapping with SHDRs in <italic>H. erato</italic> and <italic>H. melpomene</italic>, respectively. Adaptation to altitude is likely driven by a suite of selective factors such as temperature, air pressure, or habitat changes. Here, we do not distinguish among individual selective pressures, as these are often correlated and we do not have the power to tease them apart. Additionally, populations adapting to new or changing environments are unlikely to univariately respond to these pressures, with adaptive walks in the wild predicted to be as complex as the environments themselves. Nevertheless, future studies should test different selective pressures in laboratory settings and look for overlaps between genes of interest and SHDRs.</p><p id="Par22">With so many potential targets of selection within SHDRs, we do not attempt to infer biological function or adaptive significance from the whole gene set. Instead, we checked for overlaps with regions recently associated with wing shape variation across an altitudinal cline of Southern Ecuador in <italic>H. erato</italic> and <italic>H. melpomene</italic><sup><xref ref-type="bibr" rid="CR35">35</xref></sup>. Rounder wings are generally associated with the highlands across 13 species of <italic>Heliconius</italic><sup><xref ref-type="bibr" rid="CR34">34</xref></sup>. There is also subtle but highly heritable variation in wing shape associated with altitude along the Ecuadorian Eastern transect here studied<sup><xref ref-type="bibr" rid="CR35">35</xref></sup>. We found that five out of 12 previously identified candidate wing shape loci<sup><xref ref-type="bibr" rid="CR35">35</xref></sup>, overlapped with SHDRs in <italic>H. erato</italic>, three of which corresponded to SHDRs detected in all transects. In contrast, only two wing shape loci (out of 16) overlapped with <italic>H. melpomene</italic> SHDRs, one of which was a SHDR shared by all transects. The number of overlaps between candidate wing shape loci and SHDRs in <italic>H. erato</italic> (<italic>n</italic> = 5) was higher than the 90th quantile of 10,000 permutations, but not in <italic>H. melpomene</italic> (<italic>n</italic> = 2; Fig. <xref ref-type="supplementary-material" rid="MOESM1">S7</xref>).</p><p id="Par23">One gene on chromosome 13 stood out, <italic>rugose</italic>, as it was associated with wing shape in both <italic>H. erato</italic> and <italic>H. melpomene</italic><sup><xref ref-type="bibr" rid="CR35">35</xref></sup> and overlapped with SHDRs shared in all transects in both species. In <italic>Drosophila</italic> mutants, <italic>rugose</italic> has been shown to affect social interactions, locomotion, and hyperactivity<sup><xref ref-type="bibr" rid="CR72">72</xref></sup>. The highland incipient species of the <italic>H. erato</italic> clade, <italic>H. himera</italic>, has been shown to fly for more hours per day than lowland <italic>H. erato</italic><sup><xref ref-type="bibr" rid="CR73">73</xref></sup>, suggesting a potentially important role of locomotion to adapt to highland habitats. Additionally, we found that an <italic>H. erato</italic> Eastern SHDR (Fig. <xref rid="Fig4" ref-type="fig">4B</xref>) overlapped with a locus recently identified to be differentiated across many pairs of subspecies in several <italic>Heliconius</italic> species and shown to affect wing beat frequency in <italic>Drosophila</italic><sup><xref ref-type="bibr" rid="CR74">74</xref></sup>. Thus, future studies could focus on functionally testing some of these candidates and ascertain the potentially adaptive functions of candidate regions.</p></sec><sec id="Sec7"><title>Same haplotypes underlie parallel adaptation to altitude</title><p id="Par24">High altitude differentiation at the same locus could be driven by the same or different haplotypes under selection. For instance, different <italic>de-novo</italic> mutations at one locus were recently found to confer parallel adaptation to toxic soils in <italic>Arabidopsis</italic>, although most parallel regions were sourced from a common pool of standing alleles<sup><xref ref-type="bibr" rid="CR75">75</xref></sup>. To test whether our candidate regions shared the same haplotypes, we performed local Principal Component Analyses (PCA) with outlier windows of each SHDR (Fig. <xref rid="Fig5" ref-type="fig">5A</xref>). While ‘global’ PCAs tend to show relatedness between individuals due to geographic structure or partial reproductive isolation, local PCAs of smaller genomic regions can highlight divergent haplotypes due to, for instance, structural variation or positive selection leading to similar haplotypes in adapted individuals<sup><xref ref-type="bibr" rid="CR76">76</xref>,<xref ref-type="bibr" rid="CR77">77</xref></sup>. Here we assessed whether genetic variation across individuals at SHDRs (local PCA PC1) could be significantly explained by altitude while accounting for genome-wide (‘global’) structuring (Fig. <xref rid="Fig5" ref-type="fig">5A</xref>) to test for evidence for shared allelic basis for altitude adaptation.<fig id="Fig5"><label>Fig. 5</label><caption xml:lang="en"><title>Allele sharing SHDRs and large putative inversion in chromosome 2 of <italic>H. erato</italic> Eastern transects.</title><p><bold>A</bold> Example analysis to test whether same alleles underlie SHDRs (here depicted <italic>H. erato</italic> Eastern SHDR #77). First, outlier windows (zPBS &gt; 4) in either the Eastern Colombia (solid black line) or the Eastern Ecuadorian (dotted grey line) transect are selected (grey panel), and a local PCA with those sites is performed. Then we test whether PC1, the axis explaining most of the variation, is significantly explained by the altitude at which individuals were collected, while controlling for the global PC1 (i.e., neutral population structure). Each point represents an individual, their shape represents transect of origin (Colombia filled, Ecuador empty symbols) and their colour the altitude (m) at which individuals were collected. The solid line represents the best fit of a linear model, with the shaded area showing a confidence bands at 1 standard error and the Pearson correlation coefficient is shown (R, P &lt; 2.2 e<sup>−16</sup>). <bold>B</bold> Number of SHDRs where altitude is a significant predictor of local PCA axis 1. <bold>C</bold> zPBS highland differentiation in Eastern Colombia (solid black line) and Ecuadorian (dotted grey line) transects across a 6.5 Mbp region of <italic>H. erato</italic> chromosome 2. zPBS lines are regionally smoothed with rolling means of 200 windows, thus some individual outlier windows are higher in value (Fig. <xref rid="Fig3" ref-type="fig">3</xref>). SHDRs are shown as vertical segments, coloured by whether they represent SHDRs within Eastern transects (green) or allopatric shared across all transects (red, SHDRs shown in Fig. <xref rid="Fig3" ref-type="fig">3</xref>). The solid line represents the best fit of a linear model, with the shaded area showing a confidence bands at 1 standard error. The Pearson correlation coefficient between the putative inversion local PCA PC1 and altitude is shown (****<italic>P</italic> &lt; 1.8 e<sup>−7</sup>). Homokaryotes for the wildtype arrangement are named wt/wt, heterokaryotes are inv/wt and inversion homokaryotes are labelled inv/inv. The most common arrangement clustered with the Western transects of <italic>H. erato</italic> and outgroups of other species in a neighbour-joining tree, and thus was considered the most likely, non-inverted haplotype (wt/wt) (Supplementary Fig. <xref ref-type="supplementary-material" rid="MOESM1">12</xref>).</p></caption><p><graphic specific-use="HTML" mime-subtype="PNG" xlink:href="MediaObjects/41467_2022_32316_Fig5_HTML.png"/></p></fig></p><p id="Par25">PCAs in each SHDR were performed with individuals from all altitudes in transects connected via gene flow (replicate Colombia/Ecuador transects). Local PCAs at SHDRs often showed individual clustering that differed from the neutral geographic expectations (whole-genome ‘global’ PCAs that included Western or Eastern transects, Supplementary Fig. <xref ref-type="supplementary-material" rid="MOESM1">1</xref>), and the first axes of variation tended to explain a much larger proportion of the variation observed (PC1 explained 55% ± 20 SD compared to 19% in global PCAs, on average; Supplementary Table <xref ref-type="supplementary-material" rid="MOESM1">3</xref>). Out of the four genome-wide PCAs including individuals from replicate transects within sides of the Andes, altitude only explained clustering along PC1 in the Eastern <italic>H. erato</italic> transects (Supplementary Table <xref ref-type="supplementary-material" rid="MOESM1">3</xref>, Supplementary Fig. <xref ref-type="supplementary-material" rid="MOESM1">1</xref>). This can be explained by a different highland colour-pattern subspecies in Colombia, <italic>H. e. dignus</italic>, reducing gene flow across the genome (Fig. <xref rid="Fig2" ref-type="fig">2</xref>). In contrast, we found that a large proportion of local SHDR PCAs had PC1s that correlated significantly with individual altitude (<italic>P</italic> &lt; 0.05, <italic>H. erato</italic>: East = 48%, <italic>H. melpomene</italic>: West = 74%, East = 66%, Supplementary Table <xref ref-type="supplementary-material" rid="MOESM1">3</xref>), except in <italic>H. erato</italic> West where only 25% did (Fig. <xref rid="Fig5" ref-type="fig">5B</xref>, Supplementary Figs. <xref ref-type="supplementary-material" rid="MOESM1">8</xref>–<xref ref-type="supplementary-material" rid="MOESM1">11</xref>). Altitude explained, on average, 12% of the variation in local PC1 while controlling for the global PC1 (altitude partial R<sup>2</sup>, <italic>H. erato</italic>: West = 0.05, East = 0.16, <italic>H. melpomene</italic>: West = 0.10, East = 0.15, Supplementary Table <xref ref-type="supplementary-material" rid="MOESM1">3</xref>).</p><p id="Par26">Local PCAs can also highlight divergent haplotypes, putatively associated with inversions, by clustering individuals that possess homozygous or heterozygous haplotypes in those regions<sup><xref ref-type="bibr" rid="CR78">78</xref>,<xref ref-type="bibr" rid="CR79">79</xref></sup>. We found several <italic>H. erato</italic> SHDRs within a high differentiation block in chromosome 2 (6.5 mega base pairs, Mbp, Fig. <xref rid="Fig5" ref-type="fig">5C</xref>), ~0.75 Mbp downstream from a recently identified inversion exclusively present in lowland individuals of southern Ecuador<sup><xref ref-type="bibr" rid="CR64">64</xref></sup>. We performed an additional local PCA across the large putative inversion and found a three-cluster pattern, consistent with the presence of the three inversion genotypes (Fig. <xref rid="Fig5" ref-type="fig">5C</xref>), and a neighbour-joining tree with outgroups supported its appearance in the Eastern lowlands (Supplementary Fig. <xref ref-type="supplementary-material" rid="MOESM1">12</xref>). Local PCAs of SHDRs within the inversion region correlated more strongly with altitude than putatively inverted-only haplotypes, indicating that adaptive loci remain differentiated in the highlands and may pre-date the inversion event in the lowlands (Supplementary Fig. <xref ref-type="supplementary-material" rid="MOESM1">8</xref>). This is consistent with a model in which the inversion could enhance local adaptation by reducing gene flow between elevations at pre-existing locally-adapted alleles<sup><xref ref-type="bibr" rid="CR80">80</xref></sup>.</p><p id="Par27">Overall, the majority of SHDRs involve the same alleles across transects connected via gene flow. Those SHDRs that do not correlate with altitude in local PCAs could represent false positives where there is no selection associated with altitude. However, they may also represent cases where the original beneficial mutation recombined onto distinct haplotypes that spread in different regions; cases where different de-novo mutations arose at the same or nearby loci in different genetic backgrounds in different regions; or where beneficial alleles entered the population through independent introgression events. An alternative hypothesis is that the observed parallelism is partly driven by different selective pressures on each cline, and that these peaks represent ‘evolutionary hotspots’ — regions particularly prone to driving phenotypic evolution across lineages<sup><xref ref-type="bibr" rid="CR5">5</xref></sup>. This seems less likely given that the same haplotypes underlie parallel SHDRs and there is low parallelism between the two species. Nevertheless, putative intra-lineage hotspots could be investigated by assessing mutational biases and chromosomal instability in these regions, as well as disentangling the individual selective factors at play.</p><p id="Par28">The large putative inversion found exclusively in the lowlands may represent a case of structural variation facilitating adaptation in the highlands<sup><xref ref-type="bibr" rid="CR80">80</xref></sup>. Recent studies on environmental adaptation in seaweed flies and sunflowers, among others, have demonstrated a key role for inversions in maintaining adaptive alleles together and facilitating the evolution of locally adapted ecotypes<sup><xref ref-type="bibr" rid="CR76">76</xref>,<xref ref-type="bibr" rid="CR77">77</xref></sup>. By studying individual clustering across differentiated loci we have shown that the same alleles often drive parallelisms involved in local adaptation. We thus next turned to identifying the source of the genetic variation causing molecular parallelism across populations.</p></sec><sec id="Sec8"><title>The source of parallelism: standing variation and adaptive introgression with high-altitude relatives</title><p id="Par29">The presence of the same putatively adaptive haplotypes on several transects could either reflect: (i) standing variation being repeatedly selected in the highlands or shared via intraspecific gene flow, or (ii) recruitment of adaptations from other high-altitude adapted species through introgression. With five high-depth individuals per population of <italic>H. erato</italic> and <italic>H. melpomene</italic>, and 116 additional whole-genomes of high-altitude specialist species and outgroups, we tested for signatures of shared standing variation within species and of adaptive introgression between species in SHDRs.</p><p id="Par30">To test for excess allele sharing at SHDR, we calculated the F<sub>dM</sub> statistic in 50 kb windows across the genome<sup><xref ref-type="bibr" rid="CR81">81</xref>,<xref ref-type="bibr" rid="CR82">82</xref></sup>. For each test, we used a tree with four populations (((P1, P2), P3), O), where P1/P2 reflect the lowland and highland populations, respectively, and P3 is an allopatric high-altitude population of the same species or a sympatric high-altitude specialist species (Fig. <xref rid="Fig6" ref-type="fig">6A</xref>). Positive F<sub>dM</sub> values indicate excess allele sharing between P3 and P2 (i.e., between non-sister high-altitude lineages), and negative values indicate excess allele sharing between P3 and P1 (i.e., between non-sister high- and low-altitude lineages, Fig. <xref rid="Fig6" ref-type="fig">6A</xref>). We then tested if SHDRs are enriched for outlier positive F<sub>dM</sub> (i.e., excess allele sharing with the highlands), using the distribution of absolute negative F<sub>dM</sub> across SHDRs as a null (see Methods for details). This specifically tests whether genomic regions that are differentiated in high-altitude populations (SHDRs) are systematically enriched for alleles shared with allopatric high-altitude populations of the same species or with sympatric specialist high-altitude species.<fig id="Fig6"><label>Fig. 6</label><caption xml:lang="en"><title>Many SHDRs were sourced from standing variation and putative adaptive introgression from highland-specialist species.</title><p><bold>A</bold> Tree used to estimate F<sub>dM</sub> values per 50kb window across the genome in each comparison, which when positive represents excess allele sharing between P2, a highland <italic>H. erato</italic> or <italic>H. melpomene</italic> population, and P3, an allopatric highland population of the same species or a sympatric high-altitude specialist species, compared to a lowland population (P2). Colours of P3 populations or species indicate the potential mechanism driving the excess allele sharing, either intraspecific shared ancestral standing variation (blue) or adaptive introgression from closely (orange) or distantly related (yellow) high-altitude specialist species. <bold>B</bold> Putative donor (P3) high-altitude specialist species. <bold>C</bold> Excess allele sharing at SHDRs between P3 (putative highland donors, left y axes) and P2 (putative highland recipients, right y axes) across the <italic>H. erato</italic> (top) or <italic>H. melpomene</italic> (bottom) comparisons (phylogeny from Kozak et al.)<sup><xref ref-type="bibr" rid="CR1">1</xref>,<xref ref-type="bibr" rid="CR38">38</xref></sup>. Left panel shows mean maximum F<sub>dM</sub> ( ± S.E.) across SHDRs (western SHDRs if the putative recipient was on the West of the Andes, and vice versa) of the Colombian (solid triangles) and Ecuadorian (unfilled triangles) transects. Background mean maximum F<sub>dM</sub> values were obtained from 1000 block permutations across the genome and shown in grey. Stars represent comparisons where distribution of maximum F<sub>dM</sub> (excess allele sharing with the highlands) was significantly higher than absolute minimum F<sub>dM</sub> (excess allele sharing with the lowlands) distribution across all SHDRs (two-sample Kolmogorov-Smirnov tests <italic>P</italic> &lt; 0.05; significant <italic>P</italic>-values from top to bottom: 0.00046, 1.6 e<sup>−5</sup>, 2.0 e<sup>−7</sup>, 0.00031, 0.007, 2.0<sup>−10</sup>, 2.6 e<sup>−8</sup>; Supplementary Figs. <xref ref-type="supplementary-material" rid="MOESM1">15</xref>, <xref ref-type="supplementary-material" rid="MOESM1">16</xref>). Right panels show percentage of SHDRs with evidence of excess allele sharing between P2 and P3, considered significant if they had outlier maximum F<sub>dM</sub> (&gt; 90th percentile of absolute minimum F<sub>dM</sub> across all SHDRs). Abbreviations not depicted: era <italic>H. erato</italic>, mel <italic>H. melpomene</italic>. Source data are provided in the Source Data file.</p></caption><p><graphic specific-use="HTML" mime-subtype="PNG" xlink:href="MediaObjects/41467_2022_32316_Fig6_HTML.png"/></p></fig></p><p id="Par31">We first assessed intraspecific allele sharing between allopatric highland populations on opposite sides of the Andes, which split ~0.9 million years ago (Mya) and ~1.7 Mya in <italic>H. erato</italic> and <italic>H. melpomene</italic>, respectively<sup><xref ref-type="bibr" rid="CR36">36</xref>,<xref ref-type="bibr" rid="CR37">37</xref></sup>. Signatures of allele sharing likely represent shared ancestral standing variation that pre-dates the Andean split (Fig. <xref rid="Fig1" ref-type="fig">1B</xref>), but we cannot rule out gene flow via distant contact zones in the north and south edges of the Andes or periods of secondary contact in the past<sup><xref ref-type="bibr" rid="CR37">37</xref></sup>. Nearly half of <italic>H. erato</italic> Eastern SHDRs had outlier excess allele sharing with the Western highlands in Colombia, whereas only 9% of Western SHDRs did (Fig. <xref rid="Fig6" ref-type="fig">6B</xref>, Supplementary Fig. <xref ref-type="supplementary-material" rid="MOESM1">15</xref>). Both comparisons resulted in a significant enrichment of excess allele sharing between allopatric highland populations compared to sharing with the lowlands across all SHDRs (Kolmogorov-Smirnov tests <italic>P</italic> &lt; 0.05 as stars in Fig. <xref rid="Fig6" ref-type="fig">6B</xref>, Supplementary Fig. <xref ref-type="supplementary-material" rid="MOESM1">15</xref>). <italic>H. melpomene</italic> only showed significant enrichment of excess allele sharing between allopatric highland populations of Ecuador in Eastern SHDRs, and the percentage of SHDRs with excess allele sharing was generally lower than in <italic>H. erato</italic> (Fig. <xref rid="Fig6" ref-type="fig">6B</xref>). Overall, shared standing variation has been an important mechanism facilitating molecular parallelism in <italic>H. erato</italic>, in which trans-Andean populations share a more recent common ancestor.</p><p id="Par32">We then explored allele sharing between highland populations of <italic>H. erato</italic> and <italic>H. melpomene</italic> and five sympatric high-altitude specialist relatives (Fig. <xref rid="Fig6" ref-type="fig">6C</xref>). These highland species are known to readily or occasionally hybridise with <italic>H. erato</italic> or <italic>H. melpomene</italic><sup><xref ref-type="bibr" rid="CR37">37</xref>,<xref ref-type="bibr" rid="CR83">83</xref>–<xref ref-type="bibr" rid="CR85">85</xref></sup>. To quantify genome-wide evidence of allele sharing we first computed f-branch statistics, which test for gene flow between branches of a phylogeny<sup><xref ref-type="bibr" rid="CR86">86</xref></sup>. As expected, we found evidence of excess allele sharing between all relevant pairs (details in Supplementary Note <xref ref-type="supplementary-material" rid="MOESM1">4</xref>, Supplementary Figs. <xref ref-type="supplementary-material" rid="MOESM1">13</xref>, <xref ref-type="supplementary-material" rid="MOESM1">14</xref>)<sup><xref ref-type="bibr" rid="CR87">87</xref></sup>. Excess allele sharing at SHDR between highland populations and sympatric high-altitude specialist species likely represent cases of adaptive introgression. Generally, the more closely related putative donor and recipient species were, the higher proportion of SHDRs that showed excess allele sharing (Fig. <xref rid="Fig6" ref-type="fig">6B</xref>, Supplementary Fig. <xref ref-type="supplementary-material" rid="MOESM1">16</xref>). For instance, levels of allele sharing in SHDRs were much higher between highland <italic>H. erato</italic> and the closely related <italic>H. himera</italic> than with the distantly related <italic>H. telesiphe</italic> (Fig. <xref rid="Fig6" ref-type="fig">6B</xref>). Context-dependant mutational effects (epistasis) in divergent genetic backgrounds could explain the lower levels of excess allele sharing between distantly related species<sup><xref ref-type="bibr" rid="CR21">21</xref></sup>, as shown for parallel adaptation to altitude in birds<sup><xref ref-type="bibr" rid="CR88">88</xref></sup>. Interestingly, in Eastern <italic>H. melpomene</italic>, SHDR sharing with a closely related sympatric species, <italic>H. timareta</italic>, was more prevalent in SHDR than shared variation with allopatric highland populations of its own species (Supplementary Fig. <xref ref-type="supplementary-material" rid="MOESM1">16D</xref>). Admixture between adjacent <italic>H. melpomene</italic> and <italic>H. timareta</italic> populations is well-documented, with strongly selected colour pattern loci having been shared across the species barrier<sup><xref ref-type="bibr" rid="CR84">84</xref>,<xref ref-type="bibr" rid="CR85">85</xref>,<xref ref-type="bibr" rid="CR89">89</xref></sup>.</p><p id="Par33">Levels of putative adaptive introgression at SHDRs were also high between <italic>H. himera</italic> and highland <italic>H. erato</italic>, and significantly enriched across SHDRs in Colombia (Fig. <xref rid="Fig6" ref-type="fig">6B</xref>). <italic>H. himera</italic> is a closely related species that split from within the Eastern <italic>H. erato</italic> clade 215,000−527,000 years ago<sup><xref ref-type="bibr" rid="CR37">37</xref></sup>, with pre-mating isolation and a range of divergent life-history phenotypes adapted to the highland dry forests it inhabits<sup><xref ref-type="bibr" rid="CR90">90</xref>–<xref ref-type="bibr" rid="CR92">92</xref></sup>. Admixture is predominantly from <italic>H. himera</italic> into <italic>H. erato</italic><sup><xref ref-type="bibr" rid="CR37">37</xref></sup>, supporting our hypothesis that the high levels of excess allele sharing at SHDRs between the two may represent cases of adaptive introgression into <italic>H. erato</italic>. Our study is the first to show that putative adaptive alleles other than colour pattern loci have been shared between high-altitude specialist species and <italic>H. erato</italic> and <italic>H. melpomene</italic>, potentially facilitating their adaptation to montane habitats.</p><p id="Par34">The 6.5 Mbp putative inversion detected in chromosome 2 of Eastern <italic>H. erato</italic> individuals showed high levels of allele sharing between highland <italic>H. erato</italic> populations and <italic>H. himera</italic>, whereas there was no excess allele sharing with either the highlands or the lowlands when the putative donor species was a distantly related species (Supplementary Fig. <xref ref-type="supplementary-material" rid="MOESM1">17</xref>). A neighbour-joining tree of this region revealed that lowland distant individuals that clustered in the local PCA formed a monophyletic group divergent from all other <italic>H. erato</italic> populations, including allopatric populations in the west of the Andes (Supplementary Fig. <xref ref-type="supplementary-material" rid="MOESM1">12</xref>). This suggests that the inversion may have arisen anciently, prior to the western and eastern Andean split of <italic>H. erato</italic>. Its maintenance in the lowland populations may protect locally adaptive alleles from maladaptive migration load and/or promote the accumulation of novel, locally adaptive mutations<sup><xref ref-type="bibr" rid="CR77">77</xref></sup>. Furthermore, its absence in the highlands allows for ongoing gene flow between highland <italic>H. erato</italic> populations and the closely related highland specialist <italic>H. himera</italic>. Supergene evolution in another species of this genus, <italic>H. numata</italic>, has been linked to the introgression of a chromosomal inversion<sup><xref ref-type="bibr" rid="CR93">93</xref></sup>, highlighting the role of structural variation and hybridisation in providing novel genetic architectures that can promote adaptation. Future work could investigate the potential role of this inversion in maintaining locally beneficial allele clusters and their associated adaptive phenotypes.</p><p id="Par35">By studying recently and anciently diverged populations at different altitudes within and across sides of the Andes of two species we have uncovered (i) strong signatures of high-altitude differentiation in narrow regions across the genome, consistent with positive selection, (ii) high levels of molecular parallelism between transects of the same species but no sharing across species, and (iii) an important role of standing variation and adaptive introgression from high-altitude specialist species in adaptation to these montane environments. The overall lack of molecular parallelism across species points towards genetic redundancy of polygenic evolution that allows different combinations of alleles to confer adaptation to the same environments or may reflect variation in the importance of specific selection pressures across species<sup><xref ref-type="bibr" rid="CR28">28</xref></sup>. The evolutionary success of <italic>H. erato</italic> and <italic>H. melpomene</italic> in inhabiting a wide range of altitudes has likely been facilitated by abundant genetic diversity, as well as by intra- and interspecific gene flow allowing for the sharing of pre-existing adaptive alleles. Together, our study highlights the value of extensive replication across space and large whole-genome datasets for understanding the molecular underpinnings of local adaptation in the wild. Both standing genetic variation and recent hybridization can supply the selection targets required for adaptation to the environment, which emphasizes the importance of preserving gene flow and connectivity between populations if organisms are to adapt to everchanging environmental pressures.</p></sec></sec><sec id="Sec9" sec-type="methods"><title>Methods</title><p id="Par36">Our study did not require ethical approvals. In Colombia, field collections were conducted under permit no. 530 issued by the Autoridad Nacional de 539 Licencias Ambientales of Colombia (ANLA). In Ecuador, collections during November-December 2011, and September-October 2012, were done under permit 0033-FAU-MAE-DPO-PNY and exported under permits 001-FAU-MAE-DPO-PNY and 006-EXP-CIEN-FAU-DPO-PNY. Permits were obtained from Parque Nacional Yasuní, Ministerio Del Ambiente, La Dirección Provincial de Orellana. Collections in Ecuador during 2017-2019 were conducted under the permit provided by the Ministerio del Ambiente, Ecuador (MAE-DNB-CM-2017-0058).</p><sec id="Sec10"><title>Study system and wild butterfly collection</title><p id="Par37"><italic>H. erato</italic> and <italic>H. melpomene</italic> can be found across most of the Neotropics and have Müllerian aposematic mimicry to advertise their toxicity to predators, thus share colour pattern when inhabiting the same areas<sup><xref ref-type="bibr" rid="CR94">94</xref></sup>. They can be found continuously coexisting across altitudinal transects ranging from sea level up to 1600 m along the Andean mountains, and <italic>H. melpomene</italic> can be found across elevations up to 1800 m. Butterflies were collected from 111 different locations, which we grouped into 30 populations, corresponding to four transects Colombia West/East, and Ecuador West/East (Supplementary Table <xref ref-type="supplementary-material" rid="MOESM1">1</xref>). In each transect populations were either in the highlands (altitude mean = 1235 m), lowlands (altitude mean = 364 m), or distant lowlands (altitude mean = 95 m) to control for genetic drift due to isolation by distance (Fig. <xref rid="Fig2" ref-type="fig">2A</xref>). The Andes acts as a barrier to gene flow, as elevations in these latitudes are too high for butterflies to fly across and have been for at least 8 million years<sup><xref ref-type="bibr" rid="CR95">95</xref></sup>, which pre-dates the expansion of both species across these latitudes<sup><xref ref-type="bibr" rid="CR36">36</xref>,<xref ref-type="bibr" rid="CR37">37</xref></sup>. Microclimatic variation across the Ecuadorian altitudinal transects here studied were found to be remarkably similar between Eastern and Western transects<sup><xref ref-type="bibr" rid="CR33">33</xref></sup>, making them ideal for the study of repeated adaptation. All but one of these transects (Colombia East) had the same subspecies, i.e., geographic colour morph, in the three altitudes, to avoid differentiation due to highly divergent colour pattern loci (Fig. <xref rid="Fig2" ref-type="fig">2A</xref>). Detached wings were stored in glassine envelopes and bodies in EtOH (96%) vials. We additionally collected high-altitude specialist relatives of <italic>H. erato</italic> and <italic>H. melpomene</italic> that have potential for admixture between them. The <italic>H. erato</italic> relatives were <italic>H. himera</italic> and <italic>H. telesiphe</italic> from the Eastern Andes, and <italic>H. clysonymus</italic> which is found on both sides of the Andes. The <italic>H. melpomene</italic> relatives were <italic>H. timareta</italic> and <italic>H. cydno</italic>, from the Eastern and Western Andes, respectively. More distantly related outgroups were also sampled, <italic>H. eleuchia</italic> and <italic>H. hecale</italic> for <italic>H. erato</italic> and <italic>H. melpomene</italic>, respectively.</p></sec><sec id="Sec11"><title>Whole-genome sequencing</title><p id="Par38">Whole genome sequence data from 518 individuals was analysed in this study, 444 were sequenced for this study, while the rest were obtained from published studies (<italic>n</italic> = 74). Of the individuals sequenced for this study 365 were sequenced at low-medium depth with BGI (~6X), and 79 were sequenced at high depth with Novogene (~18X-30X), at least 5 per population. For the high-altitude specialist species dataset and outgroup species, we obtained high-depth whole genome sequencing data for 116 individuals, 63 of which were sequenced for this study at ~20X depth with BGI. A full list of individuals, localities, and accession numbers can be found in the Supplementary Data <xref ref-type="supplementary-material" rid="MOESM3">1</xref>. Individuals with <italic>H. melpomene malleti</italic> phenotypes (Fig. <xref rid="Fig1" ref-type="fig">1</xref>) were genotyped with PCR amplification with the primer Jerry followed by a restriction digest, following<sup><xref ref-type="bibr" rid="CR56">56</xref></sup>, to identify cryptic individuals of the species <italic>H. timareta ssp. nov</italic>., which are indistinguishable phenotypically from <italic>H. m. malleti</italic>. We extracted DNA with QIAGEN DNeasy Blood and Tissue extraction kits, including RNA removal, and confirmed DNA integrity and concentration (minimum of 10 ng/μL) using Qubit. DNA samples were stored at −20 °C until library preparation. For the individuals that were sequenced with low-medium depth, a secondary purification was performed with magnetic SpeedBeads<sup>TM</sup> (Sigma) and we prepared Nextera DNA libraries (Illumina, Inc.) with purified Tn5 transposase<sup><xref ref-type="bibr" rid="CR96">96</xref></sup>. PCR extension with an i7-index primer (N701–N783) and the N501 i5-index primer was performed to barcode the samples. Library purification and size selection was done using magnetic SpeedBeads<sup>TM</sup> (Sigma). We confirmed adaptor lengths through TapeStation High sensitivity T1000 (Agilent Technologies, CA, USA) and gel electrophoresis. Pooled libraries were sequenced by The Beijing Genomics Institute (China) using HiSeq X Ten (Illumina). Library preparation and sequencing of the high-depth <italic>H. erato</italic> and <italic>H. melpomene</italic> individuals was carried with HiSeq X platform (150 bp paired-end) by Novogene.</p></sec><sec id="Sec12"><title>Statistical analyses</title><p id="Par39">All non-genomic analyses were run in R V2.13 (R Development Core Team 2011) and graphics were generated with the package <italic>ggplot2</italic><sup><xref ref-type="bibr" rid="CR97">97</xref></sup>.</p><sec id="Sec13"><title>Read mapping and genotype calling</title><p id="Par40">We aligned the sequence data of all individuals of the two focal species and their relatives to their corresponding reference genomes, either <italic>H. melpomene</italic> version 2.5<sup><xref ref-type="bibr" rid="CR98">98</xref>,<xref ref-type="bibr" rid="CR99">99</xref></sup> or <italic>H. erato demophoon</italic><sup><xref ref-type="bibr" rid="CR58">58</xref></sup>, obtained from Lepbase<sup><xref ref-type="bibr" rid="CR98">98</xref></sup>, using bwa mem (v 0.7.15<sup><xref ref-type="bibr" rid="CR100">100</xref></sup>). We used samtools (v 1.9<sup><xref ref-type="bibr" rid="CR101">101</xref></sup>) to sort and index the alignment files. Duplicates were removed using the MarkDuplicates program in Picard tools (v 1.92 Broad Institute, 2018<sup><xref ref-type="bibr" rid="CR102">102</xref></sup>). Genome-wide mean sequencing depth was calculated with samtools (v 1.9<sup><xref ref-type="bibr" rid="CR101">101</xref></sup>). Mean sequencing depth was very similar across areas of <italic>H. erato</italic> (mean = 8.93, Supplementary Fig. <xref ref-type="supplementary-material" rid="MOESM1">18</xref> and was generally higher for <italic>H. melpomene</italic> (mean = 12.3), but more variable, especially in Colombia where many sequences were obtained from published studies (Supplementary Data <xref ref-type="supplementary-material" rid="MOESM3">1</xref>). Most of the analyses described below for <italic>H. erato</italic> and <italic>H. melpomene</italic> were performed with genotype likelihoods in ANGSD and low or variable sequencing depths are thus accounted for<sup><xref ref-type="bibr" rid="CR103">103</xref></sup>.</p><p id="Par41">However, for our phylogenetic datasets combining our samples with other species for phylogenetic tree reconstruction and tests of admixture, we restricted the <italic>H. erato</italic> and <italic>H. melpomene</italic> samples to the five individuals per population with high sequencing depth. We mapped the high-altitude specialist relatives and outgroups of <italic>H. erato</italic> and <italic>H. melpomene</italic> to the respective reference genomes as explained above (Supplementary Data <xref ref-type="supplementary-material" rid="MOESM3">1</xref>). We used a genotype calling approach with GATK v. 3.7<sup><xref ref-type="bibr" rid="CR104">104</xref></sup> to obtain a vcf file each for the <italic>H. erato</italic> and <italic>H. melpomene</italic> clade. Genotypes were called with HaplotypeCaller for each individual and variants were then called with GenotypeGVCFs across all individuals combined. The vcf files were filtered with vcftools v. 0.1.15<sup><xref ref-type="bibr" rid="CR105">105</xref></sup> to remove genotypes with less than 3 reads, monomorphic sites, multi-allelic sites, insertions and deletions (indels), and sites with more than 50% missing data.</p></sec><sec id="Sec14"><title>Isolation by distance and Isolation by environment</title><p id="Par42">To study Isolation by Distance (IBD) and Isolation by Environment (IBE), we first calculated all pairwise genetic differentiation (Fst) between all populations on each side of the Andes that had at least 5 individuals each, i.e., <italic>H. erato</italic> west (<italic>n</italic><sub>population</sub> = 7), <italic>H. erato</italic> east (<italic>n</italic><sub>population</sub> = 11), <italic>H. melpomene</italic> west (<italic>n</italic><sub>population</sub> = 7), <italic>H. melpomene</italic> east (<italic>n</italic><sub>population</sub> = 9), hereafter side-species replicate (Supplementary Table <xref ref-type="supplementary-material" rid="MOESM1">1</xref>). We calculated pairwise population genetic distance with the function calculate.all.pairwise.Fst() from the R package BEDASSLE<sup><xref ref-type="bibr" rid="CR39">39</xref></sup>. This requires a matrix of allele count data, with populations as rows and number of biallelic unlinked loci sampled as columns, which we obtained with ANGSD and custom scripts. First, we obtained a list of highly polymorphic SNPs per side-species replicate, by (i) heavily filtering 10 random individuals and obtaining minor allele frequencies (-doMaf 1) by forcing the major allele to match the reference state, so that it is the same across all populations (-doMajorMinor 4) (ii) extracting the sites and the major/minor allele frequencies, (iii) creating an indexed sites file (angsd sites index), (iv) subsetting so that sites are at least 2 kb apart, to prune for linkage disequilibrium. This list of sites and regions was then used to obtain minor/major allele frequency counts with all individuals per population and forcing the major/minor allele to match the ones given by the sites file (-doMajorMinor 3). From the resulting allele frequencies per population, we calculated allele counts, by multiplying by the number of individuals per population and the number of chromosomes samples (2, diploid). We obtained the required allele count matrix by concatenating all populations per side-species replicate, and only keeping loci with allele counts for all populations.</p><p id="Par43">Geographical distance between populations measured as a straight line through the landscape is not biologically representative of organisms moving through space. To account for topographic complexity, we obtained topographic least cost paths with the R package <italic>topodistance</italic>. With historical records from the Earthcape database<sup><xref ref-type="bibr" rid="CR106">106</xref></sup>, we created a binary habitat suitability raster based on the altitudinal range of each species, so that least cost paths between populations never included elevations that these butterflies do not inhabit. Then we used the function topoLCP() to get the least cost path distance between populations (Supplementary Fig. <xref ref-type="supplementary-material" rid="MOESM1">3</xref><sup><xref ref-type="bibr" rid="CR107">107</xref></sup>), and use this distance as a proxy of isolation by distance between populations.</p></sec><sec id="Sec15"><title>Differentiation and selection statistics</title><p id="Par44">To search for signatures of local adaptation to montane habitats we use a measure of lineage-specific differentiation, population branch statistics (PBS)<sup><xref ref-type="bibr" rid="CR44">44</xref></sup>. PBS is a summary statistic based on pairwise genetic differentiation (Fst) among three populations, two of which are located closely geographically (high, low) and one distant outgroup (low distant). For each population trio (high, low, low distant Fig. <xref rid="Fig1" ref-type="fig">1A</xref>), we computed PBS with ANGSD<sup><xref ref-type="bibr" rid="CR103">103</xref></sup>. We first obtained genotype likelihoods to calculate the site-frequency spectrum (SFS) per population. Then, we computed 2D-SFS for each population pair (high-low, high-low.distant, low-low.distant) with the function realSFS. We then used the 2D-SFS as a prior for the joint allele frequency probabilities at each site, which are used to compute per-site pairwise Hudson’s Fst<sup><xref ref-type="bibr" rid="CR108">108</xref></sup> as interpreted by Bhatia (<sup><xref ref-type="bibr" rid="CR109">109</xref></sup>, realSFS fst index -whichFst 1) among the three populations (Fst<sub>high-low</sub>, Fst<sub>high-low</sub>, Fst<sub>high-low.distant</sub>) and PBS per population (PBS<sub>high</sub>, PBS<sub>low</sub>, PBS<sub>low.distant</sub>). This is achieved by first transforming pairwise Fst values into relative divergence times with Eq. (<xref rid="Equ1" ref-type="disp-formula">1</xref>):<disp-formula id="Equ1"><label>1</label><alternatives><mml:math><mml:mi>T</mml:mi><mml:mo>=</mml:mo><mml:mo>−</mml:mo><mml:mi>log</mml:mi><mml:mfenced close=")" open="("><mml:mrow><mml:mn>1</mml:mn><mml:mo>−</mml:mo><mml:mi>F</mml:mi><mml:mi>s</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:mfenced></mml:math><tex-math id="Equ1_TeX">\documentclass[12pt]{minimal}
				\usepackage{amsmath}
				\usepackage{wasysym}
				\usepackage{amsfonts}
				\usepackage{amssymb}
				\usepackage{amsbsy}
				\usepackage{mathrsfs}
				\usepackage{upgreek}
				\setlength{\oddsidemargin}{-69pt}
				\begin{document}$$T=-{\log }\left(1-{Fst}\right)$$\end{document}</tex-math><graphic position="anchor" xlink:href="41467_2022_32316_Article_Equ1.gif"/></alternatives></disp-formula></p><p id="Par45">To then obtain PBS for a given population (here the highlands) with Eq. (<xref rid="Equ2" ref-type="disp-formula">2</xref>):<disp-formula id="Equ2"><label>2</label><alternatives><mml:math><mml:msub><mml:mrow><mml:mi>P</mml:mi><mml:mi>B</mml:mi><mml:mi>S</mml:mi></mml:mrow><mml:mrow><mml:mi>h</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi><mml:mi>h</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:msub><mml:mrow><mml:mi>T</mml:mi></mml:mrow><mml:mrow><mml:mi>h</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mo>−</mml:mo><mml:mi>l</mml:mi><mml:mi>o</mml:mi><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mrow><mml:mi>T</mml:mi></mml:mrow><mml:mrow><mml:mi>h</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mo>−</mml:mo><mml:mi>l</mml:mi><mml:mi>o</mml:mi><mml:mi>w</mml:mi><mml:mo>.</mml:mo><mml:mi>d</mml:mi><mml:mi>i</mml:mi><mml:mi>s</mml:mi><mml:mi>t</mml:mi><mml:mi>a</mml:mi><mml:mi>n</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>−</mml:mo><mml:msub><mml:mrow><mml:mi>T</mml:mi></mml:mrow><mml:mrow><mml:mi>l</mml:mi><mml:mi>o</mml:mi><mml:mi>w</mml:mi><mml:mo>−</mml:mo><mml:mi>l</mml:mi><mml:mi>o</mml:mi><mml:mi>w</mml:mi><mml:mo>.</mml:mo><mml:mi>d</mml:mi><mml:mi>i</mml:mi><mml:mi>s</mml:mi><mml:mi>t</mml:mi><mml:mi>a</mml:mi><mml:mi>n</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:mfrac></mml:math><tex-math id="Equ2_TeX">\documentclass[12pt]{minimal}
				\usepackage{amsmath}
				\usepackage{wasysym}
				\usepackage{amsfonts}
				\usepackage{amssymb}
				\usepackage{amsbsy}
				\usepackage{mathrsfs}
				\usepackage{upgreek}
				\setlength{\oddsidemargin}{-69pt}
				\begin{document}$${{PBS}}_{{high}}=\frac{{T}_{{high}-{low}}+{T}_{{high}-{low}.{distant}}-{T}_{{low}-{low}.{distant}}}{2}$$\end{document}</tex-math><graphic position="anchor" xlink:href="41467_2022_32316_Article_Equ2.gif"/></alternatives></disp-formula></p><p id="Par46">This quantifies the magnitude of allele frequency change in the highland lineage since its divergence from the lowland and lowland distant populations. Regions of the genome with large PBS values represent loci that have undergone population-specific sequence differentiation consistent with positive selection. We computed weighted Fst and PBS averages per 5 kb window size and 1 kb steps (realSFS fst stats2), with the same window centres across datasets (-type 0). For transects where only two out of three populations had any individuals (Colombia west for <italic>H. erato</italic> and Ecuador west for <italic>H. melpomene</italic> Fig. <xref rid="Fig1" ref-type="fig">1A</xref>), we computed pairwise Fst only. Finally, we normalized PBS and Fst window values with z-scores, i.e. number of standard deviations from the mean, so that divergence is comparable across transects.</p></sec><sec id="Sec16"><title>High Differentiation Region parallelism between replicates</title><p id="Par47">To measure genetic parallelisms in adaptation to the highlands, we quantified overlap of outlier windows and adjacent regions, i.e. high differentiation regions (HDR), across replicate and allopatric transects and species. We considered outlier windows to be those with values above 4 standard deviations from their mean (zPBS<sub>high</sub> &gt; 4, zFst &gt; 4; following<sup><xref ref-type="bibr" rid="CR51">51</xref></sup>). We then expanded outlier window positions 50 kb upstream and 50 kb downstream from the window centre (HDR) and checked for overlaps with other transects, either within or across sides of the Andes for each species, to highlight parallelism when visualizing patterns of genome-wide divergence. High-differentiation regions with any overlap with other transects are termed shared HDRs (SHDRs). To check for HDR overlaps between species, we mapped the <italic>H. melpomene</italic> windows (starts and end positions) to the <italic>H. erato</italic> reference genome using a chainfile<sup><xref ref-type="bibr" rid="CR64">64</xref></sup> and the liftover utility (Hinrichs, 2006).</p><p id="Par48">To test whether the level of parallelism observed between transects within and across sides of the Andes was higher than expected by chance, we used the R package <italic>intervals</italic><sup><xref ref-type="bibr" rid="CR110">110</xref></sup>. We first created outlier window intervals (HDRs), by obtaining the start and end positions of continuous blocks of outlier windows ( ± 50 kb buffers) with the function Intervals() (options Type=”Z”, closed). We obtained the observed proportion of total intervals that overlapped, at any of their positions, with outlier intervals in the other transect within sides of the Andes, or with outlier intervals in both, the other transect within the same side of the Andes and the two transects on the other side of the Andes (allopatric sharing). We then simulated 10,000 randomized distributions of outlier-window intervals across the genome per transect, per species (<italic>n</italic> = 8). In each simulation set, we randomly placed the same number of HDR intervals and of the same size as the observed outlier-window intervals for those transects. With these, we estimated the proportion of simulated intervals that overlapped with observed HDR outlier intervals within and across sides of the Andes, obtaining as a result a null distribution of interval overlap proportions. This approach does not account for the possibility that different parts of the genome may be more readily involved in local adaptation. Finally, to determine whether the level of overlap was significantly greater than expected by chance alone, we performed jackknife block resampling across the genome to estimate the 95% CI for the observed proportion of overlapping intervals and then assessed whether this interval included the expected value, which was computed as the mean of 10,000 random permutations described above.</p></sec><sec id="Sec17"><title>Measures of nucleotide diversity, selective sweeps, and recombination rate</title><p id="Par49">We studied genetic variation within and across populations by deriving three summary statistics from ANGSD thetas estimations<sup><xref ref-type="bibr" rid="CR103">103</xref></sup>, Tajima’s D, which estimates the deviation of a sequence from neutrality, nucleotide diversity (pi, or population mutation rate), and Dxy or absolute divergence, which calculates pairwise differences between sequences of two populations excluding differences between sequences within populations. ANGSD has been found to be an accurate estimator of nucleotide diversity because it includes invariant sites<sup><xref ref-type="bibr" rid="CR111">111</xref></sup>. Firstly, we obtained folded global site-frequency spectra for each population. Then we calculated pairwise nucleotide diversity per site (thetaD, realSFS saf2theta). Finally, we performed sliding window analysis of 5 kb window size and 1 kb steps (thetaStat do_stat) to obtain sum of pairwise differences, Tajima’s D, and total effective number of sites per window. Nucleotide diversity (pi) was obtained by dividing the sum of pairwise differences by the total number of sites per window. For all transects, we calculated the difference in nucleotide diversity per window between highland and lowland distant populations (or low populations if low distant individuals unavailable), which is expected to be negative if a selective sweep led to locally reduced diversity in highland populations. Absolute divergence (D<sub>xy</sub>,<sup><xref ref-type="bibr" rid="CR112">112</xref></sup>) between high (population A) and low/low distant (population B) populations was estimated by additionally obtaining pairwise nucleotide diversity per site (thetaD) for all individuals pooled from populations A and B (population AB), and then per-site D<sub>xy</sub> obtained with Eq. (<xref rid="Equ3" ref-type="disp-formula">3</xref>):<disp-formula id="Equ3"><label>3</label><alternatives><mml:math><mml:msub><mml:mrow><mml:mi>D</mml:mi><mml:mi>x</mml:mi><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:mi>s</mml:mi><mml:mi>i</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mi>t</mml:mi><mml:mi>h</mml:mi><mml:mi>e</mml:mi><mml:mi>t</mml:mi><mml:mi>a</mml:mi><mml:mi>A</mml:mi><mml:mi>B</mml:mi><mml:mo>×</mml:mo><mml:mfenced close=")" open="("><mml:mrow><mml:mfrac linethickness="0.0pt"><mml:mrow><mml:mi>n</mml:mi><mml:mi>A</mml:mi><mml:mi>B</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:mfrac></mml:mrow></mml:mfenced><mml:mo>−</mml:mo><mml:mspace width="0.25em"/><mml:mi>t</mml:mi><mml:mi>h</mml:mi><mml:mi>e</mml:mi><mml:mi>t</mml:mi><mml:mi>a</mml:mi><mml:mi>A</mml:mi><mml:mo>×</mml:mo><mml:mfenced close=")" open="("><mml:mrow><mml:mfrac linethickness="0.0pt"><mml:mrow><mml:mi>n</mml:mi><mml:mi>A</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:mfrac></mml:mrow></mml:mfenced><mml:mspace width="0.25em"/><mml:mo>−</mml:mo><mml:mspace width="0.25em"/><mml:mi>t</mml:mi><mml:mi>h</mml:mi><mml:mi>e</mml:mi><mml:mi>t</mml:mi><mml:mi>a</mml:mi><mml:mi>B</mml:mi><mml:mo>×</mml:mo><mml:mfenced close=")" open="("><mml:mrow><mml:mfrac linethickness="0.0pt"><mml:mrow><mml:mi>n</mml:mi><mml:mi>B</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:mfrac></mml:mrow></mml:mfenced></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mi>A</mml:mi><mml:mspace width="0.25em"/><mml:mo>×</mml:mo><mml:mspace width="0.25em"/><mml:mi>n</mml:mi><mml:mi>B</mml:mi></mml:mrow></mml:mfrac></mml:math><tex-math id="Equ3_TeX">\documentclass[12pt]{minimal}
				\usepackage{amsmath}
				\usepackage{wasysym}
				\usepackage{amsfonts}
				\usepackage{amssymb}
				\usepackage{amsbsy}
				\usepackage{mathrsfs}
				\usepackage{upgreek}
				\setlength{\oddsidemargin}{-69pt}
				\begin{document}$${{Dxy}}_{{site}}=\frac{{thetaAB}\times \left(\genfrac{}{}{0ex}{}{{nAB}}{2}\right)-\,{thetaA}\times \left(\genfrac{}{}{0ex}{}{{nA}}{2}\right)\,-\,{thetaB}\times \left(\genfrac{}{}{0ex}{}{{nB}}{2}\right)}{{nA}\,\times \,{nB}}$$\end{document}</tex-math><graphic position="anchor" xlink:href="41467_2022_32316_Article_Equ3.gif"/></alternatives></disp-formula></p><p id="Par50">With n being the number of individuals per population (A, B, or pooled AB) and thetaD obtained from realSFS saf2theta. Mean D<sub>xy</sub> was estimated for the same 5 kb windows with 1 kb steps. Finally, we obtained recombination rate for 50 kb windows along the genome from the mean population recombination rate (<italic>ρ</italic> = 4<italic>N</italic><sub>e</sub><italic>r</italic>; <italic>r</italic> = probability of recombination per generation per bp) estimated for 13 <italic>H. erato</italic> populations from across the range in a recent study<sup><xref ref-type="bibr" rid="CR113">113</xref></sup> and for 100 kb windows of four <italic>H. melpomene</italic> populations<sup><xref ref-type="bibr" rid="CR71">71</xref></sup>. Note that the <italic>H. erato</italic> genome is larger than <italic>H. melpomene</italic> (383 Mb and 275 Mb, respectively), hence the difference in window sizes.</p></sec><sec id="Sec18"><title>Testing for significance of selection statistics in SHDRs</title><p id="Par51">To test for positive selection we assessed Tajima’s D, difference in nucleotide diversity across elevations Δπ (π<sub>high</sub>− π<sub>low</sub>), and absolute divergence (D<sub>xy</sub>) within SHDRs and compared values to simulated distributions. We used the same permutation approach described for assessing HDR parallelism, by randomly placing the same number of intervals and of the same size as the observed HDRs for each transect 10000 times. We then obtained minimum Tajima’s D and Δπ and maximum D<sub>xy</sub> within each simulated SHDR and permutation, and only considered a SHDR to be an outlier for a given selection statistic if the observed maximum (Tajima’s D, Δπ) or minimum (D<sub>xy</sub>) value was above the 90th or below the 10th percentile of simulated values. Number of outlier selection statistics per SHDR was tallied and compared across replicate or allopatric sharing in each species.</p></sec><sec id="Sec19"><title>Global and local PCAs</title><p id="Par52">To assess neutral genetic variation between individuals and populations, we performed principal component analysis (PCA) in the eastern and western transects separately for each species, i.e., two transects per PCA (Fig. <xref rid="Fig1" ref-type="fig">1A</xref>). We first obtained a random subsample of 10% of windows that did not have high differentiation across populations, i.e., with zPBS/zFst &lt; 4, and then pruned for linked sites by only retaining 1 site for every 10 kb, yielding 14995 and 8293 sites for <italic>H. erato</italic> and <italic>H. melpomene</italic>, respectively. We used the program ANGSD (v 0.933<sup><xref ref-type="bibr" rid="CR103">103</xref></sup>) to obtain genotype likelihoods in beagle format (-doGlf 2) for all individuals. In <italic>H. erato</italic>, we excluded chromosome 2 as it contains a large inversion which could distort the neutral differentiation landscape. Genotype likelihoods were used as input for PCAngsd<sup><xref ref-type="bibr" rid="CR114">114</xref></sup>, which incorporates genotype uncertainty from genotype likelihoods to obtain a covariance matrix across all individuals.</p><p id="Par53">To assess whether the same haplotypes were involved in adaptation to altitude across replicate transects (within sides of the Andes), we performed local PCAs with outlier windows (zPBS/zFst &gt; 4, i.e. &gt;4 standard deviations from the mean) of each SHDR (total = 370 local PCAs). All individuals from replicate transects were included, leading to local PCAs for all Western and Eastern SHDRs of each species that included Colombia and Ecuador samples. We obtained genotype likelihoods in beagle format (-doGlf 2) as input for PCAngsd, similarly to the population structure analysis. We then assessed whether altitude was a significant predictor of individual clustering in each SHDR by building a linear model where local PCA PC1 was the response variable, and altitude and global (genome wide) PCA PC1 the predictors, to account for population structure. We considered that individuals in each replicate transect had the same haplotypes in SHDRs if altitude was a significant predictor of local PCA PC1, while controlling for global PC1 (Fig. <xref rid="Fig5" ref-type="fig">5</xref>). We additionally obtained the overall variation explained by the fitted linear models (R<sup>2</sup>) for each SHDR local PCA and the relative contributions of each explanatory variable (altitude and global PCA PC1, partial R<sup>2</sup>), estimated with the package <italic>relaimpo</italic><sup><xref ref-type="bibr" rid="CR115">115</xref></sup>.</p></sec><sec id="Sec20"><title>Measures of excess allele sharing</title><p id="Par54">We used <italic>ABBA-BABA</italic>-related statistics to examine patterns of allele sharing between closely or distantly related high-altitude species and our study <italic>H. erato</italic> and <italic>H. melpomene</italic> populations. These statistics test for an excess of shared derived variation between lineages to distinguish gene flow or ancestral population structure from the incomplete lineage sorting (ILS) that can occur during a simple tree-like branching process. To examine genome-wide patterns of excess allele sharing between populations and species, we obtained F branch statistics implemented with the package <italic>Dsuite</italic><sup><xref ref-type="bibr" rid="CR86">86</xref></sup>. Fbranch summarises and visualises patterns of excess allele sharing across phylogenetic datasets. We performed linkage-pruning to obtain a genome-wide average of excess allele sharing. Using a custom script (<ext-link xlink:href="https://github.com/joanam/scripts/blob/master/ldPruning.sh" ext-link-type="url">https://github.com/joanam/scripts/blob/master/ldPruning.sh</ext-link>) we removed sites above an LD-threshold of R<sup>2</sup> &gt; 0.1 with plink v. 1.07<sup><xref ref-type="bibr" rid="CR116">116</xref></sup>. To reconstruct the backbone phylogeny for excess allele sharing tests, we extracted for each population or species the individual with highest sequencing depth from the vcf file using vcftools v. 0.1.15<sup><xref ref-type="bibr" rid="CR105">105</xref></sup>. The vcf file was then converted to phylip with a custom script (<ext-link xlink:href="https://github.com/joanam/scripts/blob/master/vcf2phylip.py" ext-link-type="url">https://github.com/joanam/scripts/blob/master/vcf2phylip.py</ext-link>). We reconstructed the phylogeny of the melpomene and erato clade separately with RAxML v. 8.2.9 using the GTRGAMMA model<sup><xref ref-type="bibr" rid="CR117">117</xref></sup>. Using this backbone tree, we used the LD-pruned vcf files of all melpomene/erato clade individuals to computed f statistics (tests of excess allele sharing) across all possible sets of three populations or species with Dsuite Dtrios. Next, we summarized these statistics with Dsuite Fbranch<sup><xref ref-type="bibr" rid="CR118">118</xref></sup>. The extent of gene flow in the eastern Andes between <italic>H. melpomene</italic> and <italic>H. timareta</italic> can skew genome-wide trees. Thus, to assess the levels of gene flow, we constrained the <italic>H. melpomene</italic> clade to be monophyletic following the species tree. In order to remove spurious signatures of excess allele sharing that are not significant, we set Fbranch values to 0 if the z-score was greater than 3 with a custom script (<ext-link xlink:href="https://github.com/joanam/scripts/blob/master/removeNonsignDsuite.r" ext-link-type="url">https://github.com/joanam/scripts/blob/master/removeNonsignDsuite.r</ext-link>). Lastly, we plotted the Fbranch statistics along the phylogeny with dtools.py of the Dsuite package.</p><p id="Par55">To test for adaptive introgression from high-altitude specialist species into <italic>H. erato</italic> and <italic>H. melpomene</italic> highland populations, we computed <italic>f</italic><sub>dM</sub>, a statistic of excess allele sharing suitable for small genomic regions. This test is based on a set of four populations, including two sister taxa (P1 &amp; P2), a close relative (P3) that may have admixed with one of these sister taxa and an outgroup (O). Here, the sister taxa represent the <italic>H. erato</italic> or <italic>H. melpomene</italic> lowland (P1) and highland populations (P2), whereas P3 represents a highland specialist species that may have contributed beneficial gene variants to the <italic>H. erato</italic> and <italic>H. melpomene</italic> highland populations. f<sub>dM</sub> quantifies gene flow between P3 and P2 or between P3 and P1. In addition, we ran these tests with the allopatric erato/melpomene populations as P3, to test if at SHDRs, the same haplotypes are found in high-altitude populations on both sides of the Andes, potentially due to parallel selection on the same haplotypes. We estimated f<sub>dM</sub> for non-overlapping 50 kb windows across the genome with the ABBABABAwindows.py script by (Martin et al. 2014) from <ext-link xlink:href="https://github.com/simonhmartin/genomics_general" ext-link-type="url">https://github.com/simonhmartin/genomics_general</ext-link>. We considered individual SHDRs as f<sub>dM</sub> outliers if their observed maximum f<sub>dM</sub> value was &gt; 90th percentile of the absolute minimum f<sub>dM</sub> values across all SHDRs. Additionally, we tested for overall enrichment of excess allele sharing between P3 and P2 (i.e., with the highlands) across all SHDRs, by testing with a two-sample Kolmogorov-Smirnov tests if the distribution of maximum f<sub>dM</sub> values across all SHDRs (i.e., allele sharing with the highlands, P2) was significantly higher than the absolute minimum f<sub>dM</sub> values across all SHDRs (i.e. allele sharing with the lowlands, P1). This was repeated for each Colombia/Ecuadorian clines with their respective potential donors (P3).</p></sec></sec><sec id="Sec21"><title>Reporting summary</title><p id="Par56">Further information on research design is available in the <xref ref-type="supplementary-material" rid="MOESM4">Nature Research Reporting Summary</xref> linked to this article.</p></sec></sec></body><back><ack><title>Acknowledgements</title><p>We are grateful to all the field assistants who have collected samples for this study, Narupa Reserve (Jocotoco Foundation, Ecuador), Jatun Satcha Reserve (Ecuador), and Universidad Regional Amazónica Ikiam for their support. We thank Steven van Belleghem for sharing recombination rates data for <italic>H. erato</italic>, and Emma Curran and Juan Enciso for providing some of the genomic sequences, and the Butterfly Genetics Lab (Cambridge) for helpful feedback. We thank the McGuire Center for Lepidoptera and Biodiversity, Florida Museum of Natural History, University of Florida, for providing access to their butterfly collection for photographing to C.D.J. (Figs. <xref rid="Fig2" ref-type="fig">2</xref>, <xref rid="Fig6" ref-type="fig">6</xref>). G.M.-K. was supported by a Natural Environment Research Council Doctoral Training Partnership (NE/L002507/1). This work, N.J.N. and C.D.J. were supported by the Natural Environment Research Council (grant number: NE/R010331/1) and by a European Research Council Grant (339873) to C.D.J. Some of the sequence data was generated under a NERC fellowship (NE/K008498/1) to N.J.N. Funding was provided to C.N.B. by the Spanish Agency for International Development Cooperation (AECID, grant number 2018SPE0000400194). C.S and N.R. were funded by Fondos Concursables Big - grant IV-FGD005/ IV-FGI006 Universidad del Rosario. SHM was supported by a NERC IRF (NE/N014936/1). Y.F.C. was supported by the European Research Council Starting Grant 639096 “HybridMiX” and the Max Planck Society. Smithsonian Institution Scholarly Studies Award to K.M.K. and W.O.M. Open access funding provided by the University of Cambridge.</p></ack><sec sec-type="author-contribution"><title>Author contributions</title><p>G.M-K, C.D.J., S.H.M., J.I.M., N.J.N. contributed to the design of the study. G.M.-K., C.N.B., C.S., N.R., S.H.M., W.O.M., K.M.K., N.J.N., S.H.M., C.D.J., collected butterflies and obtained permits. G.M.-K., J.I.M., I.A.W., Y.F.C., M.K., K.M.K., performed DNA extractions and library preparation. G.M-K, J.I.M., S.H.M., performed the analyses with input from C.D.J., N.J.N., Y.F.C. G.M.-K. wrote the first draft of the manuscript, and all authors revised it and approved the final version manuscript.</p></sec><sec sec-type="peer-review"><title>Peer review</title><sec id="FPar1"><title>Peer review information</title><p id="Par57"><italic>Nature Communications</italic> thanks Bohao Fang and the other, anonymous, reviewer(s) for their contribution to the peer review of this work.</p></sec></sec><sec sec-type="data-availability"><title>Data availability</title><p>The sequence data generated in this study have been deposited in the European Nucleotide Archive database under accession code <ext-link xlink:href="https://www.ebi.ac.uk/ena/browser/view/PRJEB35570?show=reads" ext-link-type="url">PRJEB35570</ext-link> or elsewhere on ENA if obtained from previous studies, as specified in Supplementary Data <xref ref-type="supplementary-material" rid="MOESM3">1</xref> for each individual. Reference genomes for <italic>H. erato</italic> and <italic>H. melpomene</italic> were taken from Lepbase v. 4<sup><xref ref-type="bibr" rid="CR98">98</xref></sup> (<italic>H. erato demophoon</italic><sup><xref ref-type="bibr" rid="CR58">58</xref></sup> and <italic>H. melpomene</italic> version 2.5<sup><xref ref-type="bibr" rid="CR99">99</xref></sup>, respectively). Source data are provided with this paper in the Source Data file and in the relevant public repository published in Zenodo (<ext-link xlink:href="https://doi.org/10.5281/zenodo.6836103" ext-link-type="doi">https://doi.org/10.5281/zenodo.6836103</ext-link>)<sup><xref ref-type="bibr" rid="CR119">119</xref></sup>. All records associated to the individuals used for this study are available in the <italic>Heliconius</italic> Earthcape database (<ext-link xlink:href="https://heliconius.ecdb.io/" ext-link-type="url">https://heliconius.ecdb.io/</ext-link><sup><xref ref-type="bibr" rid="CR106">106</xref></sup>). <xref rid="Sec23" ref-type="sec">Source data</xref> are provided with this paper.</p></sec><sec sec-type="data-availability"><title>Code availability</title><p>Scripts and pipelines have been made available in the public repository Zenodo (<ext-link xlink:href="https://doi.org/10.5281/zenodo.6836103" ext-link-type="doi">https://doi.org/10.5281/zenodo.6836103</ext-link>)<sup><xref ref-type="bibr" rid="CR119">119</xref></sup>.</p></sec><sec sec-type="ethics-statement"><sec id="FPar2" sec-type="COI-statement"><title>Competing interests</title><p id="Par58">The authors declare no competing interests.</p></sec></sec><ref-list id="Bib1"><title>References</title><ref-list><ref id="CR1"><label>1.</label><mixed-citation publication-type="other">Booker, T. R., Yeaman, S. &amp; Whitlock, M. C. Global adaptation complicates the interpretation of genome scans for local adaptation. <italic>Evol. Lett</italic>. <ext-link xlink:href="https://doi.org/10.1002/evl3.208" ext-link-type="doi">https://doi.org/10.1002/evl3.208</ext-link> (2020).</mixed-citation></ref><ref id="CR2"><label>2.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Stern</surname><given-names>DL</given-names></name></person-group><article-title xml:lang="en">The genetic causes of convergent evolution</article-title><source>Nat. Rev. Genet.</source><year>2013</year><volume>14</volume><fpage>751</fpage><lpage>764</lpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BC3sXhsFOlurbI</pub-id><pub-id pub-id-type="pmid">24105273</pub-id><pub-id pub-id-type="doi">10.1038/nrg3483</pub-id></mixed-citation></ref><ref id="CR3"><label>3.</label><mixed-citation publication-type="other">Bohutínská, M. et al. Genomic basis of parallel adaptation varies with divergence in Arabidopsis and its relatives. <italic>Proc. Natl. Acad. Sci</italic>. <bold>118</bold>, e2022713118 (2021).</mixed-citation></ref><ref id="CR4"><label>4.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Conte</surname><given-names>GL</given-names></name><name><surname>Arnegard</surname><given-names>ME</given-names></name><name><surname>Peichel</surname><given-names>CL</given-names></name><name><surname>Schluter</surname><given-names>D</given-names></name></person-group><article-title xml:lang="en">The probability of genetic parallelism and convergence in natural populations</article-title><source>Proc. R. Soc. B Biol. Sci.</source><year>2012</year><volume>279</volume><fpage>5039</fpage><lpage>5047</lpage><pub-id pub-id-type="doi">10.1098/rspb.2012.2146</pub-id></mixed-citation></ref><ref id="CR5"><label>5.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Martin</surname><given-names>A</given-names></name><name><surname>Orgogozo</surname><given-names>V</given-names></name></person-group><article-title xml:lang="en">The loci of repeated evolution: A catalog of genetic hotspots of phenotypic variation</article-title><source>Evolution</source><year>2013</year><volume>67</volume><fpage>1235</fpage><lpage>1250</lpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BC3sXosFWntbc%3D</pub-id><pub-id pub-id-type="pmid">23617905</pub-id></mixed-citation></ref><ref id="CR6"><label>6.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Besnard</surname><given-names>G</given-names></name><etal/></person-group><article-title xml:lang="en">Phylogenomics of C4 photosynthesis in sedges (Cyperaceae): Multiple appearances and genetic convergence</article-title><source>Mol. Biol. Evol.</source><year>2009</year><volume>26</volume><fpage>1909</fpage><lpage>1919</lpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BD1MXovVeqtb8%3D</pub-id><pub-id pub-id-type="pmid">19461115</pub-id><pub-id pub-id-type="doi">10.1093/molbev/msp103</pub-id></mixed-citation></ref><ref id="CR7"><label>7.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Louis</surname><given-names>M</given-names></name><etal/></person-group><article-title xml:lang="en">Selection on ancestral genetic variation fuels repeated ecotype formation in bottlenose dolphins</article-title><source>Sci. Adv.</source><year>2021</year><volume>7</volume><fpage>eabg1245</fpage><pub-id pub-id-type="bibcode">2021SciA....7.1245L</pub-id><pub-id pub-id-type="pmid">34705499</pub-id><pub-id pub-id-type="pmcid">8550227</pub-id><pub-id pub-id-type="doi">10.1126/sciadv.abg1245</pub-id></mixed-citation></ref><ref id="CR8"><label>8.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Wang</surname><given-names>L</given-names></name><etal/></person-group><article-title xml:lang="en">Molecular parallelism underlies convergent highland adaptation of maize landraces</article-title><source>Mol. Biol. Evol.</source><year>2021</year><volume>38</volume><fpage>3567</fpage><lpage>3580</lpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BB38XhslKjs77K</pub-id><pub-id pub-id-type="pmid">33905497</pub-id><pub-id pub-id-type="pmcid">8382895</pub-id><pub-id pub-id-type="doi">10.1093/molbev/msab119</pub-id></mixed-citation></ref><ref id="CR9"><label>9.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Calfee</surname><given-names>E</given-names></name><name><surname>Agra</surname><given-names>MN</given-names></name><name><surname>Palacio</surname><given-names>MA</given-names></name><name><surname>Ramírez</surname><given-names>SR</given-names></name><name><surname>Coop</surname><given-names>G</given-names></name></person-group><article-title xml:lang="en">Selection and hybridization shaped the rapid spread of African honey bee ancestry in the Americas</article-title><source>PLOS Genet.</source><year>2020</year><volume>16</volume><fpage>e1009038</fpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BB3cXit1ajt7rK</pub-id><pub-id pub-id-type="pmid">33075065</pub-id><pub-id pub-id-type="pmcid">7595643</pub-id><pub-id pub-id-type="doi">10.1371/journal.pgen.1009038</pub-id></mixed-citation></ref><ref id="CR10"><label>10.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Jones</surname><given-names>MR</given-names></name><etal/></person-group><article-title xml:lang="en">Adaptive introgression underlies polymorphic seasonal camouflage in snowshoe hares</article-title><source>Science</source><year>2018</year><volume>360</volume><fpage>1355</fpage><lpage>1358</lpage><pub-id pub-id-type="bibcode">2018Sci...360.1355J</pub-id><pub-id pub-id-type="coi">1:CAS:528:DC%2BC1cXhtFGlsLjN</pub-id><pub-id pub-id-type="pmid">29930138</pub-id><pub-id pub-id-type="doi">10.1126/science.aar5273</pub-id></mixed-citation></ref><ref id="CR11"><label>11.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Meier</surname><given-names>JI</given-names></name><etal/></person-group><article-title xml:lang="en">Ancient hybridization fuels rapid cichlid fish adaptive radiations</article-title><source>Nat. Commun.</source><year>2017</year><volume>8</volume><pub-id pub-id-type="bibcode">2017NatCo...814363M</pub-id><pub-id pub-id-type="coi">1:CAS:528:DC%2BC2sXisVyqtbY%3D</pub-id><pub-id pub-id-type="pmid">28186104</pub-id><pub-id pub-id-type="pmcid">5309898</pub-id><pub-id pub-id-type="doi">10.1038/ncomms14363</pub-id></mixed-citation></ref><ref id="CR12"><label>12.</label><mixed-citation publication-type="other">Zhang, X. et al. The history and evolution of the Denisovan-EPAS1 haplotype in Tibetans. <italic>Proc. Natl. Acad. Sci</italic>. <bold>118</bold>, (2021).</mixed-citation></ref><ref id="CR13"><label>13.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Jones</surname><given-names>FC</given-names></name><etal/></person-group><article-title xml:lang="en">The genomic basis of adaptive evolution in threespine sticklebacks</article-title><source>Nature</source><year>2012</year><volume>484</volume><fpage>55</fpage><lpage>61</lpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BC38XmtVCis7o%3D</pub-id><pub-id pub-id-type="pmid">22481358</pub-id><pub-id pub-id-type="pmcid">3322419</pub-id><pub-id pub-id-type="doi">10.1038/nature10944</pub-id></mixed-citation></ref><ref id="CR14"><label>14.</label><mixed-citation publication-type="other">Wooldridge, T.B. et al. An enhancer of Agouti contributes to parallel evolution of cryptically colored beach mice. <italic>Proc. Natl. Acad. Sci. USA</italic><bold>119</bold>, e2202862119 (2022).</mixed-citation></ref><ref id="CR15"><label>15.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Oziolor</surname><given-names>EM</given-names></name><etal/></person-group><article-title xml:lang="en">Adaptive introgression enables evolutionary rescue from extreme environmental pollution</article-title><source>Science</source><year>2019</year><volume>364</volume><fpage>455</fpage><lpage>457</lpage><pub-id pub-id-type="bibcode">2019Sci...364..455O</pub-id><pub-id pub-id-type="coi">1:CAS:528:DC%2BC1MXoslyisLg%3D</pub-id><pub-id pub-id-type="pmid">31048485</pub-id><pub-id pub-id-type="doi">10.1126/science.aav4155</pub-id></mixed-citation></ref><ref id="CR16"><label>16.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Valencia-Montoya</surname><given-names>WA</given-names></name><etal/></person-group><article-title xml:lang="en">Adaptive introgression across semipermeable species boundaries between local Helicoverpa zea and invasive Helicoverpa armigera moths</article-title><source>Mol. Biol. Evol.</source><year>2020</year><volume>37</volume><fpage>2568</fpage><lpage>2583</lpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BB3cXis1egsLzE</pub-id><pub-id pub-id-type="pmid">32348505</pub-id><pub-id pub-id-type="pmcid">7475041</pub-id><pub-id pub-id-type="doi">10.1093/molbev/msaa108</pub-id></mixed-citation></ref><ref id="CR17"><label>17.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Nogués-Bravo</surname><given-names>D</given-names></name><etal/></person-group><article-title xml:lang="en">Cracking the code of biodiversity responses to past climate change</article-title><source>Trends Ecol. Evol.</source><year>2018</year><volume>33</volume><fpage>765</fpage><lpage>776</lpage><pub-id pub-id-type="pmid">30173951</pub-id><pub-id pub-id-type="doi">10.1016/j.tree.2018.07.005</pub-id></mixed-citation></ref><ref id="CR18"><label>18.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Ding</surname><given-names>D</given-names></name><etal/></person-group><article-title xml:lang="en">Genetic variation in PTPN1 contributes to metabolic adaptation to high-altitude hypoxia in Tibetan migratory locusts</article-title><source>Nat. Commun.</source><year>2018</year><volume>9</volume><pub-id pub-id-type="bibcode">2018NatCo...9.4991D</pub-id><pub-id pub-id-type="pmid">30478313</pub-id><pub-id pub-id-type="pmcid">6255802</pub-id><pub-id pub-id-type="doi">10.1038/s41467-018-07529-8</pub-id><pub-id pub-id-type="coi">1:CAS:528:DC%2BC1cXitlKjsrfJ</pub-id></mixed-citation></ref><ref id="CR19"><label>19.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Zhang</surname><given-names>Q-L</given-names></name><etal/></person-group><article-title xml:lang="en">Comparative transcriptomic analysis of Tibetan Gynaephora to explore the genetic basis of insect adaptation to divergent altitude environments</article-title><source>Sci. Rep.</source><year>2017</year><volume>7</volume><pub-id pub-id-type="bibcode">2017NatSR...716972Z</pub-id><pub-id pub-id-type="pmid">29208990</pub-id><pub-id pub-id-type="pmcid">5717227</pub-id><pub-id pub-id-type="doi">10.1038/s41598-017-17051-4</pub-id><pub-id pub-id-type="coi">1:CAS:528:DC%2BC1cXhsFehu7rL</pub-id></mixed-citation></ref><ref id="CR20"><label>20.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Mayhew</surname><given-names>PJ</given-names></name></person-group><article-title xml:lang="en">Why are there so many insect species? Perspectives from fossils and phylogenies</article-title><source>Biol. Rev.</source><year>2007</year><volume>82</volume><fpage>425</fpage><lpage>454</lpage><pub-id pub-id-type="pmid">17624962</pub-id><pub-id pub-id-type="doi">10.1111/j.1469-185X.2007.00018.x</pub-id></mixed-citation></ref><ref id="CR21"><label>21.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Yeaman</surname><given-names>S</given-names></name><name><surname>Gerstein</surname><given-names>AC</given-names></name><name><surname>Hodgins</surname><given-names>KA</given-names></name><name><surname>Whitlock</surname><given-names>MC</given-names></name></person-group><article-title xml:lang="en">Quantifying how constraints limit the diversity of viable routes to adaptation</article-title><source>PLOS Genet.</source><year>2018</year><volume>14</volume><fpage>e1007717</fpage><pub-id pub-id-type="pmid">30296265</pub-id><pub-id pub-id-type="pmcid">6193742</pub-id><pub-id pub-id-type="doi">10.1371/journal.pgen.1007717</pub-id><pub-id pub-id-type="coi">1:CAS:528:DC%2BC1MXivFagu74%3D</pub-id></mixed-citation></ref><ref id="CR22"><label>22.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Gross</surname><given-names>JB</given-names></name><name><surname>Borowsky</surname><given-names>R</given-names></name><name><surname>Tabin</surname><given-names>CJ</given-names></name></person-group><article-title xml:lang="en">A Novel Role for Mc1r in the parallel evolution of depigmentation in independent populations of the cavefish astyanax mexicanus</article-title><source>PLoS Genet.</source><year>2009</year><volume>5</volume><fpage>e1000326</fpage><pub-id pub-id-type="pmid">19119422</pub-id><pub-id pub-id-type="pmcid">2603666</pub-id><pub-id pub-id-type="doi">10.1371/journal.pgen.1000326</pub-id><pub-id pub-id-type="coi">1:CAS:528:DC%2BD1MXisFygtr4%3D</pub-id></mixed-citation></ref><ref id="CR23"><label>23.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Harris</surname><given-names>RB</given-names></name><etal/></person-group><article-title xml:lang="en">The population genetics of crypsis in vertebrates: recent insights from mice, hares, and lizards</article-title><source>Heredity</source><year>2020</year><volume>124</volume><fpage>1</fpage><lpage>14</lpage><pub-id pub-id-type="pmid">31399719</pub-id><pub-id pub-id-type="doi">10.1038/s41437-019-0257-4</pub-id></mixed-citation></ref><ref id="CR24"><label>24.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Mundy</surname><given-names>NI</given-names></name></person-group><article-title xml:lang="en">A window on the genetics of evolution: MC1R and plumage colouration in birds</article-title><source>Proc. R. Soc. Lond. B Biol. Sci.</source><year>2005</year><volume>272</volume><fpage>1633</fpage><lpage>1640</lpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BD2MXhtFSnsbvF</pub-id></mixed-citation></ref><ref id="CR25"><label>25.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Orteu</surname><given-names>A</given-names></name><name><surname>Jiggins</surname><given-names>CD</given-names></name></person-group><article-title xml:lang="en">The genomics of coloration provides insights into adaptive evolution</article-title><source>Nat. Rev. Genet.</source><year>2020</year><volume>21</volume><fpage>461</fpage><lpage>475</lpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BB3cXovVOrtb0%3D</pub-id><pub-id pub-id-type="pmid">32382123</pub-id><pub-id pub-id-type="doi">10.1038/s41576-020-0234-z</pub-id></mixed-citation></ref><ref id="CR26"><label>26.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Castro</surname><given-names>JP</given-names></name><etal/></person-group><article-title xml:lang="en">An integrative genomic analysis of the Longshanks selection experiment for longer limbs in mice</article-title><source>eLife</source><year>2019</year><volume>8</volume><fpage>e42014</fpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BB3cXhtFyjtrjM</pub-id><pub-id pub-id-type="pmid">31169497</pub-id><pub-id pub-id-type="pmcid">6606024</pub-id><pub-id pub-id-type="doi">10.7554/eLife.42014</pub-id></mixed-citation></ref><ref id="CR27"><label>27.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Orr</surname><given-names>HA</given-names></name></person-group><article-title xml:lang="en">The probability of parallel evolution</article-title><source>Evolution</source><year>2005</year><volume>59</volume><fpage>216</fpage><lpage>220</lpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BD2MXhvFKru7o%3D</pub-id><pub-id pub-id-type="pmid">15792240</pub-id><pub-id pub-id-type="doi">10.1111/j.0014-3820.2005.tb00907.x</pub-id></mixed-citation></ref><ref id="CR28"><label>28.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Barghi</surname><given-names>N</given-names></name><name><surname>Hermisson</surname><given-names>J</given-names></name><name><surname>Schlötterer</surname><given-names>C</given-names></name></person-group><article-title xml:lang="en">Polygenic adaptation: a unifying framework to understand positive selection</article-title><source>Nat. Rev. Genet.</source><year>2020</year><volume>21</volume><fpage>769</fpage><lpage>781</lpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BB3cXht1yjtLbM</pub-id><pub-id pub-id-type="pmid">32601318</pub-id><pub-id pub-id-type="doi">10.1038/s41576-020-0250-z</pub-id></mixed-citation></ref><ref id="CR29"><label>29.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Hancock</surname><given-names>AM</given-names></name><name><surname>Alkorta-Aranburu</surname><given-names>G</given-names></name><name><surname>Witonsky</surname><given-names>DB</given-names></name><name><surname>Di Rienzo</surname><given-names>A</given-names></name></person-group><article-title xml:lang="en">Adaptations to new environments in humans: the role of subtle allele frequency shifts</article-title><source>Philos. Trans. R. Soc. B Biol. Sci.</source><year>2010</year><volume>365</volume><fpage>2459</fpage><lpage>2468</lpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BC3cXhtV2ns7vJ</pub-id><pub-id pub-id-type="doi">10.1098/rstb.2010.0032</pub-id></mixed-citation></ref><ref id="CR30"><label>30.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Capblancq</surname><given-names>T</given-names></name><name><surname>Fitzpatrick</surname><given-names>MC</given-names></name><name><surname>Bay</surname><given-names>RA</given-names></name><name><surname>Exposito-Alonso</surname><given-names>M</given-names></name><name><surname>Keller</surname><given-names>SR</given-names></name></person-group><article-title xml:lang="en">Genomic prediction of (mal) adaptation across current and future climatic landscapes</article-title><source>Annu. Rev. Ecol. Evol. Syst.</source><year>2020</year><volume>51</volume><fpage>245</fpage><lpage>269</lpage><pub-id pub-id-type="doi">10.1146/annurev-ecolsys-020720-042553</pub-id></mixed-citation></ref><ref id="CR31"><label>31.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Rosser</surname><given-names>N</given-names></name><name><surname>Phillimore</surname><given-names>AB</given-names></name><name><surname>Huertas</surname><given-names>B</given-names></name><name><surname>Willmott</surname><given-names>KR</given-names></name><name><surname>Mallet</surname><given-names>J</given-names></name></person-group><article-title xml:lang="en">Testing historical explanations for gradients in species richness in heliconiine butterflies of tropical America</article-title><source>Biol. J. Linn. Soc.</source><year>2012</year><volume>105</volume><fpage>479</fpage><lpage>497</lpage><pub-id pub-id-type="doi">10.1111/j.1095-8312.2011.01814.x</pub-id></mixed-citation></ref><ref id="CR32"><label>32.</label><mixed-citation publication-type="other">Rueda-M, N., Salgado-Roa, F. C., Gantiva-Q, C., Pardo-Diaz, C. &amp; Salazar, C. Environmental drivers of diversification and hybridization in Neotropical butterflies. <italic>Front. Ecol. Evol</italic>. <bold>746</bold>, (2021).</mixed-citation></ref><ref id="CR33"><label>33.</label><mixed-citation publication-type="other">Montejo-Kovacevich, G. et al. Microclimate buffering and thermal tolerance across elevations in a tropical butterfly. <italic>J. Exp. Biol</italic>. <bold>223</bold>, (2020).</mixed-citation></ref><ref id="CR34"><label>34.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Montejo‐Kovacevich</surname><given-names>G</given-names></name><etal/></person-group><article-title xml:lang="en">Altitude and life-history shape the evolution of Heliconius wings</article-title><source>Evolution</source><year>2019</year><volume>73</volume><fpage>2436</fpage><lpage>2450</lpage><pub-id pub-id-type="pmid">31631338</pub-id><pub-id pub-id-type="pmcid">6916360</pub-id><pub-id pub-id-type="doi">10.1111/evo.13865</pub-id></mixed-citation></ref><ref id="CR35"><label>35.</label><mixed-citation publication-type="other">Montejo-Kovacevich, G. et al. Genomics of altitude-associated wing shape in two tropical butterflies. <italic>Mol. Ecol</italic>. <bold>0</bold>, (2021).</mixed-citation></ref><ref id="CR36"><label>36.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Moest</surname><given-names>M</given-names></name><etal/></person-group><article-title xml:lang="en">Selective sweeps on novel and introgressed variation shape mimicry loci in a butterfly adaptive radiation</article-title><source>PLOS Biol.</source><year>2020</year><volume>18</volume><fpage>e3000597</fpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BB3cXptFWrtLc%3D</pub-id><pub-id pub-id-type="pmid">32027643</pub-id><pub-id pub-id-type="pmcid">7029882</pub-id><pub-id pub-id-type="doi">10.1371/journal.pbio.3000597</pub-id></mixed-citation></ref><ref id="CR37"><label>37.</label><mixed-citation publication-type="other">Van Belleghem, S. M. et al. Selection and isolation define a heterogeneous divergence landscape between hybridizing Heliconius butterflies. <italic>Evolution</italic> (2021).</mixed-citation></ref><ref id="CR38"><label>38.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Kozak</surname><given-names>KM</given-names></name><etal/></person-group><article-title xml:lang="en">Multilocus species trees show the recent adaptive radiation of the mimetic heliconius butterflies</article-title><source>Syst. Biol.</source><year>2015</year><volume>64</volume><fpage>505</fpage><lpage>524</lpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BC2sXnvFSisbc%3D</pub-id><pub-id pub-id-type="pmid">25634098</pub-id><pub-id pub-id-type="pmcid">4395847</pub-id><pub-id pub-id-type="doi">10.1093/sysbio/syv007</pub-id></mixed-citation></ref><ref id="CR39"><label>39.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Bradburd</surname><given-names>GS</given-names></name><name><surname>Ralph</surname><given-names>PL</given-names></name><name><surname>Coop</surname><given-names>GM</given-names></name></person-group><article-title xml:lang="en">Disentangling the effects of geographic and ecological isolation on genetic differentiation</article-title><source>Evolution</source><year>2013</year><volume>67</volume><fpage>3258</fpage><lpage>3273</lpage><pub-id pub-id-type="pmid">24102455</pub-id><pub-id pub-id-type="doi">10.1111/evo.12193</pub-id></mixed-citation></ref><ref id="CR40"><label>40.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Wang</surname><given-names>IJ</given-names></name><name><surname>Bradburd</surname><given-names>GS</given-names></name></person-group><article-title xml:lang="en">Isolation by environment</article-title><source>Mol. Ecol.</source><year>2014</year><volume>23</volume><fpage>5649</fpage><lpage>5662</lpage><pub-id pub-id-type="pmid">25256562</pub-id><pub-id pub-id-type="doi">10.1111/mec.12938</pub-id></mixed-citation></ref><ref id="CR41"><label>41.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>González-Martínez</surname><given-names>SC</given-names></name><name><surname>Ridout</surname><given-names>K</given-names></name><name><surname>Pannell</surname><given-names>JR</given-names></name></person-group><article-title xml:lang="en">Range Expansion Compromises Adaptive Evolution in an Outcrossing Plant</article-title><source>Curr. Biol.</source><year>2017</year><volume>27</volume><fpage>2544</fpage><lpage>2551.e4</lpage><pub-id pub-id-type="pmid">28803874</pub-id><pub-id pub-id-type="doi">10.1016/j.cub.2017.07.007</pub-id><pub-id pub-id-type="coi">1:CAS:528:DC%2BC2sXhtlarsb3J</pub-id></mixed-citation></ref><ref id="CR42"><label>42.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Hämälä</surname><given-names>T</given-names></name><name><surname>Savolainen</surname><given-names>O</given-names></name></person-group><article-title xml:lang="en">Genomic Patterns of Local Adaptation under Gene Flow in Arabidopsis lyrata</article-title><source>Mol. Biol. Evol.</source><year>2019</year><volume>36</volume><fpage>2557</fpage><lpage>2571</lpage><pub-id pub-id-type="doi">10.1093/molbev/msz149</pub-id><pub-id pub-id-type="coi">1:CAS:528:DC%2BB3cXhtFCiu7jJ</pub-id></mixed-citation></ref><ref id="CR43"><label>43.</label><mixed-citation publication-type="other">Jasper, R. J. &amp; Yeaman, S. <italic>Local adaptation can cause both peaks and troughs in nucleotide diversity within populations</italic>. <ext-link xlink:href="http://biorxiv.org/lookup/doi/10.1101/2020.06.03.132662" ext-link-type="url">http://biorxiv.org/lookup/doi/10.1101/2020.06.03.132662</ext-link>. <ext-link xlink:href="https://doi.org/10.1101/2020.06.03.132662" ext-link-type="doi">https://doi.org/10.1101/2020.06.03.132662</ext-link> (2020).</mixed-citation></ref><ref id="CR44"><label>44.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Yi</surname><given-names>X</given-names></name><etal/></person-group><article-title xml:lang="en">Sequencing of 50 Human Exomes Reveals Adaptation to High Altitude</article-title><source>Science</source><year>2010</year><volume>329</volume><fpage>75</fpage><lpage>78</lpage><pub-id pub-id-type="bibcode">2010Sci...329...75Y</pub-id><pub-id pub-id-type="coi">1:CAS:528:DC%2BC3cXotVeqsL4%3D</pub-id><pub-id pub-id-type="pmid">20595611</pub-id><pub-id pub-id-type="pmcid">3711608</pub-id><pub-id pub-id-type="doi">10.1126/science.1190371</pub-id></mixed-citation></ref><ref id="CR45"><label>45.</label><mixed-citation publication-type="other">Amorim, C. E. G. et al. Genetic signature of natural selection in first Americans. <italic>Proc. Natl. Acad. Sci</italic>.<ext-link xlink:href="https://doi.org/10.1073/pnas.1620541114" ext-link-type="doi">https://doi.org/10.1073/pnas.1620541114</ext-link> (2017).</mixed-citation></ref><ref id="CR46"><label>46.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Delmore</surname><given-names>K</given-names></name><etal/></person-group><article-title xml:lang="en">The evolutionary history and genomics of European blackcap migration</article-title><source>eLife</source><year>2020</year><volume>9</volume><fpage>e54462</fpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BB3cXhslamur%2FO</pub-id><pub-id pub-id-type="pmid">32312383</pub-id><pub-id pub-id-type="pmcid">7173969</pub-id><pub-id pub-id-type="doi">10.7554/eLife.54462</pub-id></mixed-citation></ref><ref id="CR47"><label>47.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Lindo</surname><given-names>J</given-names></name><etal/></person-group><article-title xml:lang="en">A time transect of exomes from a Native American population before and after European contact</article-title><source>Nat. Commun.</source><year>2016</year><volume>7</volume><pub-id pub-id-type="bibcode">2016NatCo...713175L</pub-id><pub-id pub-id-type="coi">1:CAS:528:DC%2BC28XhvVynsr7F</pub-id><pub-id pub-id-type="pmid">27845766</pub-id><pub-id pub-id-type="pmcid">5116069</pub-id><pub-id pub-id-type="doi">10.1038/ncomms13175</pub-id></mixed-citation></ref><ref id="CR48"><label>48.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Vijay</surname><given-names>N</given-names></name><etal/></person-group><article-title xml:lang="en">Genomewide patterns of variation in genetic diversity are shared among populations, species and higher-order taxa</article-title><source>Mol. Ecol.</source><year>2017</year><volume>26</volume><fpage>4284</fpage><lpage>4295</lpage><pub-id pub-id-type="pmid">28570015</pub-id><pub-id pub-id-type="doi">10.1111/mec.14195</pub-id></mixed-citation></ref><ref id="CR49"><label>49.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Wallberg</surname><given-names>A</given-names></name><name><surname>Pirk</surname><given-names>CW</given-names></name><name><surname>Allsopp</surname><given-names>MH</given-names></name><name><surname>Webster</surname><given-names>MT</given-names></name></person-group><article-title xml:lang="en">Identification of multiple loci associated with social parasitism in honeybees</article-title><source>PLOS Genet.</source><year>2016</year><volume>12</volume><fpage>e1006097</fpage><pub-id pub-id-type="pmid">27280405</pub-id><pub-id pub-id-type="pmcid">4900560</pub-id><pub-id pub-id-type="doi">10.1371/journal.pgen.1006097</pub-id><pub-id pub-id-type="coi">1:CAS:528:DC%2BC28XhslyitrvJ</pub-id></mixed-citation></ref><ref id="CR50"><label>50.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Librado</surname><given-names>P</given-names></name><name><surname>Orlando</surname><given-names>L</given-names></name></person-group><article-title xml:lang="en">Detecting signatures of positive selection along defined branches of a population tree using LSD</article-title><source>Mol. Biol. Evol.</source><year>2018</year><volume>35</volume><fpage>1520</fpage><lpage>1535</lpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BC1MXis1OntbY%3D</pub-id><pub-id pub-id-type="pmid">29617830</pub-id><pub-id pub-id-type="pmcid">5967574</pub-id><pub-id pub-id-type="doi">10.1093/molbev/msy053</pub-id></mixed-citation></ref><ref id="CR51"><label>51.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Salmón</surname><given-names>P</given-names></name><etal/></person-group><article-title xml:lang="en">Continent-wide genomic signatures of adaptation to urbanisation in a songbird across Europe</article-title><source>Nat. Commun.</source><year>2021</year><volume>12</volume><fpage>1</fpage><lpage>14</lpage><pub-id pub-id-type="bibcode">2021NatCo..12....2S</pub-id><pub-id pub-id-type="doi">10.1038/s41467-021-23027-w</pub-id><pub-id pub-id-type="coi">1:CAS:528:DC%2BB3MXhtFCmtrjJ</pub-id></mixed-citation></ref><ref id="CR52"><label>52.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Martin</surname><given-names>SH</given-names></name><etal/></person-group><article-title xml:lang="en">Natural selection and genetic diversity in the butterfly <italic>Heliconius melpomene</italic></article-title><source>Genetics</source><year>2016</year><volume>203</volume><fpage>525</fpage><lpage>541</lpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BC28XitFSit7fI</pub-id><pub-id pub-id-type="pmid">27017626</pub-id><pub-id pub-id-type="pmcid">4858797</pub-id><pub-id pub-id-type="doi">10.1534/genetics.115.183285</pub-id></mixed-citation></ref><ref id="CR53"><label>53.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Belleghem</surname><given-names>SMV</given-names></name><etal/></person-group><article-title xml:lang="en">Patterns of Z chromosome divergence among Heliconius species highlight the importance of historical demography</article-title><source>Mol. Ecol.</source><year>2018</year><volume>27</volume><fpage>3852</fpage><lpage>3872</lpage><pub-id pub-id-type="pmid">29569384</pub-id><pub-id pub-id-type="pmcid">6151167</pub-id><pub-id pub-id-type="doi">10.1111/mec.14560</pub-id><pub-id pub-id-type="coi">1:CAS:528:DC%2BC1cXhvVOiu7bI</pub-id></mixed-citation></ref><ref id="CR54"><label>54.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Ralph</surname><given-names>PL</given-names></name><name><surname>Coop</surname><given-names>G</given-names></name></person-group><article-title xml:lang="en">Convergent evolution during local adaptation to patchy landscapes</article-title><source>PLoS Genet.</source><year>2015</year><volume>11</volume><fpage>e1005630</fpage><pub-id pub-id-type="pmid">26571125</pub-id><pub-id pub-id-type="pmcid">4646681</pub-id><pub-id pub-id-type="doi">10.1371/journal.pgen.1005630</pub-id><pub-id pub-id-type="coi">1:CAS:528:DC%2BC28XmsFKisLo%3D</pub-id></mixed-citation></ref><ref id="CR55"><label>55.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Fang</surname><given-names>B</given-names></name><name><surname>Kemppainen</surname><given-names>P</given-names></name><name><surname>Momigliano</surname><given-names>P</given-names></name><name><surname>Feng</surname><given-names>X</given-names></name><name><surname>Merilä</surname><given-names>J</given-names></name></person-group><article-title xml:lang="en">On the causes of geographically heterogeneous parallel evolution in sticklebacks</article-title><source>Nat. Ecol. Evol.</source><year>2020</year><volume>4</volume><fpage>1105</fpage><lpage>1115</lpage><pub-id pub-id-type="pmid">32572218</pub-id><pub-id pub-id-type="doi">10.1038/s41559-020-1222-6</pub-id></mixed-citation></ref><ref id="CR56"><label>56.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Nadeau</surname><given-names>NJ</given-names></name><etal/></person-group><article-title xml:lang="en">Population genomics of parallel hybrid zones in the mimetic butterflies, H. melpomene and H. erato</article-title><source>Genome Res.</source><year>2014</year><volume>24</volume><fpage>1316</fpage><lpage>1333</lpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BC2cXhtlejt77I</pub-id><pub-id pub-id-type="pmid">24823669</pub-id><pub-id pub-id-type="pmcid">4120085</pub-id><pub-id pub-id-type="doi">10.1101/gr.169292.113</pub-id></mixed-citation></ref><ref id="CR57"><label>57.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Nadeau</surname><given-names>NJ</given-names></name></person-group><article-title xml:lang="en">Genes controlling mimetic colour pattern variation in butterflies</article-title><source>Curr. Opin. Insect Sci.</source><year>2016</year><volume>17</volume><fpage>24</fpage><lpage>31</lpage><pub-id pub-id-type="pmid">27720070</pub-id><pub-id pub-id-type="doi">10.1016/j.cois.2016.05.013</pub-id></mixed-citation></ref><ref id="CR58"><label>58.</label><mixed-citation publication-type="other">Van Belleghem, S. M. et al. Complex modular architecture around a simple toolkit of wing pattern genes. <italic>Nat. Ecol. Evol</italic>. <bold>1</bold>, 52 (2017).</mixed-citation></ref><ref id="CR59"><label>59.</label><mixed-citation publication-type="other">Brien, M. N. et al. <italic>The genetic basis of structural colour variation in mimetic Heliconius butterflies</italic>. 2021.04.21.440746 <ext-link xlink:href="https://www.biorxiv.org/content/10.1101/2021.04.21.440746v1" ext-link-type="url">https://www.biorxiv.org/content/10.1101/2021.04.21.440746v1</ext-link>, <ext-link xlink:href="https://doi.org/10.1101/2021.04.21.440746" ext-link-type="doi">https://doi.org/10.1101/2021.04.21.440746</ext-link> (2021).</mixed-citation></ref><ref id="CR60"><label>60.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Barghi</surname><given-names>N</given-names></name><etal/></person-group><article-title xml:lang="en">Genetic redundancy fuels polygenic adaptation in Drosophila</article-title><source>PLOS Biol.</source><year>2019</year><volume>17</volume><fpage>e3000128</fpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BC1MXhtFyhurnI</pub-id><pub-id pub-id-type="pmid">30716062</pub-id><pub-id pub-id-type="pmcid">6375663</pub-id><pub-id pub-id-type="doi">10.1371/journal.pbio.3000128</pub-id></mixed-citation></ref><ref id="CR61"><label>61.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Charlesworth</surname><given-names>B</given-names></name></person-group><article-title xml:lang="en">Measures of divergence between populations and the effect of forces that reduce variability</article-title><source>Mol. Biol. Evol.</source><year>1998</year><volume>15</volume><fpage>538</fpage><lpage>543</lpage><pub-id pub-id-type="coi">1:CAS:528:DyaK1cXislens7g%3D</pub-id><pub-id pub-id-type="pmid">9580982</pub-id><pub-id pub-id-type="doi">10.1093/oxfordjournals.molbev.a025953</pub-id></mixed-citation></ref><ref id="CR62"><label>62.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Nachman</surname><given-names>MW</given-names></name><name><surname>Payseur</surname><given-names>BA</given-names></name></person-group><article-title xml:lang="en">Recombination rate variation and speciation: theoretical predictions and empirical results from rabbits and mice</article-title><source>Philos. Trans. R. Soc. B Biol. Sci.</source><year>2012</year><volume>367</volume><fpage>409</fpage><lpage>421</lpage><pub-id pub-id-type="doi">10.1098/rstb.2011.0249</pub-id></mixed-citation></ref><ref id="CR63"><label>63.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Cruickshank</surname><given-names>TE</given-names></name><name><surname>Hahn</surname><given-names>MW</given-names></name></person-group><article-title xml:lang="en">Reanalysis suggests that genomic islands of speciation are due to reduced diversity, not reduced gene flow</article-title><source>Mol. Ecol.</source><year>2014</year><volume>23</volume><fpage>3133</fpage><lpage>3157</lpage><pub-id pub-id-type="pmid">24845075</pub-id><pub-id pub-id-type="doi">10.1111/mec.12796</pub-id></mixed-citation></ref><ref id="CR64"><label>64.</label><mixed-citation publication-type="other">Meier, J. I. et al. Haplotype tagging reveals parallel formation of hybrid races in two butterfly species. <italic>Proc. Natl. Acad. Sci</italic>. <bold>118</bold>, (2021).</mixed-citation></ref><ref id="CR65"><label>65.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Charlesworth</surname><given-names>B</given-names></name><name><surname>Nordborg</surname><given-names>M</given-names></name><name><surname>Charlesworth</surname><given-names>D</given-names></name></person-group><article-title xml:lang="en">The effects of local selection, balanced polymorphism and background selection on equilibrium patterns of genetic diversity in subdivided populations</article-title><source>Genet. Res.</source><year>1997</year><volume>70</volume><fpage>155</fpage><lpage>174</lpage><pub-id pub-id-type="coi">1:STN:280:DyaK1c7htVymsQ%3D%3D</pub-id><pub-id pub-id-type="pmid">9449192</pub-id><pub-id pub-id-type="doi">10.1017/S0016672397002954</pub-id></mixed-citation></ref><ref id="CR66"><label>66.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Martin</surname><given-names>SH</given-names></name><name><surname>Jiggins</surname><given-names>CD</given-names></name></person-group><article-title xml:lang="en">Interpreting the genomic landscape of introgression</article-title><source>Curr. Opin. Genet. Dev.</source><year>2017</year><volume>47</volume><fpage>69</fpage><lpage>74</lpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BC2sXhsV2jtLnE</pub-id><pub-id pub-id-type="pmid">28923541</pub-id><pub-id pub-id-type="doi">10.1016/j.gde.2017.08.007</pub-id></mixed-citation></ref><ref id="CR67"><label>67.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Burri</surname><given-names>R</given-names></name></person-group><article-title xml:lang="en">Interpreting differentiation landscapes in the light of long-term linked selection</article-title><source>Evol. Lett.</source><year>2017</year><volume>1</volume><fpage>118</fpage><lpage>131</lpage><pub-id pub-id-type="doi">10.1002/evl3.14</pub-id></mixed-citation></ref><ref id="CR68"><label>68.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Matthey-Doret</surname><given-names>R</given-names></name><name><surname>Whitlock</surname><given-names>MC</given-names></name></person-group><article-title xml:lang="en">Background selection and FST: Consequences for detecting local adaptation</article-title><source>Mol. Ecol.</source><year>2019</year><volume>28</volume><fpage>3902</fpage><lpage>3914</lpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BC1MXhvVWqu7bL</pub-id><pub-id pub-id-type="pmid">31349365</pub-id><pub-id pub-id-type="doi">10.1111/mec.15197</pub-id></mixed-citation></ref><ref id="CR69"><label>69.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Meier</surname><given-names>JI</given-names></name><name><surname>Marques</surname><given-names>DA</given-names></name><name><surname>Wagner</surname><given-names>CE</given-names></name><name><surname>Excoffier</surname><given-names>L</given-names></name><name><surname>Seehausen</surname><given-names>O</given-names></name></person-group><article-title xml:lang="en">Genomics of parallel ecological speciation in Lake Victoria cichlids</article-title><source>Mol. Biol. Evol.</source><year>2018</year><volume>35</volume><fpage>1489</fpage><lpage>1506</lpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BC1MXislWksb0%3D</pub-id><pub-id pub-id-type="pmid">29617828</pub-id><pub-id pub-id-type="doi">10.1093/molbev/msy051</pub-id></mixed-citation></ref><ref id="CR70"><label>70.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Yeaman</surname><given-names>S</given-names></name><name><surname>Whitlock</surname><given-names>MC</given-names></name></person-group><article-title xml:lang="en">The genetic architecture of adaptation under migration–selection balance</article-title><source>Evol. Int. J. Org. Evol.</source><year>2011</year><volume>65</volume><fpage>1897</fpage><lpage>1911</lpage><pub-id pub-id-type="doi">10.1111/j.1558-5646.2011.01269.x</pub-id></mixed-citation></ref><ref id="CR71"><label>71.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Martin</surname><given-names>SH</given-names></name><name><surname>Davey</surname><given-names>JW</given-names></name><name><surname>Salazar</surname><given-names>C</given-names></name><name><surname>Jiggins</surname><given-names>CD</given-names></name></person-group><article-title xml:lang="en">Recombination rate variation shapes barriers to introgression across butterfly genomes</article-title><source>PLoS Biol.</source><year>2019</year><volume>17</volume><fpage>e2006288</fpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BC1MXhtFyqsrvJ</pub-id><pub-id pub-id-type="pmid">30730876</pub-id><pub-id pub-id-type="pmcid">6366726</pub-id><pub-id pub-id-type="doi">10.1371/journal.pbio.2006288</pub-id></mixed-citation></ref><ref id="CR72"><label>72.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Wise</surname><given-names>A</given-names></name><etal/></person-group><article-title xml:lang="en">Drosophila mutants of the autism candidate gene neurobeachin (rugose) exhibit neuro-developmental disorders, aberrant synaptic properties, altered locomotion, and impaired adult social behavior and activity patterns</article-title><source>J. Neurogenet.</source><year>2015</year><volume>29</volume><fpage>135</fpage><lpage>143</lpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BC2MXhvVCis7fL</pub-id><pub-id pub-id-type="pmid">26100104</pub-id><pub-id pub-id-type="pmcid">4747641</pub-id><pub-id pub-id-type="doi">10.3109/01677063.2015.1064916</pub-id></mixed-citation></ref><ref id="CR73"><label>73.</label><mixed-citation publication-type="other">Davison, A., McMillan, W. O., Griffin, A. S., Jiggins, C. D. &amp; Mallet, J. L. B. Behavioral and physiological differences between two parapatric Heliconius species. <italic>Biotropica</italic><ext-link xlink:href="https://doi.org/10.1111/j.1744-7429.1999.tb00415.x" ext-link-type="doi">https://doi.org/10.1111/j.1744-7429.1999.tb00415.x</ext-link> (1999).</mixed-citation></ref><ref id="CR74"><label>74.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Zhang</surname><given-names>Y</given-names></name><etal/></person-group><article-title xml:lang="en">A widely diverged locus involved in locomotor adaptation in Heliconius butterflies</article-title><source>Sci. Adv.</source><year>2021</year><volume>7</volume><fpage>eabh2340</fpage><pub-id pub-id-type="bibcode">2021SciA....7.2340Z</pub-id><pub-id pub-id-type="coi">1:CAS:528:DC%2BB3MXitVKkurbN</pub-id><pub-id pub-id-type="pmid">34348900</pub-id><pub-id pub-id-type="pmcid">8336958</pub-id><pub-id pub-id-type="doi">10.1126/sciadv.abh2340</pub-id></mixed-citation></ref><ref id="CR75"><label>75.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Konečná</surname><given-names>V</given-names></name><etal/></person-group><article-title xml:lang="en">Parallel adaptation in autopolyploid Arabidopsis arenosa is dominated by repeated recruitment of shared alleles</article-title><source>Nat. Commun.</source><year>2021</year><volume>12</volume><pub-id pub-id-type="bibcode">2021NatCo..12.4979K</pub-id><pub-id pub-id-type="pmid">34404804</pub-id><pub-id pub-id-type="pmcid">8370997</pub-id><pub-id pub-id-type="doi">10.1038/s41467-021-25256-5</pub-id><pub-id pub-id-type="coi">1:CAS:528:DC%2BB3MXhvVehsrjK</pub-id></mixed-citation></ref><ref id="CR76"><label>76.</label><mixed-citation publication-type="other">Mérot, C. et al. Locally adaptive inversions modulate genetic variation at different geographic scales in a seaweed fly. <italic>Mol. Biol. Evol</italic>.</mixed-citation></ref><ref id="CR77"><label>77.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Todesco</surname><given-names>M</given-names></name><etal/></person-group><article-title xml:lang="en">Massive haplotypes underlie ecotypic differentiation in sunflowers</article-title><source>Nature</source><year>2020</year><volume>584</volume><fpage>602</fpage><lpage>607</lpage><pub-id pub-id-type="bibcode">2020Natur.584..602T</pub-id><pub-id pub-id-type="coi">1:CAS:528:DC%2BB3cXhtlCqtbrL</pub-id><pub-id pub-id-type="pmid">32641831</pub-id><pub-id pub-id-type="doi">10.1038/s41586-020-2467-6</pub-id></mixed-citation></ref><ref id="CR78"><label>78.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Li</surname><given-names>H</given-names></name><name><surname>Ralph</surname><given-names>P</given-names></name></person-group><article-title xml:lang="en">Local PCA shows how the effect of population structure differs along the genome</article-title><source>Genetics</source><year>2019</year><volume>211</volume><fpage>289</fpage><lpage>304</lpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BC1MXhtV2ktb7J</pub-id><pub-id pub-id-type="pmid">30459280</pub-id><pub-id pub-id-type="doi">10.1534/genetics.118.301747</pub-id></mixed-citation></ref><ref id="CR79"><label>79.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Mérot</surname><given-names>C</given-names></name><name><surname>Oomen</surname><given-names>RA</given-names></name><name><surname>Tigano</surname><given-names>A</given-names></name><name><surname>Wellenreuther</surname><given-names>M</given-names></name></person-group><article-title xml:lang="en">A roadmap for understanding the evolutionary significance of structural genomic variation</article-title><source>Trends Ecol. Evol.</source><year>2020</year><volume>35</volume><fpage>561</fpage><lpage>572</lpage><pub-id pub-id-type="pmid">32521241</pub-id><pub-id pub-id-type="doi">10.1016/j.tree.2020.03.002</pub-id></mixed-citation></ref><ref id="CR80"><label>80.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Kirkpatrick</surname><given-names>M</given-names></name><name><surname>Barton</surname><given-names>N</given-names></name></person-group><article-title xml:lang="en">Chromosome inversions, local adaptation and speciation</article-title><source>Genetics</source><year>2006</year><volume>173</volume><fpage>419</fpage><lpage>434</lpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BD28XlvF2it7s%3D</pub-id><pub-id pub-id-type="pmid">16204214</pub-id><pub-id pub-id-type="pmcid">1461441</pub-id><pub-id pub-id-type="doi">10.1534/genetics.105.047985</pub-id></mixed-citation></ref><ref id="CR81"><label>81.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Malinsky</surname><given-names>M</given-names></name><etal/></person-group><article-title xml:lang="en">Genomic islands of speciation separate cichlid ecomorphs in an East African crater lake</article-title><source>Science</source><year>2015</year><volume>350</volume><fpage>1493</fpage><lpage>1498</lpage><pub-id pub-id-type="bibcode">2015Sci...350.1493M</pub-id><pub-id pub-id-type="coi">1:CAS:528:DC%2BC2MXitVWrtLrI</pub-id><pub-id pub-id-type="pmid">26680190</pub-id><pub-id pub-id-type="pmcid">4700518</pub-id><pub-id pub-id-type="doi">10.1126/science.aac9927</pub-id></mixed-citation></ref><ref id="CR82"><label>82.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Martin</surname><given-names>SH</given-names></name><name><surname>Davey</surname><given-names>JW</given-names></name><name><surname>Jiggins</surname><given-names>CD</given-names></name></person-group><article-title xml:lang="en">Evaluating the Use of ABBA–BABA Statistics to Locate Introgressed Loci</article-title><source>Mol. Biol. Evol.</source><year>2015</year><volume>32</volume><fpage>244</fpage><lpage>257</lpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BC2MXivFGltr0%3D</pub-id><pub-id pub-id-type="pmid">25246699</pub-id><pub-id pub-id-type="doi">10.1093/molbev/msu269</pub-id></mixed-citation></ref><ref id="CR83"><label>83.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Bull</surname><given-names>V</given-names></name><etal/></person-group><article-title xml:lang="en">Polyphyly and gene flow between non-sibling Heliconius species</article-title><source>BMC Biol.</source><year>2006</year><volume>4</volume><fpage>1</fpage><lpage>17</lpage><pub-id pub-id-type="doi">10.1186/1741-7007-4-11</pub-id><pub-id pub-id-type="coi">1:CAS:528:DC%2BD28XkvFSjtbc%3D</pub-id></mixed-citation></ref><ref id="CR84"><label>84.</label><mixed-citation publication-type="other">Martin, S. et al. Genome-wide evidence for speciation with gene flow in Heliconius butterflies. <italic>Genome Res</italic>. (2013) <ext-link xlink:href="https://doi.org/10.1101/gr.159426.113" ext-link-type="doi">https://doi.org/10.1101/gr.159426.113</ext-link>.</mixed-citation></ref><ref id="CR85"><label>85.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Pardo-Diaz</surname><given-names>C</given-names></name><etal/></person-group><article-title xml:lang="en">Adaptive introgression across species boundaries in Heliconius butterflies</article-title><source>PLoS Genet.</source><year>2012</year><volume>8</volume><fpage>e1002752</fpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BC38XpsVWktLw%3D</pub-id><pub-id pub-id-type="pmid">22737081</pub-id><pub-id pub-id-type="pmcid">3380824</pub-id><pub-id pub-id-type="doi">10.1371/journal.pgen.1002752</pub-id></mixed-citation></ref><ref id="CR86"><label>86.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Malinsky</surname><given-names>M</given-names></name><name><surname>Matschiner</surname><given-names>M</given-names></name><name><surname>Svardal</surname><given-names>H</given-names></name></person-group><article-title xml:lang="en">Dsuite-Fast D-statistics and related admixture evidence from VCF files</article-title><source>Mol. Ecol. Resour.</source><year>2021</year><volume>21</volume><fpage>584</fpage><lpage>595</lpage><pub-id pub-id-type="pmid">33012121</pub-id><pub-id pub-id-type="doi">10.1111/1755-0998.13265</pub-id></mixed-citation></ref><ref id="CR87"><label>87.</label><mixed-citation publication-type="other">Kozak, K. M., Joron, M., McMillan, W. O. &amp; Jiggins, C. D. Rampant genome-wide admixture across the Heliconius radiation. <italic>Genome Biol. Evol</italic>. (2021).</mixed-citation></ref><ref id="CR88"><label>88.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Natarajan</surname><given-names>C</given-names></name><etal/></person-group><article-title xml:lang="en">Predictable convergence in hemoglobin function has unpredictable molecular underpinnings</article-title><source>Science</source><year>2016</year><volume>354</volume><fpage>336</fpage><lpage>339</lpage><pub-id pub-id-type="bibcode">2016Sci...354..336N</pub-id><pub-id pub-id-type="coi">1:CAS:528:DC%2BC28Xhs1yltLnJ</pub-id><pub-id pub-id-type="pmid">27846568</pub-id><pub-id pub-id-type="pmcid">5464326</pub-id><pub-id pub-id-type="doi">10.1126/science.aaf9070</pub-id></mixed-citation></ref><ref id="CR89"><label>89.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Dasmahapatra</surname><given-names>KK</given-names></name><etal/></person-group><article-title xml:lang="en">Butterfly genome reveals promiscuous exchange of mimicry adaptations among species</article-title><source>Nature</source><year>2012</year><volume>487</volume><fpage>94</fpage><pub-id pub-id-type="bibcode">2012Natur.487...94T</pub-id><pub-id pub-id-type="coi">1:CAS:528:DC%2BC38XpvVSru7s%3D</pub-id><pub-id pub-id-type="pmcid">3398145</pub-id><pub-id pub-id-type="doi">10.1038/nature11041</pub-id></mixed-citation></ref><ref id="CR90"><label>90.</label><mixed-citation publication-type="other">Jiggins, C. D., Mcmillan, O., Neukirchen, W., Mallet, J. &amp; Nw, L. What can hybrid zones tell us about speciation? The case of Heliconius erato and H. himera (Lepidoptera: Nymphalidae). <italic>Biol. J. Linn. Soc</italic>. 221–242 <ext-link xlink:href="https://doi.org/10.1111/j.1095-8312.1996.tb01464.x" ext-link-type="doi">https://doi.org/10.1111/j.1095-8312.1996.tb01464.x</ext-link> (1996).</mixed-citation></ref><ref id="CR91"><label>91.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Merrill</surname><given-names>RM</given-names></name><name><surname>Chia</surname><given-names>A</given-names></name><name><surname>Nadeau</surname><given-names>NJ</given-names></name></person-group><article-title xml:lang="en">Divergent warning patterns contribute to assortative mating between incipient Heliconius species</article-title><source>Ecol. Evol.</source><year>2014</year><volume>4</volume><fpage>911</fpage><lpage>917</lpage><pub-id pub-id-type="pmid">24772270</pub-id><pub-id pub-id-type="pmcid">3997309</pub-id><pub-id pub-id-type="doi">10.1002/ece3.996</pub-id></mixed-citation></ref><ref id="CR92"><label>92.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Montgomery</surname><given-names>SH</given-names></name><name><surname>Merrill</surname><given-names>RM</given-names></name></person-group><article-title xml:lang="en">Divergence in brain composition during the early stages of ecological specialization in Heliconius butterflies</article-title><source>J. Evol. Biol.</source><year>2017</year><volume>30</volume><fpage>571</fpage><lpage>582</lpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BC2sXjslyitb8%3D</pub-id><pub-id pub-id-type="pmid">27981714</pub-id><pub-id pub-id-type="doi">10.1111/jeb.13027</pub-id></mixed-citation></ref><ref id="CR93"><label>93.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Jay</surname><given-names>P</given-names></name><etal/></person-group><article-title xml:lang="en">Supergene evolution triggered by the introgression of a chromosomal inversion</article-title><source>Curr. Biol.</source><year>2018</year><volume>28</volume><fpage>1839</fpage><lpage>1845</lpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BC1cXhtVantbfN</pub-id><pub-id pub-id-type="pmid">29804810</pub-id><pub-id pub-id-type="doi">10.1016/j.cub.2018.04.072</pub-id></mixed-citation></ref><ref id="CR94"><label>94.</label><mixed-citation publication-type="other">Jiggins, C. D. <italic>The Ecology and Evolution of Heliconius Butterflies</italic>. (Oxford University Press, 2016).</mixed-citation></ref><ref id="CR95"><label>95.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Hoorn</surname><given-names>C</given-names></name><etal/></person-group><article-title xml:lang="en">Amazonia through time: Andean uplift, climate change, landscape evolution, and biodiversity</article-title><source>science</source><year>2010</year><volume>330</volume><fpage>927</fpage><lpage>931</lpage><pub-id pub-id-type="bibcode">2010Sci...330..927H</pub-id><pub-id pub-id-type="coi">1:CAS:528:DC%2BC3cXhtl2isbnM</pub-id><pub-id pub-id-type="pmid">21071659</pub-id><pub-id pub-id-type="doi">10.1126/science.1194585</pub-id></mixed-citation></ref><ref id="CR96"><label>96.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Picelli</surname><given-names>S</given-names></name><etal/></person-group><article-title xml:lang="en">Tn5 transposase and tagmentation procedures for massively scaled sequencing projects</article-title><source>Genome Res.</source><year>2014</year><volume>24</volume><fpage>2033</fpage><lpage>2040</lpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BC2cXitVOls7%2FF</pub-id><pub-id pub-id-type="pmid">25079858</pub-id><pub-id pub-id-type="pmcid">4248319</pub-id><pub-id pub-id-type="doi">10.1101/gr.177881.114</pub-id></mixed-citation></ref><ref id="CR97"><label>97.</label><mixed-citation publication-type="other">Ginestet, C. ggplot2: Elegant Graphics for Data Analysis. <italic>J. R. Stat. Soc. Ser. A Stat. Soc</italic>. (2011) <ext-link xlink:href="https://doi.org/10.1111/j.1467-985X.2010.00676_9.x" ext-link-type="doi">https://doi.org/10.1111/j.1467-985X.2010.00676_9.x</ext-link>.</mixed-citation></ref><ref id="CR98"><label>98.</label><mixed-citation publication-type="other">Challis, R. J., Kumar, S., Dasmahapatra, K. K., Jiggins, C. D. &amp; Blaxter, M. <italic>Lepbase: the Lepidopteran genome database</italic>. <ext-link xlink:href="http://biorxiv.org/lookup/doi/10.1101/056994" ext-link-type="url">http://biorxiv.org/lookup/doi/10.1101/056994</ext-link>, <ext-link xlink:href="https://doi.org/10.1101/056994" ext-link-type="doi">https://doi.org/10.1101/056994</ext-link> (2016).</mixed-citation></ref><ref id="CR99"><label>99.</label><mixed-citation publication-type="other">Davey, J. W. et al. Major Improvements to the Heliconius melpomene Genome Assembly Used to Confirm 10 Chromosome Fusion Events in 6 Million Years of Butterfly Evolution. <italic>G3 GenesGenomesGenetics</italic> g3.115.023655 <ext-link xlink:href="https://doi.org/10.1534/g3.115.023655" ext-link-type="doi">https://doi.org/10.1534/g3.115.023655</ext-link>.(2016)</mixed-citation></ref><ref id="CR100"><label>100.</label><mixed-citation publication-type="other">Li, H. Aligning sequence reads, clone sequences and assembly contigs with BWA-MEM. <italic>ArXiv Prepr. ArXiv13033997</italic> (2013).</mixed-citation></ref><ref id="CR101"><label>101.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Li</surname><given-names>H</given-names></name><etal/></person-group><article-title xml:lang="en">The Sequence Alignment/Map format and SAMtools</article-title><source>Bioinforma. Oxf. Engl.</source><year>2009</year><volume>25</volume><fpage>2078</fpage><lpage>2079</lpage><pub-id pub-id-type="doi">10.1093/bioinformatics/btp352</pub-id><pub-id pub-id-type="coi">1:CAS:528:DC%2BD1MXpslertr8%3D</pub-id></mixed-citation></ref><ref id="CR102"><label>102.</label><mixed-citation publication-type="other">Broad Institute. Picard tools. <italic>Broad Inst. GitHub Repos</italic>. (2018).</mixed-citation></ref><ref id="CR103"><label>103.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Korneliussen</surname><given-names>TS</given-names></name><name><surname>Albrechtsen</surname><given-names>A</given-names></name><name><surname>Nielsen</surname><given-names>R</given-names></name></person-group><article-title xml:lang="en">ANGSD: Analysis of Next Generation Sequencing Data</article-title><source>BMC Bioinforma.</source><year>2014</year><volume>15</volume><pub-id pub-id-type="doi">10.1186/s12859-014-0356-4</pub-id></mixed-citation></ref><ref id="CR104"><label>104.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>McKenna</surname><given-names>A</given-names></name><etal/></person-group><article-title xml:lang="en">The Genome Analysis Toolkit: a MapReduce framework for analyzing next-generation DNA sequencing data</article-title><source>Genome Res.</source><year>2010</year><volume>20</volume><fpage>1297</fpage><lpage>1303</lpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BC3cXhtFeru7jM</pub-id><pub-id pub-id-type="pmid">20644199</pub-id><pub-id pub-id-type="pmcid">2928508</pub-id><pub-id pub-id-type="doi">10.1101/gr.107524.110</pub-id></mixed-citation></ref><ref id="CR105"><label>105.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Danecek</surname><given-names>P</given-names></name><etal/></person-group><article-title xml:lang="en">The variant call format and VCFtools</article-title><source>Bioinformatics</source><year>2011</year><volume>27</volume><fpage>2156</fpage><lpage>2158</lpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BC3MXptFCqt7w%3D</pub-id><pub-id pub-id-type="pmid">21653522</pub-id><pub-id pub-id-type="pmcid">3137218</pub-id><pub-id pub-id-type="doi">10.1093/bioinformatics/btr330</pub-id></mixed-citation></ref><ref id="CR106"><label>106.</label><mixed-citation publication-type="other">Jiggins, C. D., Salazar, P. A. &amp; Montejo-Kovacevich, G. Heliconiine Butterfly Collection Records from University of Cambridge. Department of Zoology, Cambridge. (2019).</mixed-citation></ref><ref id="CR107"><label>107.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Wang</surname><given-names>IJ</given-names></name></person-group><article-title xml:lang="en">Topographic path analysis for modelling dispersal and functional connectivity: Calculating topographic distances using the topoDistance r package</article-title><source>Methods Ecol. Evol.</source><year>2020</year><volume>11</volume><fpage>265</fpage><lpage>272</lpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BB3cXhvVakur%2FI</pub-id><pub-id pub-id-type="doi">10.1111/2041-210X.13317</pub-id></mixed-citation></ref><ref id="CR108"><label>108.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Hudson</surname><given-names>RR</given-names></name><name><surname>Slatkin</surname><given-names>M</given-names></name><name><surname>Maddison</surname><given-names>WP</given-names></name></person-group><article-title xml:lang="en">Estimation of levels of gene flow from DNA sequence data</article-title><source>Genetics</source><year>1992</year><volume>132</volume><fpage>583</fpage><lpage>589</lpage><pub-id pub-id-type="coi">1:CAS:528:DyaK3sXhsVSku7o%3D</pub-id><pub-id pub-id-type="pmid">1427045</pub-id><pub-id pub-id-type="pmcid">1205159</pub-id><pub-id pub-id-type="doi">10.1093/genetics/132.2.583</pub-id></mixed-citation></ref><ref id="CR109"><label>109.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Bhatia</surname><given-names>G</given-names></name><name><surname>Patterson</surname><given-names>N</given-names></name><name><surname>Sankararaman</surname><given-names>S</given-names></name><name><surname>Price</surname><given-names>AL</given-names></name></person-group><article-title xml:lang="en">Estimating and interpreting FST: the impact of rare variants</article-title><source>Genome Res.</source><year>2013</year><volume>23</volume><fpage>1514</fpage><lpage>1521</lpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BC3sXhsVOls7fN</pub-id><pub-id pub-id-type="pmid">23861382</pub-id><pub-id pub-id-type="pmcid">3759727</pub-id><pub-id pub-id-type="doi">10.1101/gr.154831.113</pub-id></mixed-citation></ref><ref id="CR110"><label>110.</label><mixed-citation publication-type="other">Bourgon, R. <italic>intervals: Tools for working with points and intervals</italic>. <ext-link xlink:href="https://CRAN.R-project.org/package=intervals" ext-link-type="url">https://CRAN.R-project.org/package=intervals</ext-link> (2020).</mixed-citation></ref><ref id="CR111"><label>111.</label><mixed-citation publication-type="other">Korunes, K. L. &amp; Samuk, K. pixy: Unbiased estimation of nucleotide diversity and divergence in the presence of missing data. <italic>bioRxiv</italic> 2020.06.27.175091 <ext-link xlink:href="https://doi.org/10.1101/2020.06.27.175091" ext-link-type="doi">https://doi.org/10.1101/2020.06.27.175091</ext-link> (2020).</mixed-citation></ref><ref id="CR112"><label>112.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Nei</surname><given-names>M</given-names></name></person-group><article-title xml:lang="en">The theory of genetic distance and evolution of human races</article-title><source>Jpn. J. Hum. Genet.</source><year>1978</year><volume>23</volume><fpage>341</fpage><lpage>369</lpage><pub-id pub-id-type="coi">1:STN:280:DyaE1M7jt1yrtQ%3D%3D</pub-id><pub-id pub-id-type="doi">10.1007/BF01908190</pub-id></mixed-citation></ref><ref id="CR113"><label>113.</label><mixed-citation publication-type="other">Belleghem, S. M. V. et al. Selection and gene flow define polygenic barriers between incipient butterfly species. <italic>bioRxiv</italic> 2020.04.09.034470 <ext-link xlink:href="https://doi.org/10.1101/2020.04.09.034470" ext-link-type="doi">https://doi.org/10.1101/2020.04.09.034470</ext-link> (2020).</mixed-citation></ref><ref id="CR114"><label>114.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Meisner</surname><given-names>J</given-names></name><name><surname>Albrechtsen</surname><given-names>A</given-names></name></person-group><article-title xml:lang="en">Inferring Population Structure and Admixture Proportions in Low-Depth NGS Data</article-title><source>Genetics</source><year>2018</year><volume>210</volume><fpage>719</fpage><lpage>731</lpage><pub-id pub-id-type="pmid">30131346</pub-id><pub-id pub-id-type="pmcid">6216594</pub-id><pub-id pub-id-type="doi">10.1534/genetics.118.301336</pub-id></mixed-citation></ref><ref id="CR115"><label>115.</label><mixed-citation publication-type="other">Grömping, U. Relative importance for linear regression in <italic>R</italic>: The package relaimpo. <italic>J. Stat. Softw</italic>. <ext-link xlink:href="https://doi.org/10.18637/jss.v017.i01" ext-link-type="doi">https://doi.org/10.18637/jss.v017.i01</ext-link> (2006).</mixed-citation></ref><ref id="CR116"><label>116.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Chang</surname><given-names>CC</given-names></name><etal/></person-group><article-title xml:lang="en">Second-generation PLINK: Rising to the challenge of larger and richer datasets</article-title><source>Gigascience</source><year>2015</year><volume>4</volume><fpage>s13742</fpage><lpage>015</lpage><pub-id pub-id-type="doi">10.1186/s13742-015-0047-8</pub-id><pub-id pub-id-type="coi">1:CAS:528:DC%2BC2MXlsFShsLY%3D</pub-id></mixed-citation></ref><ref id="CR117"><label>117.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Stamatakis</surname><given-names>A</given-names></name></person-group><article-title xml:lang="en">RAxML version 8: A tool for phylogenetic analysis and post-analysis of large phylogenies</article-title><source>Bioinformatics</source><year>2014</year><volume>30</volume><fpage>1312</fpage><lpage>1313</lpage><pub-id pub-id-type="coi">1:CAS:528:DC%2BC2cXmvFCjsbc%3D</pub-id><pub-id pub-id-type="pmid">24451623</pub-id><pub-id pub-id-type="pmcid">3998144</pub-id><pub-id pub-id-type="doi">10.1093/bioinformatics/btu033</pub-id></mixed-citation></ref><ref id="CR118"><label>118.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Malinsky</surname><given-names>M</given-names></name><etal/></person-group><article-title xml:lang="en">Whole-genome sequences of Malawi cichlids reveal multiple radiations interconnected by gene flow</article-title><source>Nat. Ecol. Evol.</source><year>2018</year><volume>2</volume><fpage>1940</fpage><lpage>1955</lpage><pub-id pub-id-type="pmid">30455444</pub-id><pub-id pub-id-type="pmcid">6443041</pub-id><pub-id pub-id-type="doi">10.1038/s41559-018-0717-x</pub-id></mixed-citation></ref><ref id="CR119"><label>119.</label><mixed-citation publication-type="other">Montejo-Kovacevich, G. <italic>gmkov/2021-altitude-heliconius: v1</italic>. (Zenodo, 2022). <ext-link xlink:href="https://doi.org/10.5281/zenodo.6836103" ext-link-type="doi">https://doi.org/10.5281/zenodo.6836103</ext-link>.</mixed-citation></ref><ref id="CR120"><label>120.</label><mixed-citation publication-type="other">Loecher, M. &amp; Loecher, M. M. Package ‘RgoogleMaps’. (2020).</mixed-citation></ref></ref-list></ref-list><app-group><app id="App1"><sec id="Sec22"><title>Supplementary information</title><p id="Par59"><supplementary-material content-type="local-data" id="MOESM1" xlink:title="Supplementary information"><media xlink:href="MediaObjects/41467_2022_32316_MOESM1_ESM.pdf" mimetype="application" mime-subtype="pdf"><caption xml:lang="en"><p>Supplementary Information</p></caption></media></supplementary-material><supplementary-material content-type="local-data" id="MOESM2" xlink:title="Supplementary information"><media xlink:href="MediaObjects/41467_2022_32316_MOESM2_ESM.pdf" mimetype="application" mime-subtype="pdf"><caption xml:lang="en"><p>Description of Additional Supplementary Files</p></caption></media></supplementary-material><supplementary-material content-type="local-data" id="MOESM3" xlink:title="Supplementary information"><media xlink:href="MediaObjects/41467_2022_32316_MOESM3_ESM.csv" mimetype="text" mime-subtype="plain"><caption xml:lang="en"><p>Supplementary Data 1</p></caption></media></supplementary-material><supplementary-material content-type="local-data" id="MOESM4" xlink:title="Supplementary information"><media xlink:href="MediaObjects/41467_2022_32316_MOESM4_ESM.pdf" mimetype="application" mime-subtype="pdf"><caption xml:lang="en"><p>Reporting Summary</p></caption></media></supplementary-material></p></sec><sec id="Sec23"><title>Source data</title><p id="Par60"><supplementary-material content-type="local-data" id="MOESM5" xlink:title="Source data"><media xlink:href="MediaObjects/41467_2022_32316_MOESM5_ESM.xlsx" mimetype="application" mime-subtype="vnd.ms-excel"><caption xml:lang="en"><p>Source Data</p></caption></media></supplementary-material></p></sec></app></app-group><notes notes-type="ESMHint"><title>Supplementary information</title><p>The online version contains supplementary material available at <ext-link xlink:href="https://doi.org/10.1038/s41467-022-32316-x" ext-link-type="doi">https://doi.org/10.1038/s41467-022-32316-x</ext-link>.</p></notes><notes notes-type="Misc"><p><bold>Publisher’s note</bold> Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.</p></notes></back></article>