BACKGROUND
genetic diversity is an essential component of the adaptive potential of populations  <cit> .
the major histocompatibility  genes code for glycoproteins which present antigens to t-cells playing an integral role in the adaptive immune response  <cit> .
the mhc genes form a multigene family, and are known to be among the most polymorphic genes of the vertebrate genome, with most populations exhibiting a high level of mhc allelic diversity in terms of both allele number and sequence divergence  <cit> .
this multigene family has therefore become an important model of adaptive variation in natural populations of vertebrates  <cit> .
the maintenance of mhc polymorphism is generally attributed to powerful pathogen-mediated balancing selection, with gene conversion and recombination, maternal-foetal interactions and sexual selection also thought to play a role  <cit> .
since selection from local pathogens may be sufficiently strong to change mhc allele frequencies within the short evolutionary time of a few generations , we can expect local pathogen-mediated selection at the mhc to be stronger than either neutral forces  or pathogen-mediated selection at the scale of the metapopulation.
such local pathogen-mediated selection can occur if there is spatial and temporal variation in pathogen-mediated selection   <cit>  and/or local cyclical selection between host and pathogen  , and both mechanisms are thought to play a crucial role in maintaining mhc diversity.
indeed, stronger population structure at the mhc than at neutral markers have been demonstrated in numerous species that show some level of population structure at neutral markers .
however, the occurrence of local adaptation at the mhc in species with high gene flow remains to be investigated.
long-lived and dispersing species with large geographical distributions, often associated with panmixia at neutral markers, face a particular challenge: individuals are likely to encounter during their life heterogeneous environmental conditions, each associated with distinct pathogen communities  <cit> .
indeed, species that are migratory  <cit>  and have large geographical distributions  <cit>  are known to have more diverse parasitic communities.
as a consequence of encountering more diverse parasitic communities, migratory or long-distance dispersing species may be under more intense pathogen mediated selection than resident species.
in support of the latter, a recent comparative study has found that the rate of non-synonymous nucleotide substitution across the antigen binding regions of the mhc class iib  is significantly higher in migratory species  <cit> .
the latter study also found that colonial species had a higher rate of non-synonymous nucleotide substitution, which suggests that the high contact between conspecifics in colonial species leads to elevated transmission rates and therefore increased balancing selection of mhc genes  <cit> .
however, the high gene flow of high dispersing species is likely to disrupt local adaptation and other pathogen-mediated balancing selection mechanisms are likely to be maintaining mhc diversity.
for instance, frequency-dependent selection may be operating across breeding sites in panmictic species.
another non-mutually exclusive hypothesis, which could also be operating across breeding sites in panmictic species, is the “overdominant heterozygote advantage” hypothesis.
the latter proposes that mhc heterozygotes will be fitter than the fittest mhc homozygote because they will be able to recognize a greater diversity of parasites  <cit> .
higher mhc allelic diversity can thus be expected in colonial and long-distance dispersing species with little or no spatial differentiation between breeding sites than locally adapted resident species, based on the idea that higher pathogen-mediated balancing selection is operating across breeding sites in panmictic species.
in addition, such long-range dispersing species should have no mhc population structure since gene flow prevents local adaptation.
to investigate mhc diversity and population structure in a long-lived colonial species with high gene flow, we used data from gillingham et al.
<cit> , which genotyped mhc class iib exon  <dig> of  <dig> greater flamingos across four breeding colonies spread across the entire range of the species in the mediterranean basin .
non-random patterns of natal and breeding dispersal between breeding colonies has been shown by capture-mark-recapture studies  <cit> , which may favour local divergent adaptations  <cit> .
however, molecular data on  <dig> microsatellite loci and two mitochondrial markers were consistent with strong gene flow and a panmictic genetic structure of the population at the scale of the mediterranean basin  <cit> .fig.
<dig> pies representing mhc class iib exon  <dig> allele frequencies for alleles with a frequency of at least 10% within the four studied breeding colonies of the greater flamingos across the mediterranean basin .
each colour represents a different allele
methods
samples
samples were collected between  <dig> and  <dig>  at four breeding colonies across the mediterranean basin breeding range : garaet ezzemoul, northern algeria ; camargue, southern france ; fuente de piedra, southern spain ; and gediz delta, western turkey .table  <dig> summary statistics of mhc class iib exon  <dig> variation for the four breeding colonies of greater flamingos
n
m
s
n: number of individuals.
m: number of alleles.
π : population nucleotide diversity and standard deviation.
aadist : mean amino acid divergence within individual and standard error of the mean.
aadistselect : mean amino acid divergence within individual for sites under positive selection according to gillingham et al.
<cit>  and standard error of the mean.
apd : average per cent difference and standard error of the mean
mhc class iib exon <dig> genotyping
details of mhc class iib exon  <dig> genotyping can be found in gillingham et al.
<cit>  which genotyped the individuals used in this study using barcoded pcrs in  <dig> titanium pyrosequencing run.
briefly, 163–165 bp of the 267–270 bp of the mhc class iib exon  <dig> was amplified which code for nine positively selected codon sites  <cit> .
assignment of barcoded sequences to individual barcodes and allele validation was carried out with the aid of sequence sorter & amplicon explorer   <cit> .
we used a slightly modified version of sommer et al.’s  <cit>  pipeline and allele validation followed the following rules: 1) all reads whose length suggested a shift in reading frame during sequencing were discarded; 2) all variants that were represented only once in the run  were assumed to be artefacts; 3) we assumed that artefactual variants should occur at lower frequencies than true variants and we used the conservative t
<dig> threshold recommended by galan et al.
<cit>  with f
ij of 4% or above to assign reads as alleles; 4) all sequences that had a 1– <dig> base pair difference to one of the validated alleles within the sample were assumed to be artefacts; 5) all sequences that had more than a  <dig> base pair difference from validated alleles and were also validated as alleles if they were classified as alleles in other individuals; 6) the remaining sequences that had more than a  <dig> base pair difference from a validated allele were validated as alleles only if their frequency exceeded any artefact; 7) we assumed that chimeras were always present together with the true alleles from which they were formed and in lower frequency.
accordingly chimeras were easily identified when reads were aligned within individuals in sesame and were discarded if in lower frequency than source validated alleles.
gillingham et al.
<cit>  reported a maximum of  <dig> alleles per individual suggesting two loci for this marker  <cit> .
of the  <dig> individuals genotyped, we used in subsequent analyses the  <dig> for which the authors achieved a  <dig> % confidence in allele calling  .
based on  <dig> duplicates and  <dig> triplicates gillingham et al.
<cit>  found a repeatability of 100% in allele calling.
population differentiation analyses
first, we estimated nucleotide diversity and number of segregating sites using dnasp version  <dig>  <cit> .
second, we measured mhc population differentiation.
there are many measures of population differentiation and ways of partitioning genetic variance, with constant debate and research among population geneticists about which measure is the best to use in which circumstance .
multilocus genes such as the mhc add the additional complication that their complex nature often violates assumptions required to apply several of these methods .
a further complication arises when alleles cannot be assigned to loci, as is often the case for mhc datasets in non-model organisms, preventing the identification of heterozygote and homozygote genotypes.
as a result, allele frequencies cannot be accurately estimated as the frequency of common alleles is underestimated and that of rare alleles overestimated.
we therefore chose to rely on the metric rho  devised by ronfort et al.
<cit>  for genotype data with multiple alleles per locus in each individual as found in polyploidy species.
the rho statistic is independent of both the ploidy level and the amount of within-individual diversity.
this statistic has also recently been demonstrated by simulation to be less biased when assumptions of diploid inheritance are violated than nei’s gst  <cit> , g″st  <cit>  and jost’s d  <cit> .
we estimated the rho statistic in conjunction with traditional fst  <cit>  to measure mhc population differentiation using the spagedi software  <cit> .
we carried out this analysis on individual mhc class iib exon  <dig> alleles based on the full length nucleotide sequence, allelic lineages based on codon sites which were shown to be under positive selection by gillingham et al.
<cit>   and allelic lineages based on the full length translated amino acid sequences.
when using markers that are highly diverse such as the mhc, many alleles may only be sampled once, even when sample sizes are fairly large, and, in extreme cases, analyses based solely on allele frequencies might be largely ineffective  <cit> .
therefore, we also used two other methods to detect genetic differentiation between populations.
the first is hudson’s  <cit>  nearest-neighbour statistic  which measures how often the “nearest neighbours” of sequences  of each sequence) are within the same geographical locality.
sequence similarity is determined as the number of base differences per sequence.
for a dataset of sequences collected from n individuals , s
nn is estimated as: snn=∑j=1nxj/n
where, x is the number of nearest neighbour belonging to the same geographical locality divided by the total number of nearest neighbour for sequence j. hence, if x
j is equal to  <dig>  then all nearest sequences belonged to individuals sampled within the same geographical locality; and, conversely if x
j is equal to  <dig>  all nearest sequences were from a different geographical locality.
in a pairwise comparison between populations, a s
nn that is significantly greater than  <dig>  therefore indicates evidence of some population structure, as does a global s
nn which is significantly greater than  <dig>  when simultaneously comparing four populations.
the s
nn statistic was estimated using the popgenome package  <cit>  in r and significant departure from predicted values given panmixia were estimated by permutation using  <dig> reshuffling in r  <cit> .
we carried out this analysis on both full sequences and on sequences of codon sites which were shown to be under positive selection by gillingham et al.
<cit> .
the second statistic that we used which does not solely rely on allele frequency was the average percentage difference  which has previously been used in studies investigating mhc population structure  <cit> .
we calculated this statistic as described by yuhki & o’brien  <cit> .
specifically, apd estimates the average percentage in the number of alleles not shared between two individuals within a population as: apdk=∑i=1ndab/aa+abi/n
where for population k, n is the number of pairwise comparisons, d
ab is the number of alleles not shared between individual a and individual b, a
a and a
b are the total number of unique alleles in individuals a and b. apd therefore measures within-population genetic variation.
we tested whether between breeding colonies apd was significantly different from within breeding colonies apd by permutation using  <dig>  reshuffling.
apd calculations were performed using r  <cit> .
finally, we estimated mhc heterozygosity with three metrics that did not require the assignment of mhc alleles to loci :  the number of mhc alleles per individual;  the mean amino acid allele divergence within an individual over the entire translated sequences , and  the mean amino acid allele divergence within an individual over sites found to be under positive selection by gillingham et al.
<cit>  .
we obtained the proportion of base pair differences between sequences required to compute aadist and aadistselect using mega  <dig>  <cit> .
we tested differences in the number of mhc alleles per individual between breeding colonies using a generalized linear model  with a poisson distribution and a log link.
for testing differences in aadist and aadistselect between breeding colonies we used a glm model with a binomial distribution  and a logit link function.
all glms were fitted in r  <cit> .
microsatellite genotyping and heterozygosity correlation with mhc class iib exon 2
the  <dig> samples used for greater flamingo mhc class iib exon  <dig> differentiation in this study were previously selected for microsatellite genotyping by geraci et al.
<cit>  for  <dig> loci: pra <dig>  prd <dig>  prd <dig>  prd <dig>  prd <dig>  prd <dig>  pra <dig>  pra <dig>  pra <dig>  prc <dig>  prd <dig>  prd <dig> and prd <dig>  nine individuals were excluded from this analysis because fewer than  <dig> microsatellite loci were successfully genotyped for these individuals.
in order to compare mhc differentiation to differentiation at neutral markers we estimated f
st  <cit>  for microsatellite data differentiation as calculated by the spagedi software  <cit> .
comparison with other avian non-passerine species of mhc class iib exon  <dig> allelic diversity
in order to compare allelic diversity of greater flamingos with other non-passerine species we searched the literature of other species for which at least  <dig> individuals were genotyped.
we recorded the number of individuals genotyped, the number of loci found  and the number of alleles reported.
we also calculated the proportion of alleles per individual and the proportion of alleles per individual and loci.
we excluded passerines from our study for the following reasons:  the evolution and structure of passerine mhc is completely different from other avian species  <cit> , with passerines having a much higher number of copy number variation  suggesting that macroevolutionary patterns  may lead to very different signals of balancing selection between passerines and other birds  <cit>  and  passerines have a large number of pseudogenes which is likely to bias true functional mhc allele diversity and render hazardous a comparison in allelic diversity between passerines and other birds, who tend to have only 2– <dig> functional loci .
for example the collared flycatcher, ficedula albicollis, appears to have at least  <dig> functional mhc class iib loci but also appears to have at least  <dig> mhc class iib loci that are pseudogenes  <cit> .
however since alleles cannot be assigned to loci in almost all mhc passerine studies, alleles that appear functional  may in fact be in non-functional loci and vice versa  <cit> .table  <dig> number of alleles for mhc class iib exon <dig> relative to the number of loci and individuals genotyped in non-passerine birds reported in the literature with  <dig> or more individuals genotyped, showing species name , number of individuals genotyped in the study, maximum number of loci based on the maximum number alleles found within an individual in the population, number of alleles found in the study, the ratio between number of alleles and number of individuals, the ratio between number of alleles, number of individuals and number of loci, whether the species is migratory and/or long distance disperser and the citation of the study
phoenicopterus roseus
falco naumanni
spheniscus magellanicus
fulica atra
gallinago media
tympanuchus cupido
oceanodroma leucorhoa
egretta eulophotes
perdix perdix
bubo blakistoni
lagopus lagopus
tympanuchus cupido
anot migratory in the studied population but makes nomadic dispersal movements according to changing water levels and seasonal rainfall.
also fully migratory in other parts of the species distribution
RESULTS
as reported in gillingham et al.
<cit> , we detected a very high diversity of mhc class iib exon  <dig> with  <dig> alleles at two loci among  <dig> individuals .
the mean number of alleles per individual was  <dig>  , and  <dig> individuals had  <dig> alleles ,  <dig> individuals had  <dig> ,  <dig> individuals had  <dig> , and  <dig> individual had  <dig> .
the number of alleles identified per population was between  <dig> and  <dig> identified alleles .
out of  <dig> alleles identified from nucleotide sequences across the four breeding sites,  <dig> were private alleles , however all of these alleles were rare and only present within either a single individual  or two individuals .
the  <dig> alleles from nucleotides sequences translate into  <dig> different amino acid sequences.
when comparing with other non-passerine avian species, allelic diversity was higher than all species that had been sampled more than greater flamingos  except for the eurasian coot .
when rarefying coot sample size to  <dig>  median number of alleles was  <dig> .
when rarefying the flamingo dataset  to the sample of the two species in table  <dig> with a smaller dataset, greater flamingo allelic diversity remained much greater than those species .
there was either little or no differentiation  between breeding colonies regardless of whether fst or rho was investigated  and global rho and fst values were very small and not significantly different from  <dig> .
similar results were found when investigating alleles called from sequences of sites under positive selection  and when investigating sequences from amino acid sequences .table  <dig> pairwise rho statistic  <cit>  of mhc class iib exon  <dig> for alleles called from full nucleotide sequences  and alleles called from nucleotide sequences of sites under positive section  ; pairwise f
st statistic  <cit>  of mhc class iib exon  <dig> for alleles called from full nucleotide sequences  and alleles called from nucleotide sequences of sites under positive section  ; pairwise s
nn statistic  <cit>  of mhc class iib exon  <dig> for full length nucleotide sequences  and for nucleotide sequences of sites under positive section   and, pairwise f
st values for  <dig> microsatellite loci  for four breeding colonies of greater flamingos across the mediterranean basin
b. f
c. s
d. f
note that all the rho and f
st statistic values are close to zero .
none of the differentiation values were significantly different from  <dig> regardless of the statistic  or the marker investigated .
similarly none of the s
nn statistic values were significantly different from  <dig> , the predicted value of panmixia between two populations
further supporting no population structure at the mhc class iib exon  <dig>  global s
nn did not significantly deviate from the predicted value for a panmictic population of  <dig>  when analysing full length sequences  and sequences known to be under positive selection .
similarly pairwise comparison between breeding colonies never significantly deviated from the predicted panmictic value of  <dig>  .
average percentage difference  was very high suggesting very high within-population mhc variation .
furthermore, apd within colony was not significantly different from apd between breeding colonies  and a similar result was found when analysing apd from amino acid sequences .
the mean number of alleles per individual , mean aadist  and mean aadistselect  were not significantly different between breeding colonies.
discussion
to the best of our knowledge, the mhc allelic diversity in greater flamingos is one of the highest reported so far  relative to the number of individuals genotyped in non-passerine birds, despite the fact that they appear to harbour only two mhc class iib loci .
only coots have slightly higher mhc allelic diversity than greater flamingos, with  <dig> alleles  compared to the flamingo’s  <dig> when rarefied to the same sample size, although coots harbour three loci.
furthermore, the fact that allele calling is based on 163–165 bp of the 267–270 bp exon  <dig> sequence suggests that we may be slightly underestimating allelic diversity since alleles may differ in regions outside the amplified segment.
the variation we found in the number of alleles per individual can be explained by either variation in loci copy number as reported in certain bird species e.g.
<cit>  or balancing selection maintaining identical alleles across duplicated loci e.g.
<cit> .
alternatively, we cannot exclude that our design of primers was not optimal and may have led to some allele dropout.
indeed designing optimal primers without any allele dropout is notoriously difficult to achieve in non-model organisms  <cit> .
however the latter is unlikely to bias population differentiation analyses since the same primers were used across all individuals and populations.
passerines frequently appear to also present a very high diversity of mhc alleles  but this generally seems to be due to their high number of mhc gene copies  <cit> .
furthermore due to the high number of pseudogenes reported in passerines, unbiased functional allelic diversity of these species is unclear and difficult to quantify.
two other examples of non-passerine bird species with a high allelic mhc diversity are the eurasian coot, fulica atra,  <cit>   and the lesser kestrel falco naumanni  <cit>  .
like greater flamingos, the eurasian coot has a large geographical distribution and form large populations  <cit> , whilst the colonial lesser kestrel is a long distance migratory species and forms small populations  <cit> .
one possibility is that high gene flow across breeding sites in the mediterranean population of greater flamingos is relatively recent and that range-wide mhc diversity arose through local adaptation.
however, we believe the latter to be highly unlikely for the following reason.
geraci et al.
<cit>  have shown that flamingo populations have undergone a bottleneck followed by rapid growth and expansion, with the average time since expansion being estimated to be  <dig> 421 yr , suggesting that high gene flow in this species is not recent.
a possible increase in gene flow remains possible since over the last three centuries wetlands and favourable nesting places for flamingos have become scarce  <cit> .
however, there is no reason to believe that the species was less nomadic in the ancient past than today.
our study therefore supports that in greater flamingos, although high dispersal rates disrupts the local adaptation mechanisms that are predicted to maintain mhc diversity, pathogen-mediated balancing selection at the scale of the large and panmictic mediterranean population is sufficiently strong to generate high mhc allelic diversity.
however, a greater characterisation of mhc diversity of migratory and non-migratory bird species than is currently available in the literature, followed by a meta-analysis, would be required to formally test whether ecology and life history traits of species  predicts population wide mhc allelic diversity.
theory predicts that local adaptation and divergent selection between populations should be favoured when gene flow is at an intermediate level  <cit> .
such intermediate levels of gene flow may occur between breeding sites of colonial breeding species if philopatric behaviour is coupled with regular dispersal  <cit> .
in lesser kestrels, pathogen-mediated balancing selection at the local scale of the population appears to be maintaining high allelic diversity   <cit> .
a similar result was reported in the migratory but philopatric loggerhead sea turtles  which showed distinct mhc differentiation between breeding colonies, despite close proximity between sites   <cit> .
however, evidence that local adaptation can occur despite high gene flow has only been reported in a few studies of marine fish .
it is also worth noting that we could find no evidence of temporal variation in mhc allele frequency.
the greater flamingo colony in france was sampled 9– <dig> years prior to other breeding colonies in our study.
the slow reproductive rate of flamingos means that this represents approximately a difference of a single generation with other breeding colonies  <cit> .
indeed, pradel et al.
<cit>  demonstrated that at age  <dig>  virtually all individuals had attempted to breed at least once and about 90% of them have already done so at age  <dig>  thus our results tentatively suggests that allele frequency does not significantly shift during this short time period as reported in species with faster reproductive rates  <cit> .
however more generations from the same geographical locality are needed to confirm the latter.
nonetheless, in the case of greater flamingos in the mediterranean basin, given the lack of spatial mhc population structure, high allelic mhc diversity appears to be maintained by overdominant heterozygote advantage and/or population wide frequency dependent selection rather than local fluctuating selection and/or local variation in frequency dependent selection.
the lack of locally adapted alleles may be explained by gene swamping, whereby specific local polymorphism is lost because gene flow is larger than selection  <cit> .
furthermore, for local population structure at the mhc to occur there needs to be strong spatial variation in parasite communities  <cit> .
while greater flamingos occupy a large diversity of wetland habitats across the mediterranean, the parasite communities that flamingos encounter remain by and large unknown.
however, a strong driver of mhc class iib are likely to be the multiple species of helminths that greater flamingos are known to be parasitized by  <cit> , with artemia species consumed by greater flamingos known to be the intermediate host  <cit> .
indeed parasitic helminths are known to cause significant pathology in birds which can result in lower fat content  <cit> , increased chick mortality  <cit>  and lower reproductive success  <cit> .
furthermore, migratory species are known to harbour a larger diversity of nematodes  <cit> , in particular species with wide geographic distributions and using multiple aquatic habitats  <cit>  such as is the case for greater flamingos.
it is therefore possible that flamingos do encounter a strong variation of parasites at different sites in the mediterranean, but significant breeding dispersal  <cit>  leads to sufficiently strong gene flow to disrupt any possible local adaptation.
in this case, dispersal may also enable greater flamingos to escape from locally prevalent pathogens that are highly adapted to the hosts.
alternatively, the high dispersal rates of flamingos may act to facilitate the dispersal of parasites themselves, and, hence, homogenise parasite communities across the mediterranean.
furthermore it has been suggested that saline wetlands may harbour fewer parasites than freshwater wetlands  <cit> .
for example, mendes et al.
<cit>  found that species of wading birds inhabiting saline habitats had fewer blood parasite infections than species from freshwater habitats.
indeed, despite the screening of chicks, studies have never detected blood parasites in greater flamingos in the mediterranean  <cit> .
regarding helminths, a comparative study by poulin  <cit>  using data from  <dig> parasitic species of cestodes, trematodes and nematodes in  <dig> bird species found that a positive correlation between heavy infections in local host populations and the ability to exploit many host species.
the latter is suggestive that helminth infections that affect most fitness may be widespread rather than locally constrained.
therefore, the diversity and heterogeneity of parasites encountered by flamingos may be comparatively low and, in turn, the cost of dispersing, in terms of encountering new parasites that they are not immune to, may also be comparatively lower than for inland species.
indeed, the high dispersal rates encountered in greater flamingos are on par with the ones found in marine colonial birds that tend to have a higher dispersal rates than other migratory avian species .
in the absence of local variation in parasite communities, the benefits of dispersing, such as finding alternative breeding and feeding sites to avoid high competition at the natal site , may outweigh the costs.
CONCLUSIONS
regardless of whether parasites vary across time and space in flamingos, the very high diversity of mhc class iib alleles observed in this study suggests strong pathogen-mediated balancing selection at the scale of the whole population.
given the lack of local mhc population structure, mhc diversity appears to be maintained by overdominant heterozygote advantage and/or population wide frequency dependent selection rather than local fluctuating selection and/or local variation in frequency dependent selection.
further understanding of how pathogens vary across space and time will be crucial to further elucidate the mechanisms maintaining mhc diversity in large panmictic populations with high dispersal rates  <cit> .
additional file
additional file 1: table s <dig>  pairwise rho statistic  <cit>   and pairwise f
st statistic  <cit>  of mhc class iib exon  <dig> for alleles called from amino acid sequences for four breeding colonies of greater flamingos across the mediterranean basin.

 genetic diversity is an essential component of the adaptive potential of populations. the major histocompatibility genes code for glycoproteins which present antigens to t-cells playing an integral role in the adaptive immune response. the mhc genes form a multigene family, and are known to be among the most polymorphic genes of the vertebrate genome, with most populations exhibiting a high level of mhc allelic diversity in terms of both allele number and sequence divergence. this multigene family has therefore become an important model of adaptive variation in natural populations of vertebrates. the maintenance of mhc polymorphism is generally attributed to powerful pathogen-mediated balancing selection, with gene conversion and recombination, maternal-foetal interactions and sexual selection also thought to play a role. since selection from local pathogens may be sufficiently strong to change mhc allele frequencies within the short evolutionary time of a few generations, we can expect local pathogen-mediated selection at the mhc to be stronger than either neutral forces or pathogen-mediated selection at the scale of the metapopulation. such local pathogen-mediated selection can occur if there is spatial and temporal variation in pathogen-mediated selection and/or local cyclical selection between host and pathogen, and both mechanisms are thought to play a crucial role in maintaining mhc diversity. indeed, stronger population structure at the mhc than at neutral markers have been demonstrated in numerous species that show some level of population structure at neutral markers. however, the occurrence of local adaptation at the mhc in species with high gene flow remains to be investigated. long-lived and dispersing species with large geographical distributions, often associated with panmixia at neutral markers, face a particular challenge: individuals are likely to encounter during their life heterogeneous environmental conditions, each associated with distinct pathogen communities. indeed, species that are migratory and have large geographical distributions are known to have more diverse parasitic communities. as a consequence of encountering more diverse parasitic communities, migratory or long-distance dispersing species may be under more intense pathogen mediated selection than resident species. in support of the latter, a recent comparative study has found that the rate of non-synonymous nucleotide substitution across the antigen binding regions of the mhc class iib is significantly higher in migratory species. the latter study also found that colonial species had a higher rate of non-synonymous nucleotide substitution, which suggests that the high contact between conspecifics in colonial species leads to elevated transmission rates and therefore increased balancing selection of mhc genes. however, the high gene flow of high dispersing species is likely to disrupt local adaptation and other pathogen-mediated balancing selection mechanisms are likely to be maintaining mhc diversity. for instance, frequency-dependent selection may be operating across breeding sites in panmictic species. another non-mutually exclusive hypothesis, which could also be operating across breeding sites in panmictic species, is the “overdominant heterozygote advantage” hypothesis. the latter proposes that mhc heterozygotes will be fitter than the fittest mhc homozygote because they will be able to recognize a greater diversity of parasites. higher mhc allelic diversity can thus be expected in colonial and long-distance dispersing species with little or no spatial differentiation between breeding sites than locally adapted resident species, based on the idea that higher pathogen-mediated balancing selection is operating across breeding sites in panmictic species. in addition, such long-range dispersing species should have no mhc population structure since gene flow prevents local adaptation. to investigate mhc diversity and population structure in a long-lived colonial species with high gene flow, we used data from gillingham et al., which genotyped mhc class iib exon of greater flamingos across four breeding colonies spread across the entire range of the species in the mediterranean basin. non-random patterns of natal and breeding dispersal between breeding colonies has been shown by capture-mark-recapture studies, which may favour local divergent adaptations. however, molecular data on microsatellite loci and two mitochondrial markers were consistent with strong gene flow and a panmictic genetic structure of the population at the scale of the mediterranean basin.fig. pies representing mhc class iib exon allele frequencies for alleles with a frequency of at least 10% within the four studied breeding colonies of the greater flamingos across the mediterranean basin. each colour represents a different allele methods samples samples were collected between and at four breeding colonies across the mediterranean basin breeding range: garaet ezzemoul, northern algeria; camargue, southern france; fuente de piedra, southern spain; and gediz delta, western turkey.table summary statistics of mhc class iib exon variation for the four breeding colonies of greater flamingos n m s n: number of individuals. m: number of alleles. π: population nucleotide diversity and standard deviation. aadist: mean amino acid divergence within individual and standard error of the mean. aadistselect: mean amino acid divergence within individual for sites under positive selection according to gillingham et al. and standard error of the mean. apd: average per cent difference and standard error of the mean mhc class iib exon genotyping details of mhc class iib exon genotyping can be found in gillingham et al. which genotyped the individuals used in this study using barcoded pcrs in titanium pyrosequencing run. briefly, 163–165 bp of the 267–270 bp of the mhc class iib exon was amplified which code for nine positively selected codon sites. assignment of barcoded sequences to individual barcodes and allele validation was carried out with the aid of sequence sorter & amplicon explorer. we used a slightly modified version of sommer et al.’s pipeline and allele validation followed the following rules: 1) all reads whose length suggested a shift in reading frame during sequencing were discarded; 2) all variants that were represented only once in the run were assumed to be artefacts; 3) we assumed that artefactual variants should occur at lower frequencies than true variants and we used the conservative t threshold recommended by galan et al. with f ij of 4% or above to assign reads as alleles; 4) all sequences that had a 1– base pair difference to one of the validated alleles within the sample were assumed to be artefacts; 5) all sequences that had more than a base pair difference from validated alleles and were also validated as alleles if they were classified as alleles in other individuals; 6) the remaining sequences that had more than a base pair difference from a validated allele were validated as alleles only if their frequency exceeded any artefact; 7) we assumed that chimeras were always present together with the true alleles from which they were formed and in lower frequency. accordingly chimeras were easily identified when reads were aligned within individuals in sesame and were discarded if in lower frequency than source validated alleles. gillingham et al. reported a maximum of alleles per individual suggesting two loci for this marker. of the individuals genotyped, we used in subsequent analyses the for which the authors achieved a % confidence in allele calling. based on duplicates and triplicates gillingham et al. found a repeatability of 100% in allele calling. population differentiation analyses first, we estimated nucleotide diversity and number of segregating sites using dnasp version. second, we measured mhc population differentiation. there are many measures of population differentiation and ways of partitioning genetic variance, with constant debate and research among population geneticists about which measure is the best to use in which circumstance. multilocus genes such as the mhc add the additional complication that their complex nature often violates assumptions required to apply several of these methods. a further complication arises when alleles cannot be assigned to loci, as is often the case for mhc datasets in non-model organisms, preventing the identification of heterozygote and homozygote genotypes. as a result, allele frequencies cannot be accurately estimated as the frequency of common alleles is underestimated and that of rare alleles overestimated. we therefore chose to rely on the metric rho devised by ronfort et al. for genotype data with multiple alleles per locus in each individual as found in polyploidy species. the rho statistic is independent of both the ploidy level and the amount of within-individual diversity. this statistic has also recently been demonstrated by simulation to be less biased when assumptions of diploid inheritance are violated than nei’s gst, g″st and jost’s d. we estimated the rho statistic in conjunction with traditional fst to measure mhc population differentiation using the spagedi software. we carried out this analysis on individual mhc class iib exon alleles based on the full length nucleotide sequence, allelic lineages based on codon sites which were shown to be under positive selection by gillingham et al. and allelic lineages based on the full length translated amino acid sequences. when using markers that are highly diverse such as the mhc, many alleles may only be sampled once, even when sample sizes are fairly large, and, in extreme cases, analyses based solely on allele frequencies might be largely ineffective. therefore, we also used two other methods to detect genetic differentiation between populations. the first is hudson’s nearest-neighbour statistic which measures how often the “nearest neighbours” of sequences of each sequence) are within the same geographical locality. sequence similarity is determined as the number of base differences per sequence. for a dataset of sequences collected from n individuals, s nn is estimated as: snn=∑j=1nxj/n where, x is the number of nearest neighbour belonging to the same geographical locality divided by the total number of nearest neighbour for sequence j. hence, if x j is equal to then all nearest sequences belonged to individuals sampled within the same geographical locality; and, conversely if x j is equal to all nearest sequences were from a different geographical locality. in a pairwise comparison between populations, a s nn that is significantly greater than therefore indicates evidence of some population structure, as does a global s nn which is significantly greater than when simultaneously comparing four populations. the s nn statistic was estimated using the popgenome package in r and significant departure from predicted values given panmixia were estimated by permutation using reshuffling in r. we carried out this analysis on both full sequences and on sequences of codon sites which were shown to be under positive selection by gillingham et al.. the second statistic that we used which does not solely rely on allele frequency was the average percentage difference which has previously been used in studies investigating mhc population structure. we calculated this statistic as described by yuhki & o’brien. specifically, apd estimates the average percentage in the number of alleles not shared between two individuals within a population as: apdk=∑i=1ndab/aa+abi/n where for population k, n is the number of pairwise comparisons, d ab is the number of alleles not shared between individual a and individual b, a a and a b are the total number of unique alleles in individuals a and b. apd therefore measures within-population genetic variation. we tested whether between breeding colonies apd was significantly different from within breeding colonies apd by permutation using reshuffling. apd calculations were performed using r. finally, we estimated mhc heterozygosity with three metrics that did not require the assignment of mhc alleles to loci: the number of mhc alleles per individual; the mean amino acid allele divergence within an individual over the entire translated sequences, and the mean amino acid allele divergence within an individual over sites found to be under positive selection by gillingham et al.. we obtained the proportion of base pair differences between sequences required to compute aadist and aadistselect using mega. we tested differences in the number of mhc alleles per individual between breeding colonies using a generalized linear model with a poisson distribution and a log link. for testing differences in aadist and aadistselect between breeding colonies we used a glm model with a binomial distribution and a logit link function. all glms were fitted in r. microsatellite genotyping and heterozygosity correlation with mhc class iib exon 2 the samples used for greater flamingo mhc class iib exon differentiation in this study were previously selected for microsatellite genotyping by geraci et al. for loci: pra prd prd prd prd prd pra pra pra prc prd prd and prd nine individuals were excluded from this analysis because fewer than microsatellite loci were successfully genotyped for these individuals. in order to compare mhc differentiation to differentiation at neutral markers we estimated f st for microsatellite data differentiation as calculated by the spagedi software. comparison with other avian non-passerine species of mhc class iib exon allelic diversity in order to compare allelic diversity of greater flamingos with other non-passerine species we searched the literature of other species for which at least individuals were genotyped. we recorded the number of individuals genotyped, the number of loci found and the number of alleles reported. we also calculated the proportion of alleles per individual and the proportion of alleles per individual and loci. we excluded passerines from our study for the following reasons: the evolution and structure of passerine mhc is completely different from other avian species, with passerines having a much higher number of copy number variation suggesting that macroevolutionary patterns may lead to very different signals of balancing selection between passerines and other birds and passerines have a large number of pseudogenes which is likely to bias true functional mhc allele diversity and render hazardous a comparison in allelic diversity between passerines and other birds, who tend to have only 2– functional loci. for example the collared flycatcher, ficedula albicollis, appears to have at least functional mhc class iib loci but also appears to have at least mhc class iib loci that are pseudogenes. however since alleles cannot be assigned to loci in almost all mhc passerine studies, alleles that appear functional may in fact be in non-functional loci and vice versa.table number of alleles for mhc class iib exon relative to the number of loci and individuals genotyped in non-passerine birds reported in the literature with or more individuals genotyped, showing species name, number of individuals genotyped in the study, maximum number of loci based on the maximum number alleles found within an individual in the population, number of alleles found in the study, the ratio between number of alleles and number of individuals, the ratio between number of alleles, number of individuals and number of loci, whether the species is migratory and/or long distance disperser and the citation of the study phoenicopterus roseus falco naumanni spheniscus magellanicus fulica atra gallinago media tympanuchus cupido oceanodroma leucorhoa egretta eulophotes perdix perdix bubo blakistoni lagopus lagopus tympanuchus cupido anot migratory in the studied population but makes nomadic dispersal movements according to changing water levels and seasonal rainfall. also fully migratory in other parts of the species distribution  as reported in gillingham et al., we detected a very high diversity of mhc class iib exon with alleles at two loci among individuals. the mean number of alleles per individual was, and individuals had alleles, individuals had, individuals had, and individual had. the number of alleles identified per population was between and identified alleles. out of alleles identified from nucleotide sequences across the four breeding sites, were private alleles, however all of these alleles were rare and only present within either a single individual or two individuals. the alleles from nucleotides sequences translate into different amino acid sequences. when comparing with other non-passerine avian species, allelic diversity was higher than all species that had been sampled more than greater flamingos except for the eurasian coot. when rarefying coot sample size to median number of alleles was. when rarefying the flamingo dataset to the sample of the two species in table  with a smaller dataset, greater flamingo allelic diversity remained much greater than those species. there was either little or no differentiation between breeding colonies regardless of whether fst or rho was investigated and global rho and fst values were very small and not significantly different from. similar results were found when investigating alleles called from sequences of sites under positive selection and when investigating sequences from amino acid sequences.table pairwise rho statistic of mhc class iib exon for alleles called from full nucleotide sequences and alleles called from nucleotide sequences of sites under positive section; pairwise f st statistic of mhc class iib exon for alleles called from full nucleotide sequences and alleles called from nucleotide sequences of sites under positive section; pairwise s nn statistic of mhc class iib exon for full length nucleotide sequences and for nucleotide sequences of sites under positive section and, pairwise f st values for microsatellite loci for four breeding colonies of greater flamingos across the mediterranean basin b. f c. s d. f note that all the rho and f st statistic values are close to zero. none of the differentiation values were significantly different from regardless of the statistic or the marker investigated. similarly none of the s nn statistic values were significantly different from, the predicted value of panmixia between two populations further supporting no population structure at the mhc class iib exon global s nn did not significantly deviate from the predicted value for a panmictic population of when analysing full length sequences and sequences known to be under positive selection. similarly pairwise comparison between breeding colonies never significantly deviated from the predicted panmictic value of. average percentage difference was very high suggesting very high within-population mhc variation. furthermore, apd within colony was not significantly different from apd between breeding colonies and a similar result was found when analysing apd from amino acid sequences. the mean number of alleles per individual, mean aadist and mean aadistselect were not significantly different between breeding colonies. discussion to the best of our knowledge, the mhc allelic diversity in greater flamingos is one of the highest reported so far relative to the number of individuals genotyped in non-passerine birds, despite the fact that they appear to harbour only two mhc class iib loci. only coots have slightly higher mhc allelic diversity than greater flamingos, with alleles compared to the flamingo’s when rarefied to the same sample size, although coots harbour three loci. furthermore, the fact that allele calling is based on 163–165 bp of the 267–270 bp exon sequence suggests that we may be slightly underestimating allelic diversity since alleles may differ in regions outside the amplified segment. the variation we found in the number of alleles per individual can be explained by either variation in loci copy number as reported in certain bird species e.g. or balancing selection maintaining identical alleles across duplicated loci e.g.. alternatively, we cannot exclude that our design of primers was not optimal and may have led to some allele dropout. indeed designing optimal primers without any allele dropout is notoriously difficult to achieve in non-model organisms. however the latter is unlikely to bias population differentiation analyses since the same primers were used across all individuals and populations. passerines frequently appear to also present a very high diversity of mhc alleles but this generally seems to be due to their high number of mhc gene copies. furthermore due to the high number of pseudogenes reported in passerines, unbiased functional allelic diversity of these species is unclear and difficult to quantify. two other examples of non-passerine bird species with a high allelic mhc diversity are the eurasian coot, fulica atra, and the lesser kestrel falco naumanni. like greater flamingos, the eurasian coot has a large geographical distribution and form large populations, whilst the colonial lesser kestrel is a long distance migratory species and forms small populations. one possibility is that high gene flow across breeding sites in the mediterranean population of greater flamingos is relatively recent and that range-wide mhc diversity arose through local adaptation. however, we believe the latter to be highly unlikely for the following reason. geraci et al. have shown that flamingo populations have undergone a bottleneck followed by rapid growth and expansion, with the average time since expansion being estimated to be 421 yr, suggesting that high gene flow in this species is not recent. a possible increase in gene flow remains possible since over the last three centuries wetlands and favourable nesting places for flamingos have become scarce. however, there is no reason to believe that the species was less nomadic in the ancient past than today. our study therefore supports that in greater flamingos, although high dispersal rates disrupts the local adaptation mechanisms that are predicted to maintain mhc diversity, pathogen-mediated balancing selection at the scale of the large and panmictic mediterranean population is sufficiently strong to generate high mhc allelic diversity. however, a greater characterisation of mhc diversity of migratory and non-migratory bird species than is currently available in the literature, followed by a meta-analysis, would be required to formally test whether ecology and life history traits of species predicts population wide mhc allelic diversity. theory predicts that local adaptation and divergent selection between populations should be favoured when gene flow is at an intermediate level. such intermediate levels of gene flow may occur between breeding sites of colonial breeding species if philopatric behaviour is coupled with regular dispersal. in lesser kestrels, pathogen-mediated balancing selection at the local scale of the population appears to be maintaining high allelic diversity. a similar result was reported in the migratory but philopatric loggerhead sea turtles which showed distinct mhc differentiation between breeding colonies, despite close proximity between sites. however, evidence that local adaptation can occur despite high gene flow has only been reported in a few studies of marine fish. it is also worth noting that we could find no evidence of temporal variation in mhc allele frequency. the greater flamingo colony in france was sampled 9– years prior to other breeding colonies in our study. the slow reproductive rate of flamingos means that this represents approximately a difference of a single generation with other breeding colonies. indeed, pradel et al. demonstrated that at age virtually all individuals had attempted to breed at least once and about 90% of them have already done so at age thus our results tentatively suggests that allele frequency does not significantly shift during this short time period as reported in species with faster reproductive rates. however more generations from the same geographical locality are needed to confirm the latter. nonetheless, in the case of greater flamingos in the mediterranean basin, given the lack of spatial mhc population structure, high allelic mhc diversity appears to be maintained by overdominant heterozygote advantage and/or population wide frequency dependent selection rather than local fluctuating selection and/or local variation in frequency dependent selection. the lack of locally adapted alleles may be explained by gene swamping, whereby specific local polymorphism is lost because gene flow is larger than selection. furthermore, for local population structure at the mhc to occur there needs to be strong spatial variation in parasite communities. while greater flamingos occupy a large diversity of wetland habitats across the mediterranean, the parasite communities that flamingos encounter remain by and large unknown. however, a strong driver of mhc class iib are likely to be the multiple species of helminths that greater flamingos are known to be parasitized by, with artemia species consumed by greater flamingos known to be the intermediate host. indeed parasitic helminths are known to cause significant pathology in birds which can result in lower fat content, increased chick mortality and lower reproductive success. furthermore, migratory species are known to harbour a larger diversity of nematodes, in particular species with wide geographic distributions and using multiple aquatic habitats such as is the case for greater flamingos. it is therefore possible that flamingos do encounter a strong variation of parasites at different sites in the mediterranean, but significant breeding dispersal leads to sufficiently strong gene flow to disrupt any possible local adaptation. in this case, dispersal may also enable greater flamingos to escape from locally prevalent pathogens that are highly adapted to the hosts. alternatively, the high dispersal rates of flamingos may act to facilitate the dispersal of parasites themselves, and, hence, homogenise parasite communities across the mediterranean. furthermore it has been suggested that saline wetlands may harbour fewer parasites than freshwater wetlands. for example, mendes et al. found that species of wading birds inhabiting saline habitats had fewer blood parasite infections than species from freshwater habitats. indeed, despite the screening of chicks, studies have never detected blood parasites in greater flamingos in the mediterranean. regarding helminths, a comparative study by poulin using data from parasitic species of cestodes, trematodes and nematodes in bird species found that a positive correlation between heavy infections in local host populations and the ability to exploit many host species. the latter is suggestive that helminth infections that affect most fitness may be widespread rather than locally constrained. therefore, the diversity and heterogeneity of parasites encountered by flamingos may be comparatively low and, in turn, the cost of dispersing, in terms of encountering new parasites that they are not immune to, may also be comparatively lower than for inland species. indeed, the high dispersal rates encountered in greater flamingos are on par with the ones found in marine colonial birds that tend to have a higher dispersal rates than other migratory avian species. in the absence of local variation in parasite communities, the benefits of dispersing, such as finding alternative breeding and feeding sites to avoid high competition at the natal site, may outweigh the costs.  regardless of whether parasites vary across time and space in flamingos, the very high diversity of mhc class iib alleles observed in this study suggests strong pathogen-mediated balancing selection at the scale of the whole population. given the lack of local mhc population structure, mhc diversity appears to be maintained by overdominant heterozygote advantage and/or population wide frequency dependent selection rather than local fluctuating selection and/or local variation in frequency dependent selection. further understanding of how pathogens vary across space and time will be crucial to further elucidate the mechanisms maintaining mhc diversity in large panmictic populations with high dispersal rates. additional file additional file 1: table s pairwise rho statistic and pairwise f st statistic of mhc class iib exon for alleles called from amino acid sequences for four breeding colonies of greater flamingos across the mediterranean basin. 
on the one hand high gene flow can disrupt local adaptation in species with high dispersal rates, on the other hand such species are much more likely to experience spatial variation in pathogen pressure, suggesting that there may be intense pathogen mediated selection pressure operating across breeding sites in panmictic species. selective pressure from pathogens is thought to shape the allelic diversity of major histocompatibility complex genes in vertebrates. in particular, both local adaptation to pathogens and gene flow are thought to explain a large part of the intraspecific variation observed in mhc allelic diversity. we used the greater flamingo, phoenicopterus roseus, a long-lived colonial bird showing a homogeneous genetic structure of neutral markers at the scale of the mediterranean region, to test the prediction that higher mhc allelic diversity with no population structure should occur in large panmictic populations of long-distance dispersing birds than in other resident species. we assessed the level of allelic diversity at the mhc class iib exon from individuals born in four different breeding colonies of greater flamingo in the mediterranean region. we found one of the highest allelic diversity of any non-passerine avian species investigated so far relative to the number of individuals and loci genotyped. mhc genesallelic diversitypathogen-mediated balancing selectionlocal adaptationgreater flamingoshttp://dx.doi.org/ /501100007185totalconseil régional de bourgognemava foundationhttp://dx.doi.org/ /501100004794centre national de la recherche scientifiquegerman science foundationdfg gi 1065/2-1issue-copyright-statement© the author 2017 to date, however, evidence that adaptation to locally prevalent pathogens maintains mhc variation is limited to species with limited dispersal and, hence, reduced gene flow. our results suggest that local adaptation at mhc class iib in greater flamingos is constrained by high gene flow and high mhc diversity appears to be maintained by population wide pathogen-mediated selection rather than local pathogen-mediated selection. such pathogen mediated selection pressure operating across breeding sites should therefore be sufficient to maintain high mhc diversity in high dispersing species in the absence of local adaptation mechanisms. further understanding of how pathogens vary across space and time will be crucial to further elucidate the mechanisms maintaining mhc diversity in species with large panmictic populations and high dispersal rates. there was no evidence of population structure between the four major mediterranean breeding colonies.
 selective pressure from pathogens is thought to shape the allelic diversity of major histocompatibility complex genes in vertebrates. in particular, both local adaptation to pathogens and gene flow are thought to explain a large part of the intraspecific variation observed in mhc allelic diversity. to date, however, evidence that adaptation to locally prevalent pathogens maintains mhc variation is limited to species with limited dispersal and, hence, reduced gene flow. on the one hand high gene flow can disrupt local adaptation in species with high dispersal rates, on the other hand such species are much more likely to experience spatial variation in pathogen pressure, suggesting that there may be intense pathogen mediated selection pressure operating across breeding sites in panmictic species. such pathogen mediated selection pressure operating across breeding sites should therefore be sufficient to maintain high mhc diversity in high dispersing species in the absence of local adaptation mechanisms. we used the greater flamingo, phoenicopterus roseus, a long-lived colonial bird showing a homogeneous genetic structure of neutral markers at the scale of the mediterranean region, to test the prediction that higher mhc allelic diversity with no population structure should occur in large panmictic populations of long-distance dispersing birds than in other resident species.  we assessed the level of allelic diversity at the mhc class iib exon from individuals born in four different breeding colonies of greater flamingo in the mediterranean region. we found one of the highest allelic diversity of any non-passerine avian species investigated so far relative to the number of individuals and loci genotyped. there was no evidence of population structure between the four major mediterranean breeding colonies.  our results suggest that local adaptation at mhc class iib in greater flamingos is constrained by high gene flow and high mhc diversity appears to be maintained by population wide pathogen-mediated selection rather than local pathogen-mediated selection. further understanding of how pathogens vary across space and time will be crucial to further elucidate the mechanisms maintaining mhc diversity in species with large panmictic populations and high dispersal rates. electronic supplementary material the online version of this article contains supplementary material, which is available to authorized users. keywords mhc genesallelic diversitypathogen-mediated balancing selectionlocal adaptationgreater flamingoshttp://dx.doi.org/ /501100007185totalconseil régional de bourgognemava foundationhttp://dx.doi.org/ /501100004794centre national de la recherche scientifiquegerman science foundationdfg gi 1065/2-1issue-copyright-statement© the author 2017 