Supplementary Materials

Materials and Methods pages 1 to 7 Supplementary Text page 8 Supplementary Figures 1 to 9 pages 9 to 16 Supplementary Tables 1 to 7 pages 17 to 21 References are all included in the main manuscript.

Materials and Methods

Annotation of VIPs We previously manually annotated 1256 VIPs from a set of 9861 human proteins with orthologs conserved across mammals (8). Here, we extended our manual annotation effort to all protein coding in the and identified 664 additional VIPs, for a total of 1920 manually curated, high quality VIPs (Table S1). The 664 additional VIPs were all identified with low- throughput methods and extracted from the virology literature as previously described (8). In addition to the 1920 low-throughput VIPs, we also used 2614 other VIPs identified for viruses infecting humans by high throughput methods and annotated in the VirHostNet2.0 database (19) or identified in at least one of 14 different recent studies not listed in VirHostNet2.0 (Table S1). We excluded VIPs only identified by yeast two-hybrid because of notoriously high rates of false positives and negatives. The 4534 resulting VIPs are all listed in Table S1 together with their respective viruses. Note that LT-VIPs for specific viruses can also be high-throughput VIPs for other viruses (Table S1).

Introgressed segments from Neanderthals to modern humans We used the segments of Neanderthal ancestry in both Asian and European modern humans that were identified and kindly provided by Sankararaman et al. (5). For each variant present in the genomes of Asian or European modern humans, those authors estimated a posterior probability that a specific allele was inherited from Neanderthals. This posterior probability is equivalent to the frequency of Neanderthal ancestry at a given variant position. To build segments of Neanderthal ancestry above a fixed frequency threshold, we identified continuous regions of the genome where

1 at least one in every ten variants had a frequency of Neanderthal ancestry higher than the fixed frequency threshold.

Introgressed segments from modern humans to Altai Neanderthals We use the segments of modern human ancestry in the Altai Neanderthal genome provided by Kuhlwilm et al. (1) as a supplementary table (Table S18) in their manuscript.

