, Abbreviations ABS: Antigen-binding sites; AICc: Corrected Akaike information criteria

, BEB: Bayes empirical Bayes; DRB: Exon 2 of the MHC class II DR beta

, FEL: Fixed effects likelihood; IFEL: Internal fixed effects likelihood

, MEME: Mixed effects model of evolution; MHC: Major histocompatibility complex; ML: Maximum-likelihood; mtDNA D-Loop: Mitochondrial DNA control region; PBR: Peptide-binding region

, PSS: Species-specific positively selected sites; REL: Random effects likelihood

S. Sommer, The importance of immune gene variability (MHC) in evolutionary ecology and conservation, Front Zool, vol.2, p.16, 2005.

S. B. Piertney and M. K. Oliver, The evolutionary ecology of the major histocompatibility complex, Heredity, vol.96, pp.7-21, 2006.

A. Kloch, W. Babik, A. Bajer, E. Si?ski, and J. Radwan, Effects of an MHC-DRB genotype and allele number on the load of gut parasites in the bank vole Myodes glareolus, Mol Ecol, vol.19, pp.255-65, 2010.

D. J. Penn and P. Ilmonen, Major Histocompatibility Complex (MHC), Ltd, editor. Encycl. Life Sci, 2005.

Y. Meyer-lucht, C. Otten, T. Püttker, and S. Sommer, Selection, diversity and evolutionary patterns of the MHC class II DAB in free-ranging Neotropical marsupials, BMC Genet, vol.9, p.39, 2008.

A. Castro-prieto, B. Wachter, and S. Sommer, Cheetah Paradigm Revisited: MHC diversity in the world's largest free-ranging population, Mol Biol Evol, vol.28, pp.1455-68, 2011.

J. Rivero-de-aguilar, E. Schut, S. Merino, J. Martínez, J. Komdeur et al., MHC class II B diversity in blue tits: a preliminary study, Ecol Evol, vol.3, pp.1878-89, 2013.

G. Yao, Y. Zhu, Q. Wan, and S. Fang, Major histocompatibility complex class II genetic variation in forest musk deer (Moschus berezovskii) in China, Anim Genet, vol.46, pp.535-578, 2015.

A. L. Hughes and M. Yeager, Natural selection at major histocompatibility complex loci of vertebrates, Annu Rev Genet, vol.32, pp.415-450, 1998.

P. W. Hedrick, Pathogen resistance and genetic variation at MHC loci, Evolution, vol.56, pp.1902-1910, 2002.

P. W. Hedrick, HLA-sharing, recurrent spontaneous abortion, and the genetic hypothesis, Genetics, vol.119, pp.199-204, 1988.

S. S. Ditchkoff, R. L. Lochmiller, R. E. Masters, S. R. Hoofer, and R. A. Bussche, Majorhistocompatibility-complex-associated variation in secondary sexual traits of white-tailed deer (Odocoileus virginianus): evidence for good-genes advertisement, Evolution, vol.55, pp.616-641, 2001.

C. Oosterhout, D. A. Joyce, S. M. Cummings, J. Blais, N. J. Barson et al., Balancing selection, random genetic drift, and genetic variation at the major histocompatibility complex in two wild populations of guppies (Poecilia reticulata), Evolution, vol.60, pp.2562-74, 2006.

W. Babik, M. Pabijan, J. Arntzen, D. Cogalniceanu, W. Durka et al., Long-term survival of a urodele amphibian despite depleted major histocompatibility complex variation, Mol Ecol, vol.18, pp.769-81, 2009.

M. Alcaide, On the relative roles of selection and genetic drift in shaping MHC variation, Mol Ecol, vol.19, pp.3842-3846, 2010.

C. D. Marsden, R. Woodroffe, M. Mills, J. W. Mcnutt, S. Creel et al., Spatial and temporal patterns of neutral and adaptive genetic variation in the endangered African wild dog (Lycaon pictus): Spatial and temporal diversity in wild dogs, Mol Ecol, vol.21, pp.1379-93, 2012.

I. Zeisset and T. Beebee, Drift rather than selection dominates MHC class II allelic diversity patterns at the biogeographical range scale in natterjack toads Bufo calamita, PLoS ONE, vol.9, p.100176, 2014.

F. Yu, Y. Zhu, T. Xiong, Q. Wan, and H. Zhang, Balancing selection and recombination drive genetic variation at MHC class I genes in the giant panda, Sci Bull, vol.60, pp.136-144, 2015.

M. Dionne, K. M. Miller, J. J. Dodson, F. Caron, and L. Bernatchez, Clinal variation in MHC diversity with temperature: evidence for the role of hostpathogen interaction on local adaptation in Atlantic salmon, Evol Int J Org Evol, vol.61, pp.2154-64, 2007.

T. L. Lenz, C. Eizaguirre, B. Rotter, M. Kalbe, and M. Milinski, Exploring local immunological adaptation of two stickleback ecotypes by experimental infection and transcriptome-wide digital gene expression analysis, Mol Ecol, vol.22, pp.774-86, 2013.

G. Froeschke and S. Sommer, Role of selection versus neutral processes determining genetic variation in a small mammal along a climatic gradient in southern Africa, Evol Ecol, vol.28, pp.1169-90, 2014.

C. L. Clozato, C. J. Mazzoni, N. Moraes-barros, J. S. Morgante, and S. Sommer, Spatial pattern of adaptive and neutral genetic diversity across different biomes in the lesser anteater (Tamandua tetradactyla), Ecol Evol, vol.5, pp.4932-4980, 2015.

G. Froeschke and S. Matthee, Landscape characteristics influence helminth infestations in a peri-domestic rodent-implications for possible zoonotic disease, Parasit Vectors, vol.7, p.393, 2014.

C. A. Fuller, M. A. Postava-davignon, A. West, and R. B. Rosengaus, Environmental conditions and their impact on immunocompetence and pathogen susceptibility of the Caribbean termite Nasutitermes acajutlae, Ecol Entomol, vol.36, pp.459-70, 2011.

D. Hayman, J. Pulliam, J. C. Marshall, P. M. Cryan, and C. T. Webb, Environment, host, and fungal traits predict continental-scale white-nose syndrome in bats, Sci Adv, vol.2, p.1500831, 2016.

T. Kamiya, K. O'dwyer, S. Nakagawa, and R. Poulin, Host diversity drives parasite diversity: meta-analytical insights into patterns and causal mechanisms, Ecography, vol.37, pp.689-97, 2014.

R. Poulin, Parasite biodiversity revisited: frontiers and constraints, Int J Parasitol, vol.44, pp.581-590, 2014.

J. Zukal, H. Bandouchova, T. Bartonicka, H. Berkova, V. Brack et al., White-nose syndrome fungus: a generalist pathogen of hibernating bats, PLoS One, vol.9, p.97224, 2014.

J. S. Johnson, D. M. Reeder, I. Mcmichael, . Jw, M. B. Meierhofer et al., Host, pathogen, and environmental characteristics predict white-nose syndrome mortality in captive little brown myotis (Myotis lucifugus), PLoS One, vol.9, p.112502, 2014.

D. S. Zarlenga, E. Hoberg, B. Rosenthal, S. Mattiucci, and G. Nascetti, Anthropogenics: human influence on global and genetic homogenization of parasite populations, J Parasitol, vol.100, pp.756-72, 2014.

D. J. Becker, D. G. Streicker, and S. Altizer, Linking anthropogenic resources to wildlife-pathogen dynamics: a review and meta-analysis, Ecol Lett, vol.18, pp.483-95, 2015.

B. B. Chomel, M. J. Stuckey, H. Boulouis, and A. Aguilar-setién, Zoonoses -Infect. Affect. Hum. Anim

. Dordrecht, , pp.697-714, 2015.

C. E. Brook and A. P. Dobson, Bats as "special" reservoirs for emerging zoonotic pathogens, Trends Microbiol, vol.23, pp.172-80, 2015.

H. Kupfermann, Y. Satta, N. Takahata, H. Tichy, and J. Klein, Evolution of Mhc-DRB introns: implications for the origin of primates, J Mol Evol, vol.48, pp.663-74, 1999.

J. Schad, C. C. Voigt, S. Greiner, D. Dechmann, and S. Sommer, Independent evolution of functional MHC class II DRB genes in New World bat species, Immunogenetics, vol.64, pp.535-582, 2012.

F. Mayer and A. Brunner, Non-neutral evolution of the major histocompatibility complex class II gene DRB1 in the sac-winged bat Saccopteryx bilineata, Heredity, vol.99, pp.257-64, 2007.

J. Schad, D. K. Dechmann, C. C. Voigt, and S. Sommer, MHC class II DRB diversity, selection pattern and population structure in a neotropical bat species, Noctilio albiventris, Heredity, vol.107, pp.115-141, 2011.

M. D. Real-monroy, N. Martínez-méndez, and J. Ortega, MHC-DRB Exon 2 Diversity of the Jamaican Fruit-Eating Bat (Artibeus jamaicensis) from Mexico, Acta Chiropterologica, vol.16, pp.301-315, 2014.

A. D. Richman, M. Herrera, S. Ortega-garcía, J. J. Flores-martínez, J. Arroyocabrales et al., Class II DRB polymorphism and sequence diversity in two vesper bats in the genus Myotis: DRB polymorphism in Myotis, Int J Immunogenet, vol.37, pp.401-406, 2010.

J. M. Palmer, L. K. Berkman, P. E. Marquardt, D. M. Donner, M. A. Jusino et al., Preliminary characterization of little brown bats (Myotis lucifugus) immune MHC II DRB alleles using next-generation sequencing, Peer J Prepr, vol.4, pp.1662-1663, 2016.

N. Myers, R. A. Mittermeier, C. G. Mittermeier, G. Da-fonseca, and J. Kent, Biodiversity hotspots for conservation priorities, Nature, vol.403, pp.853-861, 2000.

M. B. Fenton and N. B. Simmons, It's a bat! In: Bats: a world of science and mystery, 2015.

F. Catzeflis, M. Dewynter, and K. Pineau, Liste taxonomique commentée des chiroptères de Guyane, Le Rhinolophe, vol.19, pp.89-102, 2013.

A. Brosset, P. Charles-dominique, A. Cockle, J. Cosson, and D. Masson, Bat communities and deforestation in French Guiana, Can J Zool, vol.74, pp.1974-82, 1996.

M. Delaval and P. Charles-dominique, Edge effects on frugivorous and nectarivorous bat communities in a neotropical primary forest in French Guiana. Revue d'écologie, vol.61, pp.343-52, 2006.

B. De-thoisy, H. Bourhy, M. Delaval, D. Pontier, L. Dacheux et al., Bioecological drivers of rabies virus circulation in a Neotropical bat community, PLoS Negl Trop Dis, vol.10, p.4378, 2016.
URL : https://hal.archives-ouvertes.fr/pasteur-01429578

K. E. Jones, N. G. Patel, M. A. Levy, A. Storeygard, D. Balk et al., Global trends in emerging infectious diseases, Nature, vol.451, pp.990-993, 2008.

A. B. Pedersen and T. J. Davies, Cross-species pathogen transmission and disease emergence in primates, Ecohealth, vol.6, pp.496-508, 2010.

R. S. Sikes and W. L. Gannon, Guidelines of the American society of mammalogists for the use of wild mammals in research, J Mammal, vol.92, pp.235-53, 2011.

L. Bowen, B. M. Aldridge, F. Gulland, W. Van-bonn, R. Delong et al., Class II multiformity generated by variable MHC-DRB region configurations in the California sea lion (Zalophus californianus), Immunogenetics, vol.56, pp.12-27, 2004.

G. S. Wilkinson and A. M. Chapman, Length and sequence variation in evening bat D-loop mtDNA, Genetics, vol.128, pp.607-624, 1991.

M. Kearse, R. Moir, A. Wilson, S. Stones-havas, M. Cheung et al., Geneious Basic: An integrated and extendable desktop software platform for the organization and analysis of sequence data, Bioinformatics, vol.28, pp.1647-1656, 2012.

K. Katoh, K. Misawa, K. Kuma, and T. Miyata, MAFFT: a novel method for rapid multiple sequence alignment based on fast Fourier transform, Nucleic Acids Res, vol.30, pp.3059-66, 2002.

M. Johnson, I. Zaretskaya, Y. Raytselis, Y. Merezhuk, S. Mcginnis et al., NCBI BLAST: a better web interface, Nucleic Acids Res, vol.36, pp.5-9, 2008.

L. Kennedy, R. Ryvar, R. Gaskell, A. D. Willoughby, K. Carter et al., Sequence analysis of MHC DRB alleles in domestic cats from the United Kingdom, Immunogenetics, vol.54, pp.348-52, 2002.

P. Librado and J. Rozas, DnaSP v5: a software for comprehensive analysis of DNA polymorphism data, Bioinformatics, vol.25, pp.1451-1453, 2009.

J. Klein, R. E. Bontrop, R. L. Dawkins, H. A. Erlich, U. B. Gyllensten et al., Nomenclature for the major histocompatibility complexes of different species: a proposal, Immunogenetics, vol.31, pp.217-226, 1990.

L. Excoffier and H. Lischer, Arlequin suite ver 3.5: a new series of programs to perform population genetics analyses under Linux and Windows, Mol Ecol Resour, vol.10, pp.564-571, 2010.

J. Goudet, FSTAT, a program to estimate and test gene diversities and fixation indices

K. Tamura, G. Stecher, D. Peterson, A. Filipski, and S. Kumar, MEGA6: molecular evolutionary genetics analysis version 6.0, Mol Biol Evol, vol.30, pp.2725-2734, 2013.

S. Sawyer, Statistical tests for detecting gene conversion, Mol Biol Evol, vol.6, pp.526-564, 1989.

S. Pond, D. Posada, M. B. Gravenor, C. H. Woelk, and S. Frost, Automated phylogenetic detection of recombination using a genetic algorithm, Mol Biol Evol, vol.23, pp.1891-901, 2006.

S. Pond, S. Frost, and S. V. Muse, HyPhy: hypothesis testing using phylogenies, Bioinformatics, vol.21, pp.676-685, 2005.

W. Delport, A. Poon, S. Frost, and S. Pond, Datamonkey 2010: a suite of phylogenetic analysis tools for evolutionary biology, Bioinformatics, vol.26, pp.2455-2462, 2010.

J. H. Brown, T. S. Jardetzky, J. C. Gorga, L. J. Stern, R. G. Urban et al., Three-dimensional structure of the human class II histocompatibility antigen HLA-DR1, Nature, vol.364, pp.33-42, 1993.

T. H. Jukes and C. R. Cantor, CHAPTER 24 -Evolution of protein molecules, pp.21-132, 1969.

M. Nei and T. Gojobori, Simple methods for estimating the numbers of synonymous and nonsynonymous nucleotide substitutions, Mol Biol Evol, vol.3, pp.418-444, 1986.

G. Wlasiuk and M. W. Nachman, Adaptation and constraint at toll-like receptors in primates, Mol Biol Evol, vol.27, pp.2172-86, 2010.

Y. Z. Paml, Phylogenetic Analysis by Maximum Likelihood, Mol Biol Evol, vol.4, pp.1586-91, 2007.

Z. Yang, R. Nielsen, N. Goldman, and A. Pedersen, Codon-substitution models for heterogeneous selection pressure at amino acid sites, Genetics, vol.155, pp.431-480, 2000.

Z. Yang, Bayes empirical bayes inference of amino acid sites under positive selection, Mol Biol Evol, vol.22, pp.1107-1125, 2005.

S. Pond and S. Frost, Not so different after all: a comparison of methods for detecting amino acid sites under selection, Mol Biol Evol, vol.22, pp.1208-1230, 2005.

B. Murrell, J. O. Wertheim, S. Moola, T. Weighill, K. Scheffler et al., Detecting individual sites subject to episodic diversifying selection, PLoS Genet, vol.8, p.1002764, 2012.

J. L. Jensen, A. J. Bohonak, and S. T. Kelley, Isolation by distance, web service, BMC Genet, vol.6, p.13, 2005.

F. Rousset, Genetic differentiation and estimation of gene flow from F-Statistics under isolation by distance, Genetics, vol.145, pp.1219-1247, 1997.

J. W. Leigh and D. Bryant, popart: full-feature software for haplotype network construction, Methods Ecol Evol, vol.6, issue.9, pp.1110-1116, 2015.

A. J. Drummond, M. A. Suchard, D. Xie, and A. Rambaut, Bayesian phylogenetics with BEAUti and the BEAST 1.7, Mol Biol Evol, vol.29, pp.1969-73, 2012.

F. Ronquist and J. P. Huelsenbeck, MrBayes 3: Bayesian phylogenetic inference under mixed models, Bioinformatics, vol.19, pp.1572-1576, 2003.

S. Guindon and O. Gascuel, A simple, fast, and accurate algorithm to estimate large phylogenies by maximum likelihood, Syst Biol, vol.52, pp.696-704, 2003.

D. Darriba, G. L. Taboada, R. Doallo, and D. Posada, jModelTest 2: more models, new heuristics and parallel computing, Nat Methods, vol.9, pp.772-72, 2012.

S. Consuegra, N. Phillips, G. Gajardo, and C. G. De-leaniz, Winning the invasion roulette: escapes from fish farms increase admixture and facilitate establishment of non-native rainbow trout, Evol Appl, vol.4, pp.660-71, 2011.

C. Monzón-argüello, G. De-leaniz, C. Gajardo, G. Consuegra, and S. , Less can be more: loss of MHC functional diversity can reflect adaptation to novel conditions during fish invasions, Ecol Evol, vol.3, issue.10, pp.3359-68, 2013.

R. R. Dunn, T. J. Davies, N. C. Harris, and M. C. Gavin, Global drivers of human pathogen richness and prevalence, Proc R Soc Lond B Biol Sci, vol.14, p.20100340, 2010.

N. Gay, K. J. Olival, S. Bumrungsri, B. Siriaroonrat, M. Bourgarel et al., Parasite and viral species richness of Southeast Asian bats: Fragmentation of area distribution matters, Int J Parasitol Parasites Wildl, vol.3, pp.161-70, 2014.

J. C. Winternitz and J. P. Wares, Duplication and population dynamics shape historic patterns of selection and genetic variation at the major histocompatibility complex in rodents, Ecol Evol, vol.3, pp.1552-68, 2013.

E. Pechouskova, M. Dammhahn, M. Brameier, C. Fichtel, P. M. Kappeler et al., MHC class II variation in a rare and ecological specialist mouse lemur reveals lower allelic richness and contrasting selection patterns compared to a generalist and widespread sympatric congener, Immunogenetics, vol.67, pp.229-274, 2015.
URL : https://hal.archives-ouvertes.fr/hal-01950196

H. Schaschl, P. Wandeler, F. Suchentrunk, G. Obexer-ruff, and S. J. Goodman, Selection and recombination drive the evolution of MHC class II DRB diversity in ungulates, Heredity, vol.97, pp.427-464, 2006.

A. L. Hughes and M. Yeager, Natural selection and the evolutionary history of major histocompatibility complex loci, Front Biosci, vol.3, pp.509-525, 1998.

F. M. Martins, A. R. Templeton, A. C. Pavan, B. C. Kohlbach, and J. S. Morgante, Phylogeography of the common vampire bat (Desmodus rotundus): Marked population structure, Neotropical Pleistocene vicariance and incongruence between nuclear and mtDNA markers, BMC Evol Biol, vol.9, p.294, 2009.

A. C. Pavan, F. Martins, F. R. Santos, A. Ditchfield, and R. A. Redondo, Patterns of diversification in two species of short-tailed bats (Carollia Gray, 1838): the effects of historical fragmentation of Brazilian rainforests, Biol J Linn Soc, vol.102, pp.527-566, 2011.

D. Rojas, O. M. Warsi, and L. M. Dávalos, Bats (Chiroptera: Noctilionoidea) challenge a recent origin of extant neotropical diversity, Syst Biol, vol.65, pp.432-480, 2016.

M. Nei, X. Gu, and T. Sitnikova, Evolution by the birth-and-death process in multigene families of the vertebrate immune system, Proc Natl Acad Sci, vol.94, pp.7799-806, 1997.

A. Hughes, Balancing selection: The major histocompatibility complex, pp.54-89, 1999.

M. Carrillo-araujo, N. Ta?, R. J. Alcántara-hernández, O. Gaona, J. E. Schondube et al., Phyllostomid bat microbiome composition is associated to host phylogeny and feeding strategies, Evol Genomic Microbiol, vol.6, p.447, 2015.

J. Klein, Origin of major histocompatibility complex polymorphism: The trans-species hypothesis, Hum Immunol, vol.19, pp.155-62, 1987.

M. T??ický and M. Vinkler, Trans-species polymorphism in immune genes: general pattern or MHC-restricted phenomenon?, J Immunol Res, vol.2015, pp.1-10, 2015.

J. G. De-bellocq, F. Suchentrunk, S. Baird, and H. Schaschl, Evolutionary history of an MHC gene in two leporid species: characterisation of Mhc-DQA in the European brown hare and comparison with the European rabbit, Immunogenetics, vol.61, pp.131-175, 2008.

F. Prugnolle, A. Manica, M. Charpentier, J. F. Guégan, V. Guernier et al., Pathogen-driven selection and worldwide HLA Class I diversity, Curr Biol, vol.15, pp.1022-1029, 2005.
URL : https://hal.archives-ouvertes.fr/hal-02079377

H. C. Miller, F. Allendorf, and C. H. Daugherty, Genetic diversity and differentiation at MHC genes in island populations of tuatara (Sphenodon spp.), Mol Ecol, vol.19, pp.3894-908, 2010.

M. Fumagalli, M. Sironi, U. Pozzoli, A. Ferrer-admettla, L. Pattini et al., Signatures of environmental genetic adaptation pinpoint pathogens as the main selective pressure through human evolution, PLoS Genet, vol.7, p.1002355, 2011.