Genomic factors All analyses were conducted using hg19 genomic coordinates and protein-coding annotations from Ensembl version 83 (24). Genomic factors included the densities of coding (24), conserved (26), and regulatory elements (25). For each protein-coding gene in the human genome, these densities were measured within 50 kb windows at the genomic center of each gene (halfway between the most 5’ transcription start and most 3’ transcription stop sites), ensuring that all genes were treated equally irrespective of their genomic structure. To measure coding sequence density (CDS), we used coding sequences annotated in Ensembl version 83 (24). The density of conserved elements was the density of segments conserved across mammals identified by PhastCons (26) applied to alignments of 46 mammalian genomes, and available at the UCSC Genome Browser (http://hgdownload.cse.ucsc.edu/goldenPath/hg19/database/). The density of regulatory elements was the density of all the Encode DNase I segments cumulated across all ENCODE cell types (25), available at http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeRegDnaseClustered/. In addition to these densities, we also controlled for various functional aspects of genes such as mRNA expression and the number of protein–protein physical interactions. For the former, we used mRNA expression (measured in RPKM) for Ensembl protein-coding genes across 53 different tissues from GTEx version 6 (27), available at http://www.gtexportal.org/home/. For the number of protein–protein interactions (known as ‘degree’ in the protein–protein interaction network), we used a version of the BioGrid database, curated and made available by Luisi et al. (28, 29). In addition to these functional factors, GC content is well known to correlate with the long- term recombination rate (31). Because recombination rate strongly affects the strength of background selection against introgressed segments, we controlled for both GC content and direct estimates of the local recombination rates measured within 200-kb windows centered on genes, as described above. In particular, we used the fine-scale, pedigree-based genetic maps measured by

2 Hinch et al. (30) in African Americans. To avoid confusing variations in linkage due to variations in the actual recombination rate with variations in linkage due to natural selection, we did not use recombination maps based on linkage disequilibrium. Furthermore, to avoid any potential effect of introgressed segments on the inference of recombination rates in Asian or European populations, we did not use genetic maps from these populations. Note also that all analyses in the manuscript were conducted using only genes with a recombination rate greater than 0.0005 cM/Mb to avoid confusion between genes where the recombination rate is null and genes located within gaps in the recombination map (null vs. unknown recombination rate). Finally, to study introgressions at VIPs compared to non-VIPs it is crucial to control for the genetic load, defined as the amounts of segregating deleterious mutations within different regions of the genome. We used two statistics that are both expected to correlate with the genetic load. First, we used Tajima’s D (21), measured using variants from the 1,000 Genomes Project (20), as an estimator of the excess of rare alleles within 50 kb windows centered on Ensembl version 83 protein-coding genes. Deleterious alleles are expected to segregate at lower frequencies than neutral ones, and although Tajima’s D is often used to detect complete selective sweeps, it was initially created to detect an excess of rare deleterious alleles. Because Tajima’s D is also sensitive to selective sweeps, we can kill two birds with one stone. Indeed, in addition to accounting for deleterious mutations, controlling for Tajima’s D is also likely to partially account for the fact that introgressions from Neanderthals to modern humans may have been eliminated at locations in the genome where adaptive de novo mutations that occurred after interbreeding resulted in selective sweeps that reached high frequencies. As a second statistic also expected to correlate with the genetic load, we used the scores of deleteriousness attributed to non-coding variants (which represent the vast majority of variants) from the 1,000 Genomes Project (20) by the annotation tool FUNSEQ (22, 23). More specifically, we measure the average deleteriousness score within 50 kb windows centered on Ensembl version 83 protein-coding genes. Tajima’s D and the average FUNSEQ score represent two very different ways to estimate the genetic load, and are therefore complementary.

Identifying important genomic factors In order to estimate the effect of viruses on adaptive introgressions, it is crucial to first eliminate factors intrinsic to the host that also affect the occurrence of introgressions along the genome. This can be achieved by comparing VIPs and non-VIPs that are matched for genomic factors that affect

3 the occurrence of introgressions; measures of such factors are expected to be significantly different inside vs. outside introgressions. For example, introgressions from Neanderthals occur more frequently in regions of modern human genomes with higher recombination rates (5) because more intense background selection eliminated more introgressions in regions of low recombination. In agreement with these previous findings, we found that recombination is significantly higher inside vs. outside introgressions from Neanderthals to both Asian and European modern humans (Figs. S2 and S3, respectively). More specifically, we measured recombination in 200 kb windows centered on genes (see “Genomic factors” in Methods) inside and outside introgressions. Genes with their genomic center within an introgression were considered to be ‘inside,’ whereas all other genes are considered ‘outside.’ We then counted the number of genes inside introgressions and calculated the average recombination rate across these genes. To determine how different this average differs from that of genes outside introgressions, we randomly sampled the same number of genes outside introgressions 1,000 times to obtain an empirical null distribution for the average. The comparison of genes inside vs. outside introgressions can be performed not only for recombination, but also for any possible genomic factor. Figures S1, S2, S3, and S4 show the genomic factors that differ significantly inside vs. outside introgressions from Neanderthals to modern humans, as well as for introgressions in the other direction. For all factors other than recombination, we did not use a simple permutation test, but instead used a permutation test with a target average (see below) that makes it possible to compare genes inside and outside introgressions with similar recombination rates.

Bootstrap test We created a bootstrap test to compare VIPs and non-VIPs matched for all important host genomic factors that affect the occurrence of introgressions (Figs. S1, S2, S3 and S4). If a given genomic factor had the value a at a specific VIP, we looked for all non-VIPs around the value a within the range of values from a-ax to a+ay, where x and y are always above zero. At this point, we selected for further analysis only those VIPs with more than three matching non-VIPs. For each VIP with at least three matching non-VIPs, we then randomly chose one of the matched non-VIPs as its control. By doing the same for all VIPs, we obtained a control set of non-VIPs with the same important genomic properties, i.e., those properties that differ inside versus outside introgressions and also between VIPs and non-VIPs. This matching process was a bootstrap because the same non-VIP could serve as the control for several VIPs. By repeating the matching process many times, we could

4 create many random sets of control non-VIPs from which empirical null distributions (i.e., genes with the same genomic properties except for the interactions with viruses) could be estimated for any possible genomic factor, including those that we tried to match between VIPs and non-VIPs. This means we could use the bootstrap test itself to adjust the values of x and y that define the range of a given factor in matched non-VIPs. In practice, we manually adjusted the values of x and y through trial and error for each genomic factor separately until all factors had non-significantly different averages of all the genomic factors included between VIPs and matched non-VIPs (bootstrap test P>0.05 after 200 iterations of the matching process). Table S5 lists all the values of x and y for all the bootstrap tests performed for this manuscript, together with the number of VIPs passing the minimum requirement of at least three matched non-VIPs, as well as the total number of matched non-VIPs used as controls. Because several genomic factors were correlated with each other, changing x and y for a specific factor often affected the match between the averages of another genomic factor between VIPs and non-VIPs. This interdependence of several genomic factors made the matching process complicated to automate, and explains the use of manual trial and error. Once all important genomic factors were properly matched between VIPs and non-VIPs, we ran 5,000 iterations of the matching process to test for an excess of introgressions at VIPs compared to matched non-VIPs. To measure the excess at VIPs, we counted the number of introgressed segments that overlapped VIPs, divided by the number of introgressed segments that overlapped matched, control non-VIPs. For those introgressed segments that contained one or more non-VIPs that were matched with multiple VIPs, we first randomly chose one non-VIP to represent the whole segment (if there are several of them), and then added to the overall count of segments overlapping non-VIPs the number of times the chosen non-VIP was matched with distinct VIPs. In our case, counting the number of introgressed segments overlapping VIPs or non-VIPs instead of counting the number of VIPs and non-VIPs within introgressed segments was conservative. Indeed, VIPs retained in the bootstrap test tended to be clustered together more closely than the matched non-VIPs (Table S6). Because the introgressed segments could be very large, and therefore included both VIPs and potential non-VIP controls, we only matched VIPs with non-VIPs that were at least 500 kb away from any VIP, and in parallel only counted introgressions from Neanderthals to modern humans that were smaller than 500 kb. We chose a minimal distance of 500 kb between VIPs and control non-VIPs as a good compromise between having a wide enough representation of sizes of introgressed segments, and keeping a sufficient number of non-VIPs that could still be used as

5 controls. For introgressions from modern humans to Neanderthals, the largest introgression found in the Neanderthal Altai genome was 310 kb, so as potential controls we used all non-VIPs at least 310 kb away from any VIP.

Permutations with a target average Genes inside and outside introgressions have very different recombination rates, with genes inside of introgressions having much higher recombination rates than genes outside (Figs. S2 and S3). This is because purifying selection eliminated more introgressions in low recombination regions. Many genomic factors such as coding or regulatory density are well known to correlate with the rate of recombination. To avoid confusing the effect of a specific genomic factor on the occurrence of introgressions with the correlated effect of recombination, we compared genomic factors inside and outside introgressions using a permutation test with a target average that was previously introduced in Enard et al (8). In brief, the permutation test with a target average makes it possible to build random control sets of genes outside introgressions with the same overall average recombination rate as genes inside introgressions. This way we could isolate the specific effect of a genomic factor while eliminating the potential confounding effect of recombination. To test different genomic factors and get empirical observed p-values (Figs. S2,S3 and S4), we built 1,000 random control sets of genes outside introgressions and compared them with genes inside introgressions.

Estimating the percentage of positively selected introgressions In regions of the modern human genome where recombination is not null, there are 171 and 105 introgressed segments overlapping genes, larger than 100 kb, and at frequencies higher than 15% in Asians and Europeans, respectively. In Asians, a total of 1,702 VIPs were matched with three or more control non-VIPs in the bootstrap test. These 1702 VIPs overlap 36 introgressed segments vs. 11 expected by chance (bootstrap test observed P=0), which represents an average excess of 25 positively selected introgressions, or ~69% (25/36) of the 36 introgressed segments being positively selected. A total of 42 introgressed segments overlap VIPs that were not included in the bootstrap test because they were matched with less than three control non-VIPs. If we assume that the proportion of positive selection among these 42 introgressions was the same as among the 36 introgressions with matched VIPs, then we get an additional 29.17 positively selected introgressions (25/36 of 42). Introgressed segments with matched and unmatched VIPs combined

6 together then represent a total of 54.17 positively selected introgressions, or 32% of all the 171 large, high-frequency introgressions in Asians. If we assume that none of the introgressions with unmatched VIPs were positively selected, the 25 excess introgressions still represent 15% of all the 171 large, high-frequency introgressions in Asians. Using the same logic, a total of 26.68 or 25% of all the 105 large, high-frequency introgressions in Europeans were positively selected in response to viruses (12% if none of the introgressions with unmatched VIPs were positively selected).

Permutation scheme for the heterogeneity test If the distribution of introgressions were perfectly homogeneous among viruses, this distribution would simply match the proportions of VIPs contributed by each virus. For example, HIV VIPs contribute 26% of all VIPs, and HIV VIPs would be represented in 26% of all introgressions among all VIPs. We could therefore test the overall influence of specific viruses on introgressions simply by summing the deviations across all viruses between the observed representation of VIPs in introgressions versus their expected distribution under perfect homogeneity across viruses, by simply randomly swapping between VIPs the list of viruses associated with each VIP. We used VIPs that interact with only one virus because by definition VIPs that interact with multiple viruses are less likely to provide information about specific viruses. Note also that simple permutations do not account for differences in genomic factors between viruses as the bootstrap test does. In this case however this was not a critical issue given that we subsequently used the bootstrap test to identify which categories of viruses drove the detected heterogeneity.

7 Supplementary Text

Significantly higher excess of long and high-frequency introgressions from Neanderthals to modern humans at VIPs We found a particularly large excess of VIPS in the long, high-frequency segments of Neanderthal ancestry in both Asians and Europeans (Fig. 1A). Specifically, the excess of long (≥ 100 kb) introgressed segments was significantly higher than the excess of all (> 0 kb) segments both in Asians (hypergeometric test P=1.2*10-5) and Europeans (P=0.007). Likewise, the excess of segments at frequencies higher than 15% was higher than the excess of all segments both in Asians (P=0.05) and Europeans (P=0.025). Finally, the excess of long (≥ 100 kb) segments at frequencies higher than 15% was significantly higher than the excess of all segments (> 0 kb) at frequencies higher than 15% both in Asians (P=2.5*10-4) and Europeans (P=0.034). The excess of long (≥ 100 kb) segments at frequencies higher than 15% was also significantly higher than the excess of large segments (≥ 100 kb) at frequencies higher than 5% in both Asians (P=0.014) and Europeans (P=0.022).

Using VIPs interacting with only one RNA virus or only one DNA virus We used VIPs that interact with only one RNA virus, and VIPs that interact with only one DNA virus, for two reasons. First, by comparing VIPs with the same number of interactions with viruses (one), we avoid confusing an effect of the type of virus (RNA versus DNA) with an effect of the number of viruses with which VIPs interact. Second, VIPs already known to interact with multiple viruses are likely to interact with more, as yet unknown viruses, than VIPs known to interact with only one virus. Thus, VIPs currently only known to interact with multiple RNA viruses may nonetheless be more likely to be involved in as-yet-unknown interactions with DNA viruses. Reciprocally, VIPs known to interact with multiple DNA viruses may be more likely to also interact with RNA viruses. Consistent with this, the VIPs in our dataset that interact with two or more RNA viruses were more likely to also interact with at least one DNA virus than VIPs that interact with only one RNA virus (62.6% versus 31.8%, respectively, proportion comparison test P<10-16). Reciprocally, VIPs that interact with two or more DNA viruses were more likely to also interact with at least one RNA virus than VIPs that interact with only one DNA virus (64.8% versus 35.4%, respectively, proportion comparison test P<10-16).

8 Supplementary Figures

GC content Tajima’s D GTEx expression recombina?on FUNSEQ score CDS density DNase I density PPI number PhastCons density

Genomic factors that differ between VIPs and non-VIPs Genomic factors that differ inside versus outside Neanderthal introgressed segments within modern humans Genomic factors that differ inside versus outside modern human introgressed segments within the Altai Neanderthal Genome

Figure S1. Venn diagram of potential confounding factors included in the bootstrap test. Factors that could confound the comparison of VIPs with non-VIPs are those that differed between VIPs and non-VIPs and inside and outside introgressions.

9

Figure S2. Genomic factors inside and outside introgressions in Asian modern humans. The y-axis represents the ratio of the average of the statistic for genes inside introgressed segments to the average of the statistic for control genes outside introgressed segments. Control genes outside introgressed segments were matched with those inside introgressed segments for recombination using permutations with a target average (104 iterations, Methods). The x-axis represents either increasing introgressed segment size threshold or increasing introgressed segment frequency threshold. Ratios greater than 1 (dashed lines) indicate that the tested statistic was inside than outside introgressed segments. Black line: observed ratio. Grey area: 95% confidence interval for the ratio. Orange dots: permutation test P<0.05. Red dots: P<0.001. In addition to the total GTEx expression, we also specifically controlled for testis and lymphocyte expression because these tissues often experience elevated rates of adaptation. Moreover, in modern Asian humans, the number of protein–protein interactions is slightly lower within large segments of Neanderthal ancestry than in the rest of the genome. However, we did not add this factor to the bootstrap test because this difference was subtle and in the conservative direction (not accounting for it makes it harder to detect an excess of introgressions), with VIPs having far more protein–protein interactions than non-VIPs.

10

Figure S3. Genomic factors inside and outside introgressions in European modern humans. Legend as in Fig. S2.

11

Figure S4. Genomic factors inside and outside of introgressions in the Altai Neanderthal genome. Legend as in Fig. S2 except that we used only the increasing introgressed segment size threshold (only one Altai Neanderthal individual has been sequenced).

12

Figure S5. Excess of introgressions from Neanderthals to modern humans at LT-VIPs. Legend as in Figure 1. Note that the excess 95% confidence intervals (grey area) are larger than those in Figure 1 due to the smaller sample size of LT-VIPs (1920) relative to all VIPs (4534).

Figure S6. Excess of introgressions from modern humans to Neanderthals at LT-VIPs. Legend as in Fig. 1.

13

Figure S7. Excess of introgressions from Neanderthals to European modern humans at RNA-only and HIV-only LT-VIPs. Legend as in Fig. 3.

14

Figure S8. Excess of introgressions from Neanderthals to modern humans at IAV-only, HIV-only, and HCV-only VIPs. Legend as in Figure 1.

15

Fig S9. Insufficient power to detect a significant excess of Neanderthal introgressions in European modern humans at HCV-only VIPs. In contrast to HIV-only and virus–only VIPs, we did not detect a significant excess (bootstrap test P≤0.05) of introgressions at HCV-only VIPs. However, this could simply reflect insufficient power to detect an excess ,due to the fact that there are far fewer HCV-only VIPs than HIV-only or influenza virus–only VIPs (108 vs 320 and 374, respectively, that can be used in the bootstrap test). To evaluate the power to detect a significant excess of introgressions with only 108 VIPs, we sub-sampled ten random sets of 108 HIV-only VIPs and 108 influenza virus–only VIPs. We then ran the bootstrap test to compare each of these random sets with DNA-only VIPs, just as we did when comparing HCV-only VIPs with DNA-only VIPs. We then compared the observed excess for the random sets (blue curves for HIV, and green curves for influenza virus) with the actual excess measured for the 108 HCV-only VIPs (red curve). We used the bootstrap test with introgressions at frequencies higher than 10%, which corresponds to the frequency threshold where we measured the highest excess for HCV-only VIPs. The graph shows that the excess at HCV- only VIPs is within the range of excess for sub-sampled HIV-only and influenza virus–only VIPs, demonstrating that in the case of HCV, we did not have enough statistical power to draw a conclusion.

16 Supplementary Tables Table S1. List of VIPs. Table S1 is a separate Excel file. The first tab in the file lists all LT-VIPs with the Pubmed ID where interactions were reported and with the corresponding viruses. The second tab lists all HT-VIPs that are not also LT-VIPs. The third tab lists HT-VIPs that are also LT-VIPs. The fourth tab lists the 14 high-throughput studies that were added to the studies included in VirHostNet2.0.

Genome Virus Number Chikungunya virus CHIKV 16 Coronaviruses 91 Dengue virus DENV 128 Ebola virus EBOV 136 RNA Enterovirus 71 EV71 15 2684 Hepatitis C virus HCV 711 Human immunodeficiency virus HIV 1171 Human T-lymphotropic virus HTLV 132 IAV 1500 Respiratory syndrome virus RSV 14 West Nile virus WNV 13 Adenovirus ADV 227 Epstein-Barr virus EBV 938 Hepatitis B virus HBV 266 DNA Human cytomegalovirus HCMV 78 2547 Human papillomavirus HPV 759 Herpes simplex virus HSV 466 Kaposi Sarcoma Herpesvirus KSHV 622 Simian vacuolating virus 40 SV40 166 Vaccinia virus VACV 162 Table S2. Human viruses with more than 10 VIPs.

17

Popul- Inside Factor VIPs Non-VIPs p-value ation introgressions Outside introgressions p-value pN/pS ratio 0.53 0.84 [0.78,0.9] 0 N 0.8 0.76 [0.49,1.08] 0.62 A 0.73 0.76 [0.7,0.81] 0.14 E 0.73 0.76 [0.7,0.81] 0.2 Tajima's D AFR -1.46 -1.19 [-1.21, -1.17] 0 N -1.25 -1.22 [-1.34,-1.11] 0.36 Tajima's D ASN -1.26 -1 [-1.02,-0.97] 0 A -0.92 -0.99 [-1.02,-0.97] 0 Tajima's D EUR -1.13 -0.89 [-0.91,-0.86] 0 E -0.82 -0.86 [-0.89,-0.84] 0 FUNSEQ score AFR 0.58 0.355 [0.345,0.365] 0 N 0.37 0.4 [0.34,0.47] 0.61 FUNSEQ score ASN 0.58 0.355 [0.345,0.365] 0 A 0.43 0.4 [0.39,0.41] 0 FUNSEQ score EUR 0.578 0.353 [0.344,0.363] 0 E 0.42 0.4 [0.38,0.41] 0 CDS density 0.049 0.039 [0.037,0.04] 0 N 0.024 0.04 [0.031,0.049] 0 A 0.045 0.039 [0.037,0.04] 0 E 0.044 0.039 [0.037,0.04] 0 DNase I density 0.28 0.23 [0.227,0.238] 0 N 0.2 0.25 [0.21,0.28] 0.003 A 0.3 0.25 [0.246,0.257] 0 E 0.31 0.255 [0.25,0.262] 0 PhastCons density 0.084 0.066 [0.064,0.068] 0 N 0.052 0.07 [0.058,0.082] 0 A 0.075 0.068 [0.065,0.07] 0 E 0.074 0.068 [0.066,0.07] 0 GTEx (RPKM) 1687 684 [442,1139] 0 N 522 716 [373,1453] 0.73 A 764 746 [627,917] 0.36 E 752 761 [633,942] 0.49 PPI log(number) 1.59 0.54 [0.5,0.57] 0 N 0.59 0.78 [0.57,1.01] 0.04 A 0.75 0.76 [0.72,0.81] 0.72 E 0.74 0.76 [0.72,0.8] 0.73 GC content 0.452 0.396 [0.39,0.401] 0 N 0.422 0.407 [0.37,0.44] 0.2 A 0.466 0.408 [0.4,0.41] 0 E 0.468 0.411 [0.4,0.42] 0 Recombination (cM/Mb) 1.04 1.29 [1.24,1.33] 0 N 1.28 1.25 [1.02,1.55] 0.38 A 1.88 1.11 [1.06,1.15] 0 E 1.98 1.1 [1.05,1.14] 0 Table S3. Differences between VIPs and non -VIPs and inside and outside introgressions. The left side of the table presents VIPs versus non-VIPs, and the right side presents comparison of factors inside versus outside introgressions in the three populations (N: Neanderthals; A: Asians; E: Europeans). All introgressions with a frequency above 5% within a population were included in this analysis. Note that we use Tajima’s D and FUNSEQ from African modern human populations as a proxy for Neanderthals. CDS: coding DNA sequence. DNase I density: is the density of regulatory elements estimated by DNase I (Methods). PhastCons density is the density of conserved elements estimated by PhastCons. PPI log(number) is the log of the number of protein–protein interacting partners. GTEx (RPKM) is the total cumulated expression in RPKM across all tissues included in GTEx V6. All p-values were obtained with the permutation test with a target average matching VIPs and non-VIPs for recombination (104 iterations, see Methods). In the ‘non- VIP’s and outside introgressions columns, we provide the 95% confidence interval in addition to the average for each factor.

18 LT-VIPs vs HT-VIPs vs LT-VIPs vs non-VIPs non-VIPs HT-VIPs Factor LT-VIPs HT-VIPs non-VIPs p-value p-value p-value pN/pS ratio 0.53 0.53 0.84 0 0 0.49 Tajima's D AFR -1.45 -1.46 -1.19 0 0 0.16 Tajima's D ASN -1.26 -1.26 -1 0 0 0.31 Tajima's D EUR -1.13 -1.13 -0.89 0 0 0.16 FUNSEQ score AFR 0.65 0.53 0.355 0 0 <10-16 FUNSEQ score ASN 0.65 0.53 0.355 0 0 <10-16 FUNSEQ score EUR 0.64 0.53 0.353 0 0 <10-16 CDS density 0.047 0.05 0.039 0 0 0.12 DNase I density 0.28 0.27 0.23 0 0 0.004 PhastCons density 0.084 0.084 0.066 0 0 0.53 GTEx (RPKM) 1714 1668 684 0 0 0.02 PPI log(number) 2.14 1.19 0.54 0 0 <10-16 GC content 0.453 0.452 0.396 0 0 0.44 recombination (cM/Mb) 1.14 0.97 1.29 0 0 <10-16 Table S4. Differences between LT-VIPs, HT-VIPs, and non-VIPs. We used permutations with a target average (104 iterations, see Methods) controlling for recombination to compare LT-VIPs vs non-VIPs or HT-VIPs vs non-VIPs. We compared LT-VIPs with HT-VIPs using a two-sided Wilcoxon rank-sum test.

19

Table S5. Parameters x and y for the bootstrap test. The table provides the paramaters x and y for each bootstrap test conducted, as well as the number of VIPs with three or more matching control non-VIPs used in the test and the total number of control non-VIPs.

population VIPs non-VIPs p-value Asians 639 1274 <10-16 Europeans 697 1474 <10-16 Altai Neanderthals 406 894 <10-16 Table S6. Clustering of VIPs with each other compared to clustering of non-VIPs with each other. We compared the clustering of VIPs used in the bootstrap test with the clustering of their control non-VIPs. On average, the distance shown in kilobases in the table between each VIP and the closest other VIP is much smaller than the distance between each control non-VIP and the closest other control non-VIP. The p-values are for the Wilcoxon two-sided rank-sum test.

20 HIV-only VIPs IAV-only VIPs Ensembl gene ID HGNC symbol Ensembl gene ID HGNC symbol ENSG00000065675 PRKCQ ENSG00000156510 HKDC1 ENSG00000196611 MMP1 ENSG00000111445 RFC5 ENSG00000141480 ARRB2 ENSG00000186049 KRT73 ENSG00000128276 RFPL3 ENSG00000165891 E2F7 ENSG00000135974 C2orf49 ENSG00000061794 MRPS35 ENSG00000169908 TM4SF1 ENSG00000084072 PPIE ENSG00000137462 TLR2 ENSG00000215251 FASTKD5 ENSG00000054598 FOXC1 Table S7. HIV-only and IAV-only VIPs in high recombination, high frequency (≥15%) introgressions in Europeans.

21