BACKGROUND
in populations inhabiting heterogeneous environments adaptive trait divergence in the absence of gene flow is both predicted by theoretical models  <cit>  and supported by a large number of studies demonstrating a generally negative relationship between levels of population connectivity and the degree of adaptive divergence in the traits under study  <cit> .
this phenomenon is centred on the prediction that gene flow limits adaptive trait variation by homogenising gene pools that would otherwise diverge in response to selection under different ecological regimes  <cit> .
the relationship is, however, clearly more subtle than this because empirical evidence also supports extensive adaptive variation in the presence of gene flow e.g.
<cit>  highlighting the role of local selection gradients across different environments.
if the selection gradient is steep enough to reduce immigrant fitness the homogenising effects of gene flow on trait variation are likely to be minimised  <cit> .
alternatively, if selection is weak and there are minimal costs to immigration, even nominal gene flow could constrain the evolution of trait variation and lineage divergence  <cit> .
undoubtedly there is a complex and dynamic relationship between selection, fitness and gene flow, but the interaction among these factors together with the role of trait plasticity is seldom considered in studies of adaptive population variation  <cit> .
phenotypic plasticity, environmentally mediated phenotypic changes without changes in allele frequency  <cit> , has traditionally been viewed as a minor evolutionary process.
this is so largely because environmentally induced phenotypic change does not influence the genes that an individual transfers to its offspring  <cit> ; but see  <cit>  for comment on the role of heritable epigenetic variation on phenotype evolution.
divergent selection cannot therefore act on genetic variants in a population and consequently phenotypic plasticity is thought to minimise rather than enhance selection  <cit> .
recently, however, there has been renewed interest in elucidating the role of plasticity in promoting diversification within and between populations and species  <cit> .
this renaissance is due, in part, to the recognition that selection for adaptive plasticity can occur if it promotes successful dispersal and survival in different environments, increasing the potential for adaptive diversification under divergent selection regimes  <cit> .
high gene flow between heterogeneous environments may then favour the evolution of increased phenotypic plasticity, over adaptive genetic divergence, because it would promote adaptation to new conditions within one or two generations  <cit> .
plasticity may in turn promote gene flow if dispersers are not selected against in their new environments  <cit> .
plasticity would allow a population or individuals to persist long enough in a new environment for selection to bring about the evolution of adaptation to the new environment by acting on the standing genetic variation among individuals  <cit> .
geographic variation in sensory traits i.e.
traits used by organisms to perceive and respond to information about their environment  <cit>  is well documented  <cit>  and directly impacts on individual fitness e.g.
via their role in resource acquisition and species and mate recognition  <cit> .
acoustic signalling for general communication as well as mate and food acquisition  <cit>  is used by a range of organisms including fish  <cit> , insects  <cit> , anurans  <cit> , birds  <cit>  and mammals  <cit> .
extensive geographic variation in acoustic signals is common, and the role of both phenotypic plasticity  <cit>  and sexually mediated selection have been implicated in promoting the evolution of population divergence  <cit> .
in bats  ultrasonic acoustic signalling in the form of echolocation is used for spatial orientation, prey detection and communication  <cit> .
bats echolocate over a wide range of frequencies  <cit>  and the trait can be highly flexible both within  <cit>  and between species  <cit> .
this flexibility has been attributed to numerous factors including differences in foraging habitat  <cit> , prey size  <cit> , variation in body size  <cit> , age  <cit>  and sexual dimorphism  <cit> .
in the horseshoe  and leaf-nosed  bats a unique echolocation system has evolved that functions in both resource acquisition and intraspecific communication  <cit> .
the signal design of horseshoe bats is characterised by long, high duty cycle calls which have a prominent constant frequency  component preceded and followed by a brief frequency modulated  component .
during flight individuals compensate for doppler shifts induced by their own flight speed by lowering the frequency of their emitted pulse.
this ensures that the returning echo falls within the narrow frequency range of their acoustic fovea–a region of the cochlea with sharply tuned neurons sensitive to a unique frequency called the reference frequency  <cit> .
horseshoe bats are able to couple the frequency of the returning echo to their reference frequency independently of the size of doppler shifts with extreme accuracy  <cit> .
the reference frequency is always 150- <dig> hz higher than the frequency these bats emit when stationary, often referred to as the ‘resting frequency’ .
horseshoe bats typically forage for insect prey in narrow-space  environments either on the wing , or from a perch   <cit> .
in both cases, the long cf component of their echolocation calls generate echoes from the flapping wings of flying insects that are characterised by amplitude and frequency modulations resulting in acoustic glints against a background of unmodulated echoes from background vegetation.
thus, the long cf calls emitted at a high duty cycle, together with doppler shift compensation and the auditory fovea allow horseshoe bats to detect fluttering insects in cluttered space .
in horseshoe bats the rf is largely genetically determined  <cit> .
however the peak frequency of juveniles is also partially influenced by that of their mothers  <cit>  and the fine tuning of the frequency of the acoustic fovea of young horseshoe bats may have a learnt component via mother-to-offspring transmission  <cit> .
several recent studies investigating sensory variation in rhinolophid and hipposiderid bats  <cit>  attribute observed variation predominantly to differences in diet  <cit>  and environmental humidity .
such variation may be correlated with morphological features directly involved in echolocation production  <cit>  and reception  <cit> .
sensory divergence may however also be an indirect result of adaptive changes in body size to prevailing environmental conditions .
among sympatric species call divergence may have evolved under regimes of social selection where character displacement maintains private bandwidths for intraspecific communication .
within a particular community, the echolocation frequencies used by any one species may therefore also be a consequence of the frequencies used by other species in that community  <cit> .
lastly, the physical structure of habitats  can impose significant constraints on the range of frequencies bats use to successfully navigate within their environment and to detect prey, purely because of the physics of sound and sound transmission.
low frequency calls with longer wavelengths enable long-range detection of prey or other targets and are generally associated with open habitats.
conversely, higher frequency calls are more directional and provide greater resolution of targets, at least for bats using low duty cycle echolocation, at short detection ranges typical of highly cluttered habitats  <cit> .
the foraging habitat hypothesis  <cit>  thus proposes that habitat clutter influences echolocation frequency and predicts that a gradient of increasing vegetation clutter selects for a gradient of increasing echolocation frequency.
most studies generally assume that observed variation in rf results from micro-evolutionary processes selecting for calls that are sharply tuned to the narrowband range of the acoustic fovea   <cit> .
recent evidence, however, suggests that horseshoe bats and other high duty cycle echolocating bats exhibit some degree of temporal flexibility in rfs and associated changes in cochlear tuning  <cit>  in response to both conspecifics  <cit>  and local ambient noise  <cit> .
more recently neutral evolutionary processes have become a focus of research centred on understanding echolocation divergence in bats  <cit> .
using the theoretical framework of population genetics, phylogeography and phylogenetics, the effects of gene flow and genetic drift on divergence in peak frequencies between divergent lineages has revealed relationships between echolocation divergence and e.g.
female philopatry  <cit>  geographic distance  <cit> , and palaeoclimatic lineage divergence  <cit> .
here we use multiple data sets to investigate variation in echolocation frequency across the geographic range of the south african endemic cape horseshoe bat, rhinolophus capensis.
we assess echolocation variation within a neutral evolutionary framework to  quantify the extent to which population genetic structure and gene flow contribute to variation in echolocation frequencies, and  using a model-based approach explore the roles of habitat structure  and humidity  in echolocation divergence.
our analyses reveal significant sensory diversification among r. capensis populations in the presence of extensive historic gene flow, and we discuss how selection, plasticity and gene flow may interact to characterize patterns of trait variation in this system.
methods
regional sampling of echolocation frequency and genetic variation
we measured echolocation parameters and collected tissue biopsies from populations across the distribution  of rhinolophus capensis.
eleven populations were sampled across several major biomes in the region  including desert at the extreme northern edge, through succulent karoo and fynbos in the centre of the distribution, and finally to forest and areas of transition between fynbos and neighbouring biomes  at the eastern limit of its range .
the geographic range of r. capensis is characterised by two distinct environmental gradients that influence regional rainfall patterns.
the first is a latitudinal gradient of increasing aridity northwards.
the second is a longitudinal seasonality shift from a predominantly winter to an aseasonal rainfall regime from west to east, and another shift to a summer rainfall regime at the extreme eastern edge of the distribution of the species  <cit>  .
the resulting rainfall gradients translate into a clear habitat gradient from relatively open and sparse habitats in the north and west , to more cluttered habitats in the east .
bats were captured at their roosts during the day with hand nets, or as they emerged from roosts at dusk using mist nets and/or harp traps.
the age  and sex of each bat was recorded; juveniles were distinguished from adults by the presence of cartilaginous epiphyseal plates in their finger bones  <cit>  and excluded from subsequent analyses.
individual body mass was measured.
seasonal and diurnal variation in body mass was controlled for by excluding pregnant females, sampling only in the southern hemisphere spring and summer and measuring bats only after their gut was emptied by keeping them overnight in soft cotton bags.
echolocation calls were recorded from hand held bats positioned  <dig> cm in front of an avisoft ultrasound gate  <dig>  microphone connected to a laptop running avisoft saslab pro software .
resting peak frequency  was recorded from hand-held individuals because it eliminates differences in peak frequency that may be due to doppler shift compensation during flight  <cit> .
rf is a reliable indicator of the reference frequency because the difference between the reference and resting frequency is stable in horseshoe bats   <cit>  furthermore, when hunting from a perch rhinolophids emit their resting frequencies  <cit> .
recordings were slowed down by ten times and analysed using batsound pro software  with a sampling rate of  <dig> khz.
we measured the peak frequency   of the dominant second harmonic of the cf component determined from the fast fourier transformation power spectrum  with a hanning window.
to identify the typical echolocation parameters for each bat we calculated means of call duration, rf, lowest frequency of the fm component, bandwidth and inter-pulse interval from 5- <dig> high quality calls .
we chose the rf from an original call sequence that was most similar to the calculated mean parameters for all subsequent analyses.
thus the ‘true’ rf instead of a constructed statistical value was used in our analyses  <cit> .
we also collected a tissue sample for dna extraction and sequencing from most individuals for which we had echolocation recordings.
biopsy punches  were taken from the wing or tail membrane following  <cit> .
membranes were illuminated to ensure that no blood vessels were ruptured during sampling and tissues were stored in molecular grade  ethanol at room temperature in the field, and at 4°c until extraction.
our capture, handling and tissue collection methods were approved by the science faculty animal ethics committee  of the university of cape town.
total dna was extracted using a dneasy blood and tissue kit  and stored at 4°c.
we amplified a  <dig> base pair  fragment of the mitochondrial d-loop using the primers n <dig>  and e  from  <cit>  and  <cit>  respectively.
pcr conditions consisted of an initial cycle of 94°c for  <dig> minutes, followed by  <dig> cycles of 94°c, 50-55°c and 72°c each for  <dig> seconds and a final step of 72°c for  <dig> minutes.
pcr products were checked on 1% agrose and gel purified using a wizard sv gel and pcr clean-up system .
samples were sequenced in both directions using bigdye  <dig>  chemistry on an abi  <dig> xl dna analyzer .
chromatograms were edited and aligned using bioedit v <dig> .
<dig>   <cit> .
for each population the number of unique haplotypes, haplotype diversity  and nucleotide diversity   <cit>  were calculated using dnasp v <dig> .
<dig>  <cit> .
all unique haplotype sequences obtained in this study were deposited in genbank .
influence of non-genetic factors on echolocation divergence
we conducted a kolmogorov-smirnov test for normality, levene’s test for homogeneity of variances and regressed means against standard deviations for all grouping levels to ensure the data met the assumptions of subsequent analyses.
to quantify variation in rf within and between populations we calculated the mean ± standard deviation  and the coefficient of variation  of each population.
various intrinsic  and extrinsic  factors can influence the evolution of geographic variation in acoustic signals across a species range.
to tease apart the effects of these factors on rf divergence we first conducted a general linear model  with rf as the dependent variable and population, sex and their interaction as categorical predictors.
we then used spss  to conduct linear mixed models  performed with type iii sums of squares to determine the ecological factors which best predict rf in r. capensis.
mixed models are robust to unbalanced designs and thus data from single-sex populations could be included  <cit> .
lmm’s estimate the effects of both fixed and random factors to models of data that are normally distributed  <cit> .
our glm results revealed significant differences between populations and sexes, but no significant interaction between them .
population and sex were therefore included as random factors to control for spatial clustering of samples and intrinsic sexual differences in rf  <cit> .
fixed factors included biome category and body mass.
even though the presence or absence of congeneric species may also influence rf variation across different populations of horseshoe bats, we were unable to explicitly test the acoustic communication hypothesis for several reasons.
first, the range of rhinolophus damarensis , only overlaps with that of r. capensis at ls  and therefore its presence cannot be replicated across populations.
second, the presence of r. damarensis and the desert biome category are collinear and thus cannot be included in the same model  <cit> .
lastly, with the exception of the ls site, r. capensis co-occurs with a larger congeneric species, rhinolophus clivosus, over much of its range.
five geographical lineages of r. clivosus corresponding to previously described sub-species based on genetic, acoustic and morphological differences have been identified, and of these, r. capensis overlaps with two lineages which echolocate between  <dig>  and  <dig>  khz  <cit>  .
at these frequencies the rf of r. clivosus is unlikely to influence the rf of r. capensis and r. clivosus was therefore excluded from our analyses.
we employed a model selection approach based on akaike’s information criterion  to determine which model, out of a range of candidate models, best explained rf divergence in r. capensis <cit> .
the model with the lowest aic value was considered the most parsimonious and the difference in aic scores  were calculated to determine the likelihood that a given model was the best model relative to other candidate models  <cit> .
a Δi value of zero indicates the best fit model; values up to two indicate models with substantial empirical support; values between four and seven indicate less support and models with values >  <dig> have essentially no support  <cit> .
we also used akaike weights  to calculate the probability that a given model is the best among a candidate set of models.
thus, the best model has the lowest Δi and highest wi <cit> .
once the best fit model was identified, we estimated the effects of each factor level on rf variation in r. capensis using the restricted maximum likelihood method.
then, to determine the importance of each variable included in the best model, we calculated the summed akaike weight  for all models containing that particular variable.
the variable with the largest w+ is likely the most important variable in the model  <cit> .
our model selection results led us to explore the influence of habitat structure  and body size on rf variation in greater detail.
the normalized difference vegetation index  was used as a measure of vegetation cover.
ndvi is a suitable measure because it provides an estimate of above ground primary productivity  <cit>  and it has been shown to be associated with a wide range of vegetation properties including photosynthetic activity  <cit>  vegetation cover  <cit>  and vegetation biomass  <cit> .
thus ndvi is commonly used to link vegetation dynamics to various aspects of animal ecology .
ndvi is a measure of the density of chlorophyll contained in vegetation and it is calculated as /, where nir is the near-infrared light, and red is the visible-red light, reflected by vegetation and captured by the satellite.
the values of ndvi range from - <dig> to  <dig>  where negative values correspond to an absence of vegetation.
green and/or dense vegetation has high red absorption together with high nir, leading to high, positive ndvi values.
in contrast, sparse vegetation absorbs substantially more nir, leading to lower ndvi values  <cit> .
bare soils, snow and cloud have ndvi values close to zero  <cit> .
we used the expedited moderate resolution imaging spectroradiometer  vegetation indices dataset from nasa, which provides the maximum value for ndvi images for composites over a 10-day period at a resolution of  <dig> m from the year  <dig> to present.
average ndvi values from a  <dig> km radius around each sampling site were extracted and compiled in arcgis  <dig> .
<dig> .
because echolocation frequency scales negatively with body size in horseshoe bats  <cit> , variation in body size could cause concomitant changes in rf.
thus, to test whether rf variation is associated with differences in ndvi while controlling for the potential influence of body size, we used spss to conduct a hierarchal multiple regression analysis .
the first step of a hmra is to add the independent variable that you wish to control for .
the second step examines the relationship between an independent  and dependent variable  while controlling for the effect of the first independent variable.
we limited this analysis to males  and evaluated the correlations between rf, body mass and ndvi as well as the change in the correlation coefficients between the model including body size and the model including ndvi but controlling for body size.
we also investigated whether there was a negative relationship between relative humidity and mean rf as predicted by the humidity hypothesis  <cit> .
relative humidity  data for each sampling site were obtained from the literature or from the nearest weather stations and provided by the south african weather service.
like most other rhinolophids, r. capensis forage in or near highly cluttered habitats  <cit> .
while the long cf portion of their echolocation calls allow the detection of fluttering prey against structurally complex backgrounds like dense vegetation  <cit> , differences in vegetation cover between sampling sites could still influence the sound transmission properties of the echolocation call frequency used in each habitat.
to better understand the effects of vegetation cover on variation in echolocation frequencies we calculated the mean detection distances for prey and vertical background targets  for each population according to the method developed in stilz and schnitzler  <cit> .
this method depends on the dynamic range and frequency of the sonar system, local atmospheric conditions and target type.
the dynamic range was calculated as the difference between peak intensity  at 1m  and the auditory threshold of the bat .
we assumed the different populations had similar dynamic ranges.
the different prey size categories tested in  <cit>  were derived from houston et al.
<cit>  and included small, medium and large categories–all within the size range of prey consumed by r. capensis .
mean minimum temperature  data for each population were obtained from the nearest weather stations and provided by the south african weather service.
spatial population structure and patterns of gene flow
geographic variation in phenotypic traits may be a consequence of neutral evolutionary processes, particularly when dispersal distances result in a pattern of predominantly nearest-neighbour gene exchange  <cit> .
to better understand the role of random genetic drift in the evolution of rf variation we used a number of statistical approaches to  determine the degree to which genetic variation is spatially structured in r. capensis and  quantify levels of historic gene flow among populations.
we first explored the evolutionary relationships among mtdna haplotypes to determine whether observed relationships reflected either the geographic sampling of populations or specific biome discontinuities across the range of the species by constructing a neighbour-net network in splitstree v <dig> .
<dig>  <cit>  using uncorrected ‘p’ distances.
network analysis allows reticulations among branches and is highly suitable for analysing evolutionary relationships among populations  <cit> .
the spatial clustering of samples and distribution of genetic variation were also investigated using baps v <dig>   <cit>  and analysis of molecular variance  in genalex v <dig>   <cit> .
the amova quantified partitioning of genetic variation within and among populations and biomes.
the significance of variance components and Φst  were estimated with  <dig> random permutations.
to test for the presence of discrete evolutionary lineages we estimated the most probable number of genetic clusters  among populations using a spatially explicit bayesian clustering mixture model in baps.
we performed spatial clustering for groups with k ranging from 4- <dig>  the analysis was repeated ten times for each maximum k and the log marginal likelihood value for each genetic partition was evaluated.
to obtain estimates of historic gene flow among populations we used a maximum likelihood method based on the coalescent implemented in migrate-n v <dig> .
<dig>  <cit> ; migrate uses an equilibrium model that estimates migration rates averaged across the coalescent history and simultaneously estimates Θ, the effective population size scaled by mutation rate where Θ = neμ, together with pairwise migration rates summarised as m = m/μ, where m is the effective immigration rate per generation between populations.
banding data from european horseshoe bats reveal generally small home ranges where maximum dispersal distances rarely exceed 100km over the course of an individual’s life time  <cit> .
if similar, dispersal in r. capensis likely occurs over relatively short distances.
thus we estimated Θ and m using a custom designed migration matrix where migration was only allowed between neighbouring populations.
populations separated by large geographic distances were not directly connected except in cases where unique haplotypes were shared.
starting values for all parameter estimates were initially obtained using fst <cit>  and the following search parameters were used:  <dig> short chains with  <dig>  <dig> gene trees sampled and  <dig> trees recorded; three long chains with  <dig> million sampled trees of which  <dig>  <dig> were recorded.
the first  <dig>  <dig> trees were discarded as burn-in and a static heating scheme with six temperatures and a swapping interval of one was used.
the results were averaged over five replicate runs.
comparing echolocation divergence and genetic distance
genetic divergence among populations is dependent on both the degree of physical isolation and levels of connectivity between them  <cit> .
to test whether genetic and rf differentiation is associated with geographic isolation  we used mantel  <cit>  and partial mantel tests to explore the relationships between genetic structure, rf divergence and geographic distance  <cit> .
matrix correlations were calculated in genalex v <dig>   <cit>  and xlstat  with  <dig> random permutations.
the three matrices analysed were pairwise geographic distances  calculated as straight line distances from geographic coordinates using the program geographic distance matrix generator v <dig> .
<dig> ; genetic distance using slatkin’s linearized Φst <cit>  and rf differences  among populations.
log-transformed geographic distances were regressed against genetic distance and peak frequency difference.
our partial mantel test determined whether rf difference was associated with genetic distance while controlling for the effect of geographic distance .
RESULTS
effects of morphology, sex and ecology on rf divergence
we measured the rf of  <dig> individuals across multiple biomes  and observed a clinal increase in mean rf across the distribution of r. capensis ranging from  <dig>  khz  in the west, to  <dig>  khz  in the east .
resting frequencies differed significantly among populations  with the exception of kny which used similar frequencies to hdh and dhc .
sex significantly influenced echolocation variation within populations with females emitting higher frequencies than males .
however, we detected no significant interaction between sex and population , suggesting that the degree of sexual dimorphism in rf was identical across populations.
the cv of call frequencies for each population was low and at most 1% .
mean  body mass and mean  resting frequencies  for populations  and sexes are shown.
male only populations were zpk, dhl and bkl.
an equal number of males and females were used to calculate the mean population mass and rf.
multiple biomes occur at bav, tf and sph .
the most parsimonious model explaining variation in rf included the factors biome category  and body mass  of which the former was the most important variable in the model  .
generally, bats from the desert biome use significantly lower frequencies than succulent karoo bats .
also, bats inhabiting the forest biome or regions comprised of multiple biomes use significantly higher frequencies  because long–range detection is not an advantage in such habitats.
in the first stage of our hmra, body size significantly influenced rf  but it only explained 12% of the variation in rf .
bats from ls use relatively lower rfs given their body size compared to other sampled populations.
the inclusion of ndvi in the second stage of the regression model significantly increased the proportion of variance explained in the model , with ndvi accounting for 80% of the variation in rf  after controlling for the effect of body size .
i
the most parsimonious model is highlighted in bold.
df
the best-fit linear mixed effects model describes resting frequency variation as a function of biome and body mass in r. capensis.
+reference parameter.
*centred variable.
we also found no relationship between relative humidity and rf  but we did discover significant differences in detection distances for large prey and vegetation edge , but not for small or medium sized prey , between populations.
there was, however, no difference in detection ranges associated with vegetation or large prey between zpk, skk and dhl and between tf and bkl .
bats inhabiting more open habitats used lower frequencies and had longer detection distances than bats in more cluttered habitats, with ls bats  having the longest detection distances of both large insects and background vegetation .
spatial population genetic structure and patterns of gene flow
a total of  <dig> unique mtdna haplotypes were identified from  <dig> individuals .
haplotype diversity ranged from  <dig>   to  <dig>   and the highest number of unique haplotypes  was found in the baviaanskloof area  .
most populations shared haplotypes with their nearest neighbours and a few haplotypes were shared between more distant populations  .
we identified three genetically isolated populations  consisting largely of unique mitochondrial lineages .
complex network relationships characterise the evolutionary history of r. capensis populations sampled in our study.
the neighbour-net network revealed numerous reticulations between haplotypes, suggesting several alternative evolutionary pathways among them .
while the network recovered a number of clear clades these were not generally structured by biome or geographic proximity.
only haplotypes from the desert biome and populations occurring in regions where multiple biomes are connected formed discrete clusters .
our investigation of hierarchal population genetic structure revealed significant partitioning of genetic variation at all three levels but most variation occurred within populations  rather than between populations  or biomes  .
bayesian clustering identified four spatially explicit genetic clusters in our data .
only individuals situated at opposite ends of the species distribution , were assigned to unique clusters while the nine populations between them were assigned to two spatially structured clusters .
furthermore, estimates of historical migration rates  revealed generally asymmetrical patterns of gene flow between populations situated in different biomes .
the main source populations were zpk, bkl and bav and gene flow generally occurred between neighbouring populations.
there was also evidence for long distance gene flow from bav to bkl  and from dhc to bav  but this occurred at relatively low levels .
together, these results support a pattern of relatively high regional connectivity and hence minimal fine-scale population structure in the r. capensis.
influence of genetic distance and geography
pairwise differences in both rf and genetic distance were characterised by significantly positive relationships with geographic distance .
rf and genetic distance co-varied with geographic distance and followed a general model of isolation by distance .
geographic distance, however, explained only a relatively small proportion of the variation in rf and genetic distance .
we also found a significant correlation between rf difference and genetic distance among populations  and this remained significant when we controlled for the effect of geographic distance .
despite the significance of the correlation, genetic distance only explained a small proportion of the variation in echolocation frequencies .
discussion
our results reveal significant geographic variation in the resting echolocation frequencies  of r. capensis despite substantial historical gene flow across the distribution of this species.
body size, genetic distance and geographic distance play minor roles in the evolution of geographic variation in rf in r. capensis.
further, despite a lack of strong geographic structure in mitochondrial lineages, biome was identified as the best predictor of rf.
in support of this we found a significant relationship between rf and increasing vegetation clutter from west to east across the range of this species.
our results suggest that the evolution of geographic variation in rf in the face of homogenizing gene flow in r. capensis was probably influenced by selection for lower echolocation frequencies in less cluttered habitats.
however, the relationship we found between rf and habitat type is solely correlative, and therefore a thorough comparison of foraging behaviours of bats between different habitats is required.
thus, alternative evolutionary processes e.g.
selection for discrete frequency bands or phenotypic plasticity cannot be excluded at this stage.
disparities between rf and population genetic structure: trait diversification in the presence of gene flow
studies investigating the various evolutionary forces shaping phenotypic and genetic divergence between populations often describe trait variation in the context of substantial population structure and limited gene flow  <cit> .
while phylogeographic patterns of maternally  and bi-parentally  inherited genetic markers usually concur, discordance between phenotypic and genetic structure is also reported.
this is usually attributed to demographic processes that characterize species, such as sex-biased dispersal  <cit>  or secondary contact following historical isolation  <cit>  .
similar discordance has been reported in several european and asian horseshoe bats either as a result of male-biased dispersal and female philopatry  or historical introgression of mtdna  between sister lineages.
despite recent advances in testing the evolutionary processes that shape contemporary population genetic structure in horseshoe bats , few studies have specifically evaluated sensory variation within a phylogeographic or population genetic framework in this genus  <cit> .
in our study, we expected rf divergence in the r. capensis to reflect mtdna structure given that  the fine tuning of the echolocation frequency of young horseshoe bats are partly learned from their mothers <cit> ,  female philopatry and male dispersal characterize other horseshoe bats studied to date  <cit> , and  the degree of rf divergence observed among populations  is similar to that reported for other high duty cycle bats which have corresponding significant genetic structure among maternal lineages  <cit> .
our results instead reveal minimal genetic structure amongst r. capensis populations.
a bayesian clustering analysis identified four dominant genetic lineages which broadly reflect estimated patterns of regional gene flow that are not limited by biomes; notably only ls and tf  are identified as unique genetic clusters .
a number of mitochondrial haplotypes were also found to be shared between geographically distant populations; these may reflect long-distance dispersal events or the retention of common ancestral polymorphisms.
mitochondrial data clearly reveals a recent evolutionary history of complex reticulations in r. capensis, suggesting that gene flow and not incomplete lineage sorting is responsible for the observed genetic structure or lack thereof.
one caveat of our analytical approach is the statistical non-independence of our populations due to the substantial gene flow we detected between them  <cit> .
populations that are more closely related to one another or exchange higher numbers of migrants are likely to have similar phenotypic trait values irrespective of the local selection pressures they experience  <cit> .
ideally, the inclusion of our calculated migration matrices between populations in our ecological models would control for the effect of gene flow, but the development of effective computational methods to include the complex reticulate relationships among population’s remains challenging  <cit> .
nonetheless, the spatial distribution of the four dominant genetic lineages does not reflect the broad pattern of rf variation among populations of r. capensis.
for example, we detected considerable gene flow between populations at skk, zpk and dhl, but no direct gene flow between these populations and the population at dhc, even though they were all assigned to the same genetic cluster .
bats from these genetically similar populations use rf’s ranging from  <dig> - <dig>  khz.
thus the discordance between patterns of genetic and rf variation among r. capensis lineages suggest that gene flow does not significantly contribute to rf variation across the distribution of r. capensis, although this remains to be explicitly tested.
furthermore, although rf is also characterised by ibd, geographic distance only accounted for a minor proportion of the variation in rf .
interestingly, rf divergence is also positively correlated to some degree with genetic distance, even after controlling for geographic distance , suggesting that local environmental conditions may influence sensory differentiation in areas with some degree of restricted gene flow  <cit> .
however, estimates of maternal gene flow support significant regional connectivity in the recent past and is at odds with the pattern of structuring in rf we observe across populations.
this is in contrast to previous studies of high duty cycle bats where population genetic structure generally reflects the variation of sonar frequencies across often widespread species .
as we discuss below, this anomaly may be a consequence of the complex interactions between gene flow, diversifying selection and environmentally mediated selection for phenotypic plasticity.
phenotypic plasticity can be advantageous if it results in the expression of different phenotypes that increase an individual’s fitness in diverse environments  <cit> .
in this way plasticity can minimise the costs incurred from dispersal into environments with different selection regimes  <cit> .
if plasticity influences rf diversification, it may lead to a situation in which selection does not significantly constrain gene flow among populations, leading to adaptive phenotypic variation in the presence of gene flow  <cit> .
body size and habitat structure predict rf: influence of diversifying selection and adaptive phenotypic plasticity
the frequency of acoustic signals scales negatively with body size in a range of organisms  <cit>  including bats  <cit> ; larger bat species produce echolocation calls of lower frequencies than smaller bat species.
this relationship also exists within r. capensis with larger bats generally using lower rf’s.
however, body size only explained a minor proportion of the variation in rf because concomitant changes in body size and rf were not evident across all populations.
for example, although bav bats are not the smallest, they use the highest echolocation frequencies.
in contrast, individuals in populations at both ends of the distribution of this species  were similar in size but echolocated at the lowest and second highest frequencies respectively .
this may explain why previous research on echolocation variation in the species did not support a relationship between body size and rf, and instead suggested the decoupling of echolocation divergence from the evolution of body size  <cit> .
this result was likely an artefact of under sampling trait variation in r. capensis and highlights the difficulties of inferring evolutionary processes from data sets which inadequately sample the true distribution of a trait.
our results here suggest that the allometric relationship between body size and rf collapses in populations situated towards the edge of the range of this species.
this is perhaps not unexpected given that range edges and ecotones provide novel environments to which species can become locally adapted, leading to significant phenotypic divergence of edge populations from those at the centre of the distribution of a species  <cit> .
this may explain why populations at either end of the species’ range  were identified as unique genetic clusters, while the nine sampled populations between them were assigned to only two genetic clusters .
paleoenvironmental change from the miocene to pleistocene profoundly impacted the evolution of population divergence and speciation in a wide range of southern african taxa; several studies report a strong link between divergent genetic lineages and the biomes or ecogeographical regions of southern africa for various organisms including reptiles  <cit> , invertebrates  <cit>  and small mammals  <cit>  including bats  <cit> .
in our study we did not find any clear population genetic divergence with topographical features.
neither did we find any support for the humidity hypothesis which proposes that divergence in rf is the result of selection against higher frequencies in humid environments  <cit> .
instead we found that bats in the desert biome used significantly lower frequencies than those occupying forest and areas of transition between multiple biomes .
this clinal increase in rf across populations of r. capensis from west to east may be the result of the gradient of increasing vegetation cover and density from west to east .
at ls in the west the vegetation was very sparse and consisted of low shrubs .
in the east the vegetation ranged from dense fynbos to forest .
thus, there is a steep habitat gradient between ls  and its nearest neighbours , and selection may therefore dominate in this region.
in contrast, plasticity may be favoured as an explanation for rf variation amongst the other populations because the habitat gradients are not as steep.
a notable exception is that of the population at tf.
at tf  bats use similar rf’s to other populations situated in ecotones , and yet appears to be relatively isolated genetically .
tf is situated at the interface between aseasonal and summer rainfall zones  <cit>  which, together with the intrinsic habitat heterogeneity of ecotones, may serve as a significant barrier to gene flow.
this pattern has been observed for various other species in this region .
the positive correlation we found between rf and ndvi suggests that variation in the degree of habitat clutter might explain variation in rf.
across our sampling sites, the mean detection distance for large prey and background vegetation edge was significantly different between populations; bats occupying more open habitats have lower rf’s and thus longer detection distances than those in more cluttered habitats, allowing them to detect larger prey or background targets at greater distances.
while this result was statistically significant, ls bats only had a  <dig> cm and  <dig> cm greater detection distance than their nearest neighbours for large prey and vegetation edge, respectively .
although all rhinolophids supposedly fly close to vegetation and may experience even relatively open habitats as cluttered, the  <dig> cm greater detection distances of the vegetation edge may be advantageous during orientation and commuting flight in the sparse vegetation of ls where the distance between clumps of vegetation are greater than in the fynbos or the forest .
further, prey density is also likely to be lower at ls and selection is likely to favour the evolution of lower rf’s that would allow the detection of larger prey at greater distances.
there is sufficient empirical evidence to suggest that even rhinolophids, constrained by their echolocation to hunt in narrow space  <cit> , display some degree of flexibility in the foraging habitat they exploit  <cit>  or the foraging style they adopt   <cit>  as a result of resource partitioning  <cit> , habitat structure  <cit>  or seasonal changes in prey resources  <cit> .
at least one species of rhinolophid also appears to vary its echolocation frequency in response to different degrees of clutter  <cit> .
within the same nature reserve, greater horseshoe bats  use a variety of habitats with differing degrees of clutter and use significantly lower echolocation frequencies in relatively open habitats than in cluttered habitats  <cit> .
it is likely therefore that r. capensis uses both aerial hawking and perch hunting styles to different degrees in the different habitats perhaps also altering its call frequency to deal with different degrees of clutter.
the distinctly lower call frequency at ls could possibly be explained by the pronounced clutter gradient between ls and the other habitats occupied by r. capensis.
however, our detection distance calculations must be interpreted with caution because different populations may have different echolocation call intensities, which could greatly influence the calculation of maximum detection distance  <cit> .
although differences in habitat structure provide a compelling explanation for different rf’s in r. capensis, an interesting anomaly needs to be accommodated; r. damarensis  is sympatric with r. capensis in the extremely arid area of ls but uses frequencies  as high as those used by r. capensis in highly cluttered habitats e.g.
tf.
it seems reasonable to assume that selection would have favoured similar call frequencies, and therefore detection distances, in r. damarensis and r. capensis where they are sympatric in the arid region of ls.
however, it is possible that r. damarensis exploits a different foraging niche to r. capensis in this area of sympatry.
alternatively, this species may compensate by using higher intensity calls to achieve more or less the same detection distances as r. capensis <cit> .
of course it is possible that the presence of r. damarensis at ls has selected for the low frequencies we observe in r. capensis.
observed frequencies are much lower in the ls population than in the other arid populations  despite similarities in body size to the other arid populations .
on the basis of its body size, r. capensis at ls should echolocate at approximately  <dig> khz .
instead we observe a mean rf of  <dig>  khz.
bats at ls may have shifted their frequency below  <dig> khz to avoid acoustic overlap with r. damarensis , and maintain effective intraspecific communication.
however, the closest known roosts of these two species are  <dig> km apart and it is not known if the foraging areas of these two species overlap, i.e.
if they are syntopic, as required by the acoustic communication hypothesis.
nevertheless, character displacement, mediated by some form of resource partitioning or local adaptation, in sonar parameters can contribute to the initial stages of lineage divergence by causing populations in sympatry with heterospecifics to diverge from their respective conspecific populations in allopatry.
the result would be reduced gene flow between populations found in different selective regimes or heterospecific assemblages  <cit> .
for example, lemmon  <cit>  showed that acoustic traits important for female preference and mate choice in populations of the chorus frog, pseudacris feriarum, diverged to maximize differences from the heterospecific assemblage present, ultimately promoting reproductive isolation between conspecific populations via sexual selection.
ecologically adaptive traits can also promote divergence if divergence has a pleiotropic effect on reproductive isolation via assortative mating; so called ‘magic traits’  <cit> .
in r. philippinensis assortative mating has evolved between size morphs as a by-product of selection for different frequencies used to exploit different prey sizes  <cit> .
the significant and consistent sexual dimorphism we observe in the rfs of r. capensis , may serve a role in sex-specific communication in the species.
recent experimental evidence reveals that horseshoe bats  and emballonurid bats  are indeed able to recognise the sex of conspecifics based on their echolocation calls  <cit> .
thus, the limited gene flow between ls and other populations may be a consequence of ls bats not effectively recognizing other r. capensis as potential mates.
divergence in rf may have under-appreciated consequences for the evolution of reproductive isolation via female preference for male rfs in different populations of horseshoe bats.
evaluating female preference in ls bats for local versus allopatric rfs may provide intriguing insights into the causes and consequences of sexual selection in horseshoe bats.
finally, because r. damarensis only occurs in sympatry with r. capensis at a single site , we were not able to test whether habitat or the presence of r. damarensis offered a better explanation for rf differentiation in r. capensis.
an experimental approach is required to test whether r. capensis has shifted its rf to avoid acoustic overlap with r. damarensis.
such an approach would evaluate whether r. capensis from ls responds differentially to the echolocation calls of heterospecifics and acoustically divergent conspecifics using playback experiments.
at a ‘local to regional’ scale geographic distance is not a significant barrier to gene flow in r. capensis, and the evolution of sensory divergence in the presence of this gene flow may also reflect a degree of adaptive phenotypic plasticity in rf.
despite the tight coupling between rf and the acoustic fovea in high duty cycle bats  <cit> , empirical studies have shown that species are able to shift their rf’s in response to both neighbouring conspecifics  and different ambient noise conditions .
such small shifts in frequency may explain the range of rf variation in the southern and eastern populations of our study  where plasticity in response to slightly varying degrees of vegetation clutter towards the east might occur.
however, it is unlikely to explain the  <dig> khz shift in the lekkersing bats.
nonetheless, it appears that southern and eastern populations of r. capensis use rf’s within the best hearing range of the acoustic fovea of their nearest neighbours, possibly facilitating gene flow and promoting relatively flexible rf’s in these populations.
while small shifts in the acoustic fovea and its corresponding reference frequency are possible in high duty cycle bats  <cit> , we do not know the precise limits of the flexibility of the acoustic fovea.
long-term experimental studies evaluating the change in rfs in response to the rfs of bats from acoustically divergent populations may shed light on the degree of plasticity in this system.
alternatively, the relative influence of plasticity versus selection can be evaluated indirectly.
for example, selection may better explain our observations if variation in functional genes involved in hearing co-varies with rf variation across populations.
recent studies reveal a wide range of candidate hearing genes which show strong signals of ancestral positive selection in the evolution of echolocation in bats and cetaceans  <cit> .
selection may also be favoured as an explanation for variation in rf if there is a strong correlation, independent of variation in body size, between rf and morphological features directly involved in echolocation production and emission   <cit> .
previous research investigating morphological correlates of rf in r. capensis revealed that rf is best predicted by nasal chamber length  <cit> , but a thorough evaluation of skull morphology variation across the distribution of the species is required.
the social life of bats may also influence the relative roles of diversifying selection versus plasticity across the distribution of a species.
if bats are able to recognise conspecific calls from a range of acoustically divergent populations this might suggest that selection for some degree of plasticity in the trait is also favoured.
classic playback experiments can be used to assess the sensitivity of individuals to the range of frequencies exhibited by a species.
these two hypotheses are clearly not mutually exclusive; and their relative influences across the highly heterogeneous environments of r. capensis certainly merit further attention.
CONCLUSIONS
this study reveals significant sensory trait variation in the cape horseshoe bat despite substantial historical gene flow.
while genetic and geographic distances do influence sensory variation to some extent, our results suggest that differences in habitat complexity across the range of the cape horseshoe bat may be the dominant driver of sensory differentiation in this system.
classical divergent selection together with some degree of phenotypic plasticity may be responsible for rf variation in the presence of gene flow.
however, an investigation of the variation in foraging behaviour within and between populations of the cape horseshoe bat is required to support our results.
nonetheless, our findings highlight the importance of population level analyses to elucidate the complex interactions among selection, plasticity and gene flow in the evolution of adaptive trait variation and reveal a number of interesting avenues for future research into the evolution of this remarkable sensory system.
competing interests
all authors have declared that no competing interests exist.
authors’ contributions
ljo, dsj and jmb conceived of and designed the study and carried out the fieldwork.
ljo generated the molecular data, and conducted all genetic and ecological analyses with input from jmb and dsj.
all authors contributed to the writing of the manuscript and read and approved the final manuscript.
supplementary material
additional file 1: figure s1
map of the biomes of south africa together with the geographic locations of the  <dig> populations of rhinolophus capensis sampled in this study biomes are from rutherford et al.
<cit>  and lines indicate the approximate positions of the different rainfall zones of south africa: solid line indicates the winter rainfall zone; dashed line indicates all year rainfall zone; and the rest of south africa receives summer rainfall.
the key to population acronyms are found in table  <dig>
click here for file
additional file 2: table s2
climatic variables for each population and the mean detection distances for prey and background vertical targets .
detection ranges calculated from the method of stilz and schnitzler  <cit>  .
the size range of prey taken by r. capensis at de hoop is 2- <dig> mm  <cit>  and this covers the range of small, medium and large prey in  <cit> .
climatic data were obtained from the nearest weather stations and provided by the south african weather service.
click here for file
additional file 3: figure s2
the distribution of  <dig> unique haplotypes across the  <dig> populations of rhinolophus capensis sampled in this study.
key to acronyms given in table  <dig>
click here for file
additional file 4: table s2
genetic variability in  <dig> populations of rhinolophus capensis based on  <dig> bp of the mitochondrial control region.
haplotype diversity , number of haplotypes, nucleotide diversity  and number of polymorphic sites are shown.
click here for file
additional file 5: figure s3
neighbour-net network based on p-corrected distances of the  <dig> unique haplotypes isolated in this study.
each circle represents a unique haplotype coloured according to the biome/s in which it occurs.
pie graphs indicate where haplotypes are shared across several biomes.
click here for file
additional file 6: table s3
lower and upper profile likelihood percentiles of m, the number of immigrants per generation scaled by mutation rate, calculated in migrate-n .
click here for file
acknowledgements
we thank b. d. kruger, h. babiker, c. hartnick, t. haupt, h. craven, s. stoffberg, e. kelly, c. sirami, d. peinke, o. smit, m. cunnama, s. rakers, l. lange, a. mead, a. thomas, s. jordaan, f. p. d. cotterill, m. brigham, a. brigham and a. doty, for assistance in the field.
thanks also to g. mutumi for assistance with arcgis, and h. craven for permission to publish her photograph of rhinolophus capensis taken while assisting with fieldwork.
this research was funded by grants to ljo  and dsj from the south african research chair initiative of the department of science and technology and administered by the national research foundation of south africa.
we also thank two anonymous reviewers for their constructive comments on previous versions of this manuscript.

 in populations inhabiting heterogeneous environments adaptive trait divergence in the absence of gene flow is both predicted by theoretical models and supported by a large number of studies demonstrating a generally negative relationship between levels of population connectivity and the degree of adaptive divergence in the traits under study. this phenomenon is centred on the prediction that gene flow limits adaptive trait variation by homogenising gene pools that would otherwise diverge in response to selection under different ecological regimes. the relationship is, however, clearly more subtle than this because empirical evidence also supports extensive adaptive variation in the presence of gene flow e.g. highlighting the role of local selection gradients across different environments. if the selection gradient is steep enough to reduce immigrant fitness the homogenising effects of gene flow on trait variation are likely to be minimised. alternatively, if selection is weak and there are minimal costs to immigration, even nominal gene flow could constrain the evolution of trait variation and lineage divergence. undoubtedly there is a complex and dynamic relationship between selection, fitness and gene flow, but the interaction among these factors together with the role of trait plasticity is seldom considered in studies of adaptive population variation. phenotypic plasticity, environmentally mediated phenotypic changes without changes in allele frequency, has traditionally been viewed as a minor evolutionary process. this is so largely because environmentally induced phenotypic change does not influence the genes that an individual transfers to its offspring; but see for comment on the role of heritable epigenetic variation on phenotype evolution. divergent selection cannot therefore act on genetic variants in a population and consequently phenotypic plasticity is thought to minimise rather than enhance selection. recently, however, there has been renewed interest in elucidating the role of plasticity in promoting diversification within and between populations and species. this renaissance is due, in part, to the recognition that selection for adaptive plasticity can occur if it promotes successful dispersal and survival in different environments, increasing the potential for adaptive diversification under divergent selection regimes. high gene flow between heterogeneous environments may then favour the evolution of increased phenotypic plasticity, over adaptive genetic divergence, because it would promote adaptation to new conditions within one or two generations. plasticity may in turn promote gene flow if dispersers are not selected against in their new environments. plasticity would allow a population or individuals to persist long enough in a new environment for selection to bring about the evolution of adaptation to the new environment by acting on the standing genetic variation among individuals. geographic variation in sensory traits i.e. traits used by organisms to perceive and respond to information about their environment is well documented and directly impacts on individual fitness e.g. via their role in resource acquisition and species and mate recognition. acoustic signalling for general communication as well as mate and food acquisition is used by a range of organisms including fish, insects, anurans, birds and mammals. extensive geographic variation in acoustic signals is common, and the role of both phenotypic plasticity and sexually mediated selection have been implicated in promoting the evolution of population divergence. in bats ultrasonic acoustic signalling in the form of echolocation is used for spatial orientation, prey detection and communication. bats echolocate over a wide range of frequencies and the trait can be highly flexible both within and between species. this flexibility has been attributed to numerous factors including differences in foraging habitat, prey size, variation in body size, age and sexual dimorphism. in the horseshoe and leaf-nosed bats a unique echolocation system has evolved that functions in both resource acquisition and intraspecific communication. the signal design of horseshoe bats is characterised by long, high duty cycle calls which have a prominent constant frequency component preceded and followed by a brief frequency modulated component. during flight individuals compensate for doppler shifts induced by their own flight speed by lowering the frequency of their emitted pulse. this ensures that the returning echo falls within the narrow frequency range of their acoustic fovea–a region of the cochlea with sharply tuned neurons sensitive to a unique frequency called the reference frequency. horseshoe bats are able to couple the frequency of the returning echo to their reference frequency independently of the size of doppler shifts with extreme accuracy. the reference frequency is always 150- hz higher than the frequency these bats emit when stationary, often referred to as the ‘resting frequency’. horseshoe bats typically forage for insect prey in narrow-space environments either on the wing, or from a perch. in both cases, the long cf component of their echolocation calls generate echoes from the flapping wings of flying insects that are characterised by amplitude and frequency modulations resulting in acoustic glints against a background of unmodulated echoes from background vegetation. thus, the long cf calls emitted at a high duty cycle, together with doppler shift compensation and the auditory fovea allow horseshoe bats to detect fluttering insects in cluttered space. in horseshoe bats the rf is largely genetically determined. however the peak frequency of juveniles is also partially influenced by that of their mothers and the fine tuning of the frequency of the acoustic fovea of young horseshoe bats may have a learnt component via mother-to-offspring transmission. several recent studies investigating sensory variation in rhinolophid and hipposiderid bats attribute observed variation predominantly to differences in diet and environmental humidity. such variation may be correlated with morphological features directly involved in echolocation production and reception. sensory divergence may however also be an indirect result of adaptive changes in body size to prevailing environmental conditions. among sympatric species call divergence may have evolved under regimes of social selection where character displacement maintains private bandwidths for intraspecific communication. within a particular community, the echolocation frequencies used by any one species may therefore also be a consequence of the frequencies used by other species in that community. lastly, the physical structure of habitats can impose significant constraints on the range of frequencies bats use to successfully navigate within their environment and to detect prey, purely because of the physics of sound and sound transmission. low frequency calls with longer wavelengths enable long-range detection of prey or other targets and are generally associated with open habitats. conversely, higher frequency calls are more directional and provide greater resolution of targets, at least for bats using low duty cycle echolocation, at short detection ranges typical of highly cluttered habitats. the foraging habitat hypothesis thus proposes that habitat clutter influences echolocation frequency and predicts that a gradient of increasing vegetation clutter selects for a gradient of increasing echolocation frequency. most studies generally assume that observed variation in rf results from micro-evolutionary processes selecting for calls that are sharply tuned to the narrowband range of the acoustic fovea. recent evidence, however, suggests that horseshoe bats and other high duty cycle echolocating bats exhibit some degree of temporal flexibility in rfs and associated changes in cochlear tuning in response to both conspecifics and local ambient noise. more recently neutral evolutionary processes have become a focus of research centred on understanding echolocation divergence in bats. using the theoretical framework of population genetics, phylogeography and phylogenetics, the effects of gene flow and genetic drift on divergence in peak frequencies between divergent lineages has revealed relationships between echolocation divergence and e.g. female philopatry geographic distance, and palaeoclimatic lineage divergence. here we use multiple data sets to investigate variation in echolocation frequency across the geographic range of the south african endemic cape horseshoe bat, rhinolophus capensis. we assess echolocation variation within a neutral evolutionary framework to quantify the extent to which population genetic structure and gene flow contribute to variation in echolocation frequencies, and using a model-based approach explore the roles of habitat structure and humidity in echolocation divergence. our analyses reveal significant sensory diversification among r. capensis populations in the presence of extensive historic gene flow, and we discuss how selection, plasticity and gene flow may interact to characterize patterns of trait variation in this system. methods regional sampling of echolocation frequency and genetic variation we measured echolocation parameters and collected tissue biopsies from populations across the distribution of rhinolophus capensis. eleven populations were sampled across several major biomes in the region including desert at the extreme northern edge, through succulent karoo and fynbos in the centre of the distribution, and finally to forest and areas of transition between fynbos and neighbouring biomes at the eastern limit of its range. the geographic range of r. capensis is characterised by two distinct environmental gradients that influence regional rainfall patterns. the first is a latitudinal gradient of increasing aridity northwards. the second is a longitudinal seasonality shift from a predominantly winter to an aseasonal rainfall regime from west to east, and another shift to a summer rainfall regime at the extreme eastern edge of the distribution of the species. the resulting rainfall gradients translate into a clear habitat gradient from relatively open and sparse habitats in the north and west, to more cluttered habitats in the east. bats were captured at their roosts during the day with hand nets, or as they emerged from roosts at dusk using mist nets and/or harp traps. the age and sex of each bat was recorded; juveniles were distinguished from adults by the presence of cartilaginous epiphyseal plates in their finger bones and excluded from subsequent analyses. individual body mass was measured. seasonal and diurnal variation in body mass was controlled for by excluding pregnant females, sampling only in the southern hemisphere spring and summer and measuring bats only after their gut was emptied by keeping them overnight in soft cotton bags. echolocation calls were recorded from hand held bats positioned cm in front of an avisoft ultrasound gate microphone connected to a laptop running avisoft saslab pro software. resting peak frequency was recorded from hand-held individuals because it eliminates differences in peak frequency that may be due to doppler shift compensation during flight. rf is a reliable indicator of the reference frequency because the difference between the reference and resting frequency is stable in horseshoe bats furthermore, when hunting from a perch rhinolophids emit their resting frequencies. recordings were slowed down by ten times and analysed using batsound pro software with a sampling rate of khz. we measured the peak frequency of the dominant second harmonic of the cf component determined from the fast fourier transformation power spectrum with a hanning window. to identify the typical echolocation parameters for each bat we calculated means of call duration, rf, lowest frequency of the fm component, bandwidth and inter-pulse interval from 5- high quality calls. we chose the rf from an original call sequence that was most similar to the calculated mean parameters for all subsequent analyses. thus the ‘true’ rf instead of a constructed statistical value was used in our analyses. we also collected a tissue sample for dna extraction and sequencing from most individuals for which we had echolocation recordings. biopsy punches were taken from the wing or tail membrane following. membranes were illuminated to ensure that no blood vessels were ruptured during sampling and tissues were stored in molecular grade ethanol at room temperature in the field, and at 4°c until extraction. our capture, handling and tissue collection methods were approved by the science faculty animal ethics committee of the university of cape town. total dna was extracted using a dneasy blood and tissue kit and stored at 4°c. we amplified a base pair fragment of the mitochondrial d-loop using the primers n and e from and respectively. pcr conditions consisted of an initial cycle of 94°c for minutes, followed by cycles of 94°c, 50-55°c and 72°c each for seconds and a final step of 72°c for minutes. pcr products were checked on 1% agrose and gel purified using a wizard sv gel and pcr clean-up system. samples were sequenced in both directions using bigdye chemistry on an abi xl dna analyzer. chromatograms were edited and aligned using bioedit v.. for each population the number of unique haplotypes, haplotype diversity and nucleotide diversity were calculated using dnasp v.. all unique haplotype sequences obtained in this study were deposited in genbank. influence of non-genetic factors on echolocation divergence we conducted a kolmogorov-smirnov test for normality, levene’s test for homogeneity of variances and regressed means against standard deviations for all grouping levels to ensure the data met the assumptions of subsequent analyses. to quantify variation in rf within and between populations we calculated the mean ± standard deviation and the coefficient of variation of each population. various intrinsic and extrinsic factors can influence the evolution of geographic variation in acoustic signals across a species range. to tease apart the effects of these factors on rf divergence we first conducted a general linear model with rf as the dependent variable and population, sex and their interaction as categorical predictors. we then used spss to conduct linear mixed models performed with type iii sums of squares to determine the ecological factors which best predict rf in r. capensis. mixed models are robust to unbalanced designs and thus data from single-sex populations could be included. lmm’s estimate the effects of both fixed and random factors to models of data that are normally distributed. our glm results revealed significant differences between populations and sexes, but no significant interaction between them. population and sex were therefore included as random factors to control for spatial clustering of samples and intrinsic sexual differences in rf. fixed factors included biome category and body mass. even though the presence or absence of congeneric species may also influence rf variation across different populations of horseshoe bats, we were unable to explicitly test the acoustic communication hypothesis for several reasons. first, the range of rhinolophus damarensis, only overlaps with that of r. capensis at ls and therefore its presence cannot be replicated across populations. second, the presence of r. damarensis and the desert biome category are collinear and thus cannot be included in the same model. lastly, with the exception of the ls site, r. capensis co-occurs with a larger congeneric species, rhinolophus clivosus, over much of its range. five geographical lineages of r. clivosus corresponding to previously described sub-species based on genetic, acoustic and morphological differences have been identified, and of these, r. capensis overlaps with two lineages which echolocate between and khz. at these frequencies the rf of r. clivosus is unlikely to influence the rf of r. capensis and r. clivosus was therefore excluded from our analyses. we employed a model selection approach based on akaike’s information criterion to determine which model, out of a range of candidate models, best explained rf divergence in r. capensis. the model with the lowest aic value was considered the most parsimonious and the difference in aic scores were calculated to determine the likelihood that a given model was the best model relative to other candidate models. a Δi value of zero indicates the best fit model; values up to two indicate models with substantial empirical support; values between four and seven indicate less support and models with values >  have essentially no support. we also used akaike weights to calculate the probability that a given model is the best among a candidate set of models. thus, the best model has the lowest Δi and highest wi. once the best fit model was identified, we estimated the effects of each factor level on rf variation in r. capensis using the restricted maximum likelihood method. then, to determine the importance of each variable included in the best model, we calculated the summed akaike weight for all models containing that particular variable. the variable with the largest w+ is likely the most important variable in the model. our model selection results led us to explore the influence of habitat structure and body size on rf variation in greater detail. the normalized difference vegetation index was used as a measure of vegetation cover. ndvi is a suitable measure because it provides an estimate of above ground primary productivity and it has been shown to be associated with a wide range of vegetation properties including photosynthetic activity vegetation cover and vegetation biomass. thus ndvi is commonly used to link vegetation dynamics to various aspects of animal ecology. ndvi is a measure of the density of chlorophyll contained in vegetation and it is calculated as /, where nir is the near-infrared light, and red is the visible-red light, reflected by vegetation and captured by the satellite. the values of ndvi range from - to where negative values correspond to an absence of vegetation. green and/or dense vegetation has high red absorption together with high nir, leading to high, positive ndvi values. in contrast, sparse vegetation absorbs substantially more nir, leading to lower ndvi values. bare soils, snow and cloud have ndvi values close to zero. we used the expedited moderate resolution imaging spectroradiometer vegetation indices dataset from nasa, which provides the maximum value for ndvi images for composites over a 10-day period at a resolution of m from the year to present. average ndvi values from a km radius around each sampling site were extracted and compiled in arcgis.. because echolocation frequency scales negatively with body size in horseshoe bats, variation in body size could cause concomitant changes in rf. thus, to test whether rf variation is associated with differences in ndvi while controlling for the potential influence of body size, we used spss to conduct a hierarchal multiple regression analysis. the first step of a hmra is to add the independent variable that you wish to control for. the second step examines the relationship between an independent and dependent variable while controlling for the effect of the first independent variable. we limited this analysis to males and evaluated the correlations between rf, body mass and ndvi as well as the change in the correlation coefficients between the model including body size and the model including ndvi but controlling for body size. we also investigated whether there was a negative relationship between relative humidity and mean rf as predicted by the humidity hypothesis. relative humidity data for each sampling site were obtained from the literature or from the nearest weather stations and provided by the south african weather service. like most other rhinolophids, r. capensis forage in or near highly cluttered habitats. while the long cf portion of their echolocation calls allow the detection of fluttering prey against structurally complex backgrounds like dense vegetation, differences in vegetation cover between sampling sites could still influence the sound transmission properties of the echolocation call frequency used in each habitat. to better understand the effects of vegetation cover on variation in echolocation frequencies we calculated the mean detection distances for prey and vertical background targets for each population according to the method developed in stilz and schnitzler. this method depends on the dynamic range and frequency of the sonar system, local atmospheric conditions and target type. the dynamic range was calculated as the difference between peak intensity at 1m and the auditory threshold of the bat. we assumed the different populations had similar dynamic ranges. the different prey size categories tested in were derived from houston et al. and included small, medium and large categories–all within the size range of prey consumed by r. capensis. mean minimum temperature data for each population were obtained from the nearest weather stations and provided by the south african weather service. spatial population structure and patterns of gene flow geographic variation in phenotypic traits may be a consequence of neutral evolutionary processes, particularly when dispersal distances result in a pattern of predominantly nearest-neighbour gene exchange. to better understand the role of random genetic drift in the evolution of rf variation we used a number of statistical approaches to determine the degree to which genetic variation is spatially structured in r. capensis and quantify levels of historic gene flow among populations. we first explored the evolutionary relationships among mtdna haplotypes to determine whether observed relationships reflected either the geographic sampling of populations or specific biome discontinuities across the range of the species by constructing a neighbour-net network in splitstree v. using uncorrected ‘p’ distances. network analysis allows reticulations among branches and is highly suitable for analysing evolutionary relationships among populations. the spatial clustering of samples and distribution of genetic variation were also investigated using baps v and analysis of molecular variance in genalex v. the amova quantified partitioning of genetic variation within and among populations and biomes. the significance of variance components and Φst were estimated with random permutations. to test for the presence of discrete evolutionary lineages we estimated the most probable number of genetic clusters among populations using a spatially explicit bayesian clustering mixture model in baps. we performed spatial clustering for groups with k ranging from 4- the analysis was repeated ten times for each maximum k and the log marginal likelihood value for each genetic partition was evaluated. to obtain estimates of historic gene flow among populations we used a maximum likelihood method based on the coalescent implemented in migrate-n v.; migrate uses an equilibrium model that estimates migration rates averaged across the coalescent history and simultaneously estimates Θ, the effective population size scaled by mutation rate where Θ = neμ, together with pairwise migration rates summarised as m = m/μ, where m is the effective immigration rate per generation between populations. banding data from european horseshoe bats reveal generally small home ranges where maximum dispersal distances rarely exceed 100km over the course of an individual’s life time. if similar, dispersal in r. capensis likely occurs over relatively short distances. thus we estimated Θ and m using a custom designed migration matrix where migration was only allowed between neighbouring populations. populations separated by large geographic distances were not directly connected except in cases where unique haplotypes were shared. starting values for all parameter estimates were initially obtained using fst and the following search parameters were used: short chains with gene trees sampled and trees recorded; three long chains with million sampled trees of which were recorded. the first trees were discarded as burn-in and a static heating scheme with six temperatures and a swapping interval of one was used. the results were averaged over five replicate runs. comparing echolocation divergence and genetic distance genetic divergence among populations is dependent on both the degree of physical isolation and levels of connectivity between them. to test whether genetic and rf differentiation is associated with geographic isolation we used mantel and partial mantel tests to explore the relationships between genetic structure, rf divergence and geographic distance. matrix correlations were calculated in genalex v and xlstat with random permutations. the three matrices analysed were pairwise geographic distances calculated as straight line distances from geographic coordinates using the program geographic distance matrix generator v.; genetic distance using slatkin’s linearized Φst and rf differences among populations. log-transformed geographic distances were regressed against genetic distance and peak frequency difference. our partial mantel test determined whether rf difference was associated with genetic distance while controlling for the effect of geographic distance.  effects of morphology, sex and ecology on rf divergence we measured the rf of individuals across multiple biomes and observed a clinal increase in mean rf across the distribution of r. capensis ranging from khz in the west, to khz in the east. resting frequencies differed significantly among populations with the exception of kny which used similar frequencies to hdh and dhc. sex significantly influenced echolocation variation within populations with females emitting higher frequencies than males. however, we detected no significant interaction between sex and population, suggesting that the degree of sexual dimorphism in rf was identical across populations. the cv of call frequencies for each population was low and at most 1%. mean body mass and mean resting frequencies for populations and sexes are shown. male only populations were zpk, dhl and bkl. an equal number of males and females were used to calculate the mean population mass and rf. multiple biomes occur at bav, tf and sph. the most parsimonious model explaining variation in rf included the factors biome category and body mass of which the former was the most important variable in the model. generally, bats from the desert biome use significantly lower frequencies than succulent karoo bats. also, bats inhabiting the forest biome or regions comprised of multiple biomes use significantly higher frequencies because long–range detection is not an advantage in such habitats. in the first stage of our hmra, body size significantly influenced rf but it only explained 12% of the variation in rf. bats from ls use relatively lower rfs given their body size compared to other sampled populations. the inclusion of ndvi in the second stage of the regression model significantly increased the proportion of variance explained in the model, with ndvi accounting for 80% of the variation in rf after controlling for the effect of body size. i the most parsimonious model is highlighted in bold. df the best-fit linear mixed effects model describes resting frequency variation as a function of biome and body mass in r. capensis. +reference parameter. *centred variable. we also found no relationship between relative humidity and rf but we did discover significant differences in detection distances for large prey and vegetation edge, but not for small or medium sized prey, between populations. there was, however, no difference in detection ranges associated with vegetation or large prey between zpk, skk and dhl and between tf and bkl. bats inhabiting more open habitats used lower frequencies and had longer detection distances than bats in more cluttered habitats, with ls bats having the longest detection distances of both large insects and background vegetation. spatial population genetic structure and patterns of gene flow a total of unique mtdna haplotypes were identified from individuals. haplotype diversity ranged from to and the highest number of unique haplotypes was found in the baviaanskloof area. most populations shared haplotypes with their nearest neighbours and a few haplotypes were shared between more distant populations. we identified three genetically isolated populations consisting largely of unique mitochondrial lineages. complex network relationships characterise the evolutionary history of r. capensis populations sampled in our study. the neighbour-net network revealed numerous reticulations between haplotypes, suggesting several alternative evolutionary pathways among them. while the network recovered a number of clear clades these were not generally structured by biome or geographic proximity. only haplotypes from the desert biome and populations occurring in regions where multiple biomes are connected formed discrete clusters. our investigation of hierarchal population genetic structure revealed significant partitioning of genetic variation at all three levels but most variation occurred within populations rather than between populations or biomes. bayesian clustering identified four spatially explicit genetic clusters in our data. only individuals situated at opposite ends of the species distribution, were assigned to unique clusters while the nine populations between them were assigned to two spatially structured clusters. furthermore, estimates of historical migration rates revealed generally asymmetrical patterns of gene flow between populations situated in different biomes. the main source populations were zpk, bkl and bav and gene flow generally occurred between neighbouring populations. there was also evidence for long distance gene flow from bav to bkl and from dhc to bav but this occurred at relatively low levels. together, these results support a pattern of relatively high regional connectivity and hence minimal fine-scale population structure in the r. capensis. influence of genetic distance and geography pairwise differences in both rf and genetic distance were characterised by significantly positive relationships with geographic distance. rf and genetic distance co-varied with geographic distance and followed a general model of isolation by distance. geographic distance, however, explained only a relatively small proportion of the variation in rf and genetic distance. we also found a significant correlation between rf difference and genetic distance among populations and this remained significant when we controlled for the effect of geographic distance. despite the significance of the correlation, genetic distance only explained a small proportion of the variation in echolocation frequencies. discussion our results reveal significant geographic variation in the resting echolocation frequencies of r. capensis despite substantial historical gene flow across the distribution of this species. body size, genetic distance and geographic distance play minor roles in the evolution of geographic variation in rf in r. capensis. further, despite a lack of strong geographic structure in mitochondrial lineages, biome was identified as the best predictor of rf. in support of this we found a significant relationship between rf and increasing vegetation clutter from west to east across the range of this species. our results suggest that the evolution of geographic variation in rf in the face of homogenizing gene flow in r. capensis was probably influenced by selection for lower echolocation frequencies in less cluttered habitats. however, the relationship we found between rf and habitat type is solely correlative, and therefore a thorough comparison of foraging behaviours of bats between different habitats is required. thus, alternative evolutionary processes e.g. selection for discrete frequency bands or phenotypic plasticity cannot be excluded at this stage. disparities between rf and population genetic structure: trait diversification in the presence of gene flow studies investigating the various evolutionary forces shaping phenotypic and genetic divergence between populations often describe trait variation in the context of substantial population structure and limited gene flow. while phylogeographic patterns of maternally and bi-parentally inherited genetic markers usually concur, discordance between phenotypic and genetic structure is also reported. this is usually attributed to demographic processes that characterize species, such as sex-biased dispersal or secondary contact following historical isolation. similar discordance has been reported in several european and asian horseshoe bats either as a result of male-biased dispersal and female philopatry or historical introgression of mtdna between sister lineages. despite recent advances in testing the evolutionary processes that shape contemporary population genetic structure in horseshoe bats, few studies have specifically evaluated sensory variation within a phylogeographic or population genetic framework in this genus. in our study, we expected rf divergence in the r. capensis to reflect mtdna structure given that the fine tuning of the echolocation frequency of young horseshoe bats are partly learned from their mothers, female philopatry and male dispersal characterize other horseshoe bats studied to date, and the degree of rf divergence observed among populations is similar to that reported for other high duty cycle bats which have corresponding significant genetic structure among maternal lineages. our results instead reveal minimal genetic structure amongst r. capensis populations. a bayesian clustering analysis identified four dominant genetic lineages which broadly reflect estimated patterns of regional gene flow that are not limited by biomes; notably only ls and tf are identified as unique genetic clusters. a number of mitochondrial haplotypes were also found to be shared between geographically distant populations; these may reflect long-distance dispersal events or the retention of common ancestral polymorphisms. mitochondrial data clearly reveals a recent evolutionary history of complex reticulations in r. capensis, suggesting that gene flow and not incomplete lineage sorting is responsible for the observed genetic structure or lack thereof. one caveat of our analytical approach is the statistical non-independence of our populations due to the substantial gene flow we detected between them. populations that are more closely related to one another or exchange higher numbers of migrants are likely to have similar phenotypic trait values irrespective of the local selection pressures they experience. ideally, the inclusion of our calculated migration matrices between populations in our ecological models would control for the effect of gene flow, but the development of effective computational methods to include the complex reticulate relationships among population’s remains challenging. nonetheless, the spatial distribution of the four dominant genetic lineages does not reflect the broad pattern of rf variation among populations of r. capensis. for example, we detected considerable gene flow between populations at skk, zpk and dhl, but no direct gene flow between these populations and the population at dhc, even though they were all assigned to the same genetic cluster. bats from these genetically similar populations use rf’s ranging from - khz. thus the discordance between patterns of genetic and rf variation among r. capensis lineages suggest that gene flow does not significantly contribute to rf variation across the distribution of r. capensis, although this remains to be explicitly tested. furthermore, although rf is also characterised by ibd, geographic distance only accounted for a minor proportion of the variation in rf. interestingly, rf divergence is also positively correlated to some degree with genetic distance, even after controlling for geographic distance, suggesting that local environmental conditions may influence sensory differentiation in areas with some degree of restricted gene flow. however, estimates of maternal gene flow support significant regional connectivity in the recent past and is at odds with the pattern of structuring in rf we observe across populations. this is in contrast to previous studies of high duty cycle bats where population genetic structure generally reflects the variation of sonar frequencies across often widespread species. as we discuss below, this anomaly may be a consequence of the complex interactions between gene flow, diversifying selection and environmentally mediated selection for phenotypic plasticity. phenotypic plasticity can be advantageous if it results in the expression of different phenotypes that increase an individual’s fitness in diverse environments. in this way plasticity can minimise the costs incurred from dispersal into environments with different selection regimes. if plasticity influences rf diversification, it may lead to a situation in which selection does not significantly constrain gene flow among populations, leading to adaptive phenotypic variation in the presence of gene flow. body size and habitat structure predict rf: influence of diversifying selection and adaptive phenotypic plasticity the frequency of acoustic signals scales negatively with body size in a range of organisms including bats; larger bat species produce echolocation calls of lower frequencies than smaller bat species. this relationship also exists within r. capensis with larger bats generally using lower rf’s. however, body size only explained a minor proportion of the variation in rf because concomitant changes in body size and rf were not evident across all populations. for example, although bav bats are not the smallest, they use the highest echolocation frequencies. in contrast, individuals in populations at both ends of the distribution of this species were similar in size but echolocated at the lowest and second highest frequencies respectively. this may explain why previous research on echolocation variation in the species did not support a relationship between body size and rf, and instead suggested the decoupling of echolocation divergence from the evolution of body size. this result was likely an artefact of under sampling trait variation in r. capensis and highlights the difficulties of inferring evolutionary processes from data sets which inadequately sample the true distribution of a trait. our results here suggest that the allometric relationship between body size and rf collapses in populations situated towards the edge of the range of this species. this is perhaps not unexpected given that range edges and ecotones provide novel environments to which species can become locally adapted, leading to significant phenotypic divergence of edge populations from those at the centre of the distribution of a species. this may explain why populations at either end of the species’ range were identified as unique genetic clusters, while the nine sampled populations between them were assigned to only two genetic clusters. paleoenvironmental change from the miocene to pleistocene profoundly impacted the evolution of population divergence and speciation in a wide range of southern african taxa; several studies report a strong link between divergent genetic lineages and the biomes or ecogeographical regions of southern africa for various organisms including reptiles, invertebrates and small mammals including bats. in our study we did not find any clear population genetic divergence with topographical features. neither did we find any support for the humidity hypothesis which proposes that divergence in rf is the result of selection against higher frequencies in humid environments. instead we found that bats in the desert biome used significantly lower frequencies than those occupying forest and areas of transition between multiple biomes. this clinal increase in rf across populations of r. capensis from west to east may be the result of the gradient of increasing vegetation cover and density from west to east. at ls in the west the vegetation was very sparse and consisted of low shrubs. in the east the vegetation ranged from dense fynbos to forest. thus, there is a steep habitat gradient between ls and its nearest neighbours, and selection may therefore dominate in this region. in contrast, plasticity may be favoured as an explanation for rf variation amongst the other populations because the habitat gradients are not as steep. a notable exception is that of the population at tf. at tf bats use similar rf’s to other populations situated in ecotones, and yet appears to be relatively isolated genetically. tf is situated at the interface between aseasonal and summer rainfall zones which, together with the intrinsic habitat heterogeneity of ecotones, may serve as a significant barrier to gene flow. this pattern has been observed for various other species in this region. the positive correlation we found between rf and ndvi suggests that variation in the degree of habitat clutter might explain variation in rf. across our sampling sites, the mean detection distance for large prey and background vegetation edge was significantly different between populations; bats occupying more open habitats have lower rf’s and thus longer detection distances than those in more cluttered habitats, allowing them to detect larger prey or background targets at greater distances. while this result was statistically significant, ls bats only had a cm and cm greater detection distance than their nearest neighbours for large prey and vegetation edge, respectively. although all rhinolophids supposedly fly close to vegetation and may experience even relatively open habitats as cluttered, the cm greater detection distances of the vegetation edge may be advantageous during orientation and commuting flight in the sparse vegetation of ls where the distance between clumps of vegetation are greater than in the fynbos or the forest. further, prey density is also likely to be lower at ls and selection is likely to favour the evolution of lower rf’s that would allow the detection of larger prey at greater distances. there is sufficient empirical evidence to suggest that even rhinolophids, constrained by their echolocation to hunt in narrow space, display some degree of flexibility in the foraging habitat they exploit or the foraging style they adopt as a result of resource partitioning, habitat structure or seasonal changes in prey resources. at least one species of rhinolophid also appears to vary its echolocation frequency in response to different degrees of clutter. within the same nature reserve, greater horseshoe bats use a variety of habitats with differing degrees of clutter and use significantly lower echolocation frequencies in relatively open habitats than in cluttered habitats. it is likely therefore that r. capensis uses both aerial hawking and perch hunting styles to different degrees in the different habitats perhaps also altering its call frequency to deal with different degrees of clutter. the distinctly lower call frequency at ls could possibly be explained by the pronounced clutter gradient between ls and the other habitats occupied by r. capensis. however, our detection distance calculations must be interpreted with caution because different populations may have different echolocation call intensities, which could greatly influence the calculation of maximum detection distance. although differences in habitat structure provide a compelling explanation for different rf’s in r. capensis, an interesting anomaly needs to be accommodated; r. damarensis is sympatric with r. capensis in the extremely arid area of ls but uses frequencies as high as those used by r. capensis in highly cluttered habitats e.g. tf. it seems reasonable to assume that selection would have favoured similar call frequencies, and therefore detection distances, in r. damarensis and r. capensis where they are sympatric in the arid region of ls. however, it is possible that r. damarensis exploits a different foraging niche to r. capensis in this area of sympatry. alternatively, this species may compensate by using higher intensity calls to achieve more or less the same detection distances as r. capensis. of course it is possible that the presence of r. damarensis at ls has selected for the low frequencies we observe in r. capensis. observed frequencies are much lower in the ls population than in the other arid populations despite similarities in body size to the other arid populations. on the basis of its body size, r. capensis at ls should echolocate at approximately khz. instead we observe a mean rf of khz. bats at ls may have shifted their frequency below khz to avoid acoustic overlap with r. damarensis, and maintain effective intraspecific communication. however, the closest known roosts of these two species are km apart and it is not known if the foraging areas of these two species overlap, i.e. if they are syntopic, as required by the acoustic communication hypothesis. nevertheless, character displacement, mediated by some form of resource partitioning or local adaptation, in sonar parameters can contribute to the initial stages of lineage divergence by causing populations in sympatry with heterospecifics to diverge from their respective conspecific populations in allopatry. the result would be reduced gene flow between populations found in different selective regimes or heterospecific assemblages. for example, lemmon showed that acoustic traits important for female preference and mate choice in populations of the chorus frog, pseudacris feriarum, diverged to maximize differences from the heterospecific assemblage present, ultimately promoting reproductive isolation between conspecific populations via sexual selection. ecologically adaptive traits can also promote divergence if divergence has a pleiotropic effect on reproductive isolation via assortative mating; so called ‘magic traits’. in r. philippinensis assortative mating has evolved between size morphs as a by-product of selection for different frequencies used to exploit different prey sizes. the significant and consistent sexual dimorphism we observe in the rfs of r. capensis, may serve a role in sex-specific communication in the species. recent experimental evidence reveals that horseshoe bats and emballonurid bats are indeed able to recognise the sex of conspecifics based on their echolocation calls. thus, the limited gene flow between ls and other populations may be a consequence of ls bats not effectively recognizing other r. capensis as potential mates. divergence in rf may have under-appreciated consequences for the evolution of reproductive isolation via female preference for male rfs in different populations of horseshoe bats. evaluating female preference in ls bats for local versus allopatric rfs may provide intriguing insights into the causes and consequences of sexual selection in horseshoe bats. finally, because r. damarensis only occurs in sympatry with r. capensis at a single site, we were not able to test whether habitat or the presence of r. damarensis offered a better explanation for rf differentiation in r. capensis. an experimental approach is required to test whether r. capensis has shifted its rf to avoid acoustic overlap with r. damarensis. such an approach would evaluate whether r. capensis from ls responds differentially to the echolocation calls of heterospecifics and acoustically divergent conspecifics using playback experiments. at a ‘local to regional’ scale geographic distance is not a significant barrier to gene flow in r. capensis, and the evolution of sensory divergence in the presence of this gene flow may also reflect a degree of adaptive phenotypic plasticity in rf. despite the tight coupling between rf and the acoustic fovea in high duty cycle bats, empirical studies have shown that species are able to shift their rf’s in response to both neighbouring conspecifics and different ambient noise conditions. such small shifts in frequency may explain the range of rf variation in the southern and eastern populations of our study where plasticity in response to slightly varying degrees of vegetation clutter towards the east might occur. however, it is unlikely to explain the khz shift in the lekkersing bats. nonetheless, it appears that southern and eastern populations of r. capensis use rf’s within the best hearing range of the acoustic fovea of their nearest neighbours, possibly facilitating gene flow and promoting relatively flexible rf’s in these populations. while small shifts in the acoustic fovea and its corresponding reference frequency are possible in high duty cycle bats, we do not know the precise limits of the flexibility of the acoustic fovea. long-term experimental studies evaluating the change in rfs in response to the rfs of bats from acoustically divergent populations may shed light on the degree of plasticity in this system. alternatively, the relative influence of plasticity versus selection can be evaluated indirectly. for example, selection may better explain our observations if variation in functional genes involved in hearing co-varies with rf variation across populations. recent studies reveal a wide range of candidate hearing genes which show strong signals of ancestral positive selection in the evolution of echolocation in bats and cetaceans. selection may also be favoured as an explanation for variation in rf if there is a strong correlation, independent of variation in body size, between rf and morphological features directly involved in echolocation production and emission. previous research investigating morphological correlates of rf in r. capensis revealed that rf is best predicted by nasal chamber length, but a thorough evaluation of skull morphology variation across the distribution of the species is required. the social life of bats may also influence the relative roles of diversifying selection versus plasticity across the distribution of a species. if bats are able to recognise conspecific calls from a range of acoustically divergent populations this might suggest that selection for some degree of plasticity in the trait is also favoured. classic playback experiments can be used to assess the sensitivity of individuals to the range of frequencies exhibited by a species. these two hypotheses are clearly not mutually exclusive; and their relative influences across the highly heterogeneous environments of r. capensis certainly merit further attention.  this study reveals significant sensory trait variation in the cape horseshoe bat despite substantial historical gene flow. while genetic and geographic distances do influence sensory variation to some extent, our results suggest that differences in habitat complexity across the range of the cape horseshoe bat may be the dominant driver of sensory differentiation in this system. classical divergent selection together with some degree of phenotypic plasticity may be responsible for rf variation in the presence of gene flow. however, an investigation of the variation in foraging behaviour within and between populations of the cape horseshoe bat is required to support our results. nonetheless, our findings highlight the importance of population level analyses to elucidate the complex interactions among selection, plasticity and gene flow in the evolution of adaptive trait variation and reveal a number of interesting avenues for future research into the evolution of this remarkable sensory system. competing interests all authors have declared that no competing interests exist. authors’ contributions ljo, dsj and jmb conceived of and designed the study and carried out the fieldwork. ljo generated the molecular data, and conducted all genetic and ecological analyses with input from jmb and dsj. all authors contributed to the writing of the manuscript and read and approved the final manuscript. supplementary material additional file 1: figure s1 map of the biomes of south africa together with the geographic locations of the populations of rhinolophus capensis sampled in this study biomes are from rutherford et al. and lines indicate the approximate positions of the different rainfall zones of south africa: solid line indicates the winter rainfall zone; dashed line indicates all year rainfall zone; and the rest of south africa receives summer rainfall. the key to population acronyms are found in table  click here for file additional file 2: table s2 climatic variables for each population and the mean detection distances for prey and background vertical targets. detection ranges calculated from the method of stilz and schnitzler. the size range of prey taken by r. capensis at de hoop is 2- mm and this covers the range of small, medium and large prey in. climatic data were obtained from the nearest weather stations and provided by the south african weather service. click here for file additional file 3: figure s2 the distribution of unique haplotypes across the populations of rhinolophus capensis sampled in this study. key to acronyms given in table  click here for file additional file 4: table s2 genetic variability in populations of rhinolophus capensis based on bp of the mitochondrial control region. haplotype diversity, number of haplotypes, nucleotide diversity and number of polymorphic sites are shown. click here for file additional file 5: figure s3 neighbour-net network based on p-corrected distances of the unique haplotypes isolated in this study. each circle represents a unique haplotype coloured according to the biome/s in which it occurs. pie graphs indicate where haplotypes are shared across several biomes. click here for file additional file 6: table s3 lower and upper profile likelihood percentiles of m, the number of immigrants per generation scaled by mutation rate, calculated in migrate-n. click here for file acknowledgements we thank b. d. kruger, h. babiker, c. hartnick, t. haupt, h. craven, s. stoffberg, e. kelly, c. sirami, d. peinke, o. smit, m. cunnama, s. rakers, l. lange, a. mead, a. thomas, s. jordaan, f. p. d. cotterill, m. brigham, a. brigham and a. doty, for assistance in the field. thanks also to g. mutumi for assistance with arcgis, and h. craven for permission to publish her photograph of rhinolophus capensis taken while assisting with fieldwork. this research was funded by grants to ljo and dsj from the south african research chair initiative of the department of science and technology and administered by the national research foundation of south africa. we also thank two anonymous reviewers for their constructive comments on previous versions of this manuscript.
we argue that both selection for increased detection distance in relatively less cluttered habitats and adaptive phenotypic plasticity may have influenced the evolution of matched echolocation frequencies and habitats across different populations. our study reveals significant sensory trait differentiation in the presence of historical gene flow and suggests roles for both selection and plasticity in the evolution of echolocation variation in r. capensis. these results highlight the importance of population level analyses to i) illuminate the subtle interplay between selection, plasticity and gene flow in the evolution of adaptive traits and ii) demonstrate that evolutionary processes may act simultaneously and that their relative influence may vary across different environments. across heterogeneous environments selection and gene flow interact to influence the rate and extent of adaptive trait evolution. gene flow between selectively divergent environments may favour the evolution of phenotypic plasticity or conversely, plasticity itself may promote gene flow, leading to a pattern of trait differentiation in the presence of gene flow. here we test the hypothesis of ‘adaptive differentiation with minimal gene flow’ in resting echolocation frequencies of cape horseshoe bats across a gradient of increasingly cluttered habitats. although bayesian analysis of population structure uncovered a number of spatially defined mitochondrial groups and coalescent methods revealed regional-scale gene flow, phylogenetic analysis of mitochondrial sequences did not correlate with rf differentiation. resting echolocation frequencyneutral evolutionmitochondrial dnagene flowsensory ecologyrhinolophidae instead, habitat discontinuities between biomes, and not genetic and geographic distances, best explained echolocation variation in this species. plasticity can be adaptive if it promotes colonization and survival in novel environments and in doing so may increase the potential for future population differentiation via selection. our analysis reveals a geographically structured pattern of increasing rf from open to highly cluttered habitats in r. capensis; however genetic drift appears to be a minor player in the processes influencing this pattern. this complex relationship is further influenced by the rarely considered role of phenotypic plasticity in the evolution of adaptive population variation.
 across heterogeneous environments selection and gene flow interact to influence the rate and extent of adaptive trait evolution. this complex relationship is further influenced by the rarely considered role of phenotypic plasticity in the evolution of adaptive population variation. plasticity can be adaptive if it promotes colonization and survival in novel environments and in doing so may increase the potential for future population differentiation via selection. gene flow between selectively divergent environments may favour the evolution of phenotypic plasticity or conversely, plasticity itself may promote gene flow, leading to a pattern of trait differentiation in the presence of gene flow. variation in sensory traits is particularly informative in testing the role of environment in trait and population differentiation. here we test the hypothesis of ‘adaptive differentiation with minimal gene flow’ in resting echolocation frequencies of cape horseshoe bats across a gradient of increasingly cluttered habitats.  our analysis reveals a geographically structured pattern of increasing rf from open to highly cluttered habitats in r. capensis; however genetic drift appears to be a minor player in the processes influencing this pattern. although bayesian analysis of population structure uncovered a number of spatially defined mitochondrial groups and coalescent methods revealed regional-scale gene flow, phylogenetic analysis of mitochondrial sequences did not correlate with rf differentiation. instead, habitat discontinuities between biomes, and not genetic and geographic distances, best explained echolocation variation in this species. we argue that both selection for increased detection distance in relatively less cluttered habitats and adaptive phenotypic plasticity may have influenced the evolution of matched echolocation frequencies and habitats across different populations.  our study reveals significant sensory trait differentiation in the presence of historical gene flow and suggests roles for both selection and plasticity in the evolution of echolocation variation in r. capensis. these results highlight the importance of population level analyses to i) illuminate the subtle interplay between selection, plasticity and gene flow in the evolution of adaptive traits and ii) demonstrate that evolutionary processes may act simultaneously and that their relative influence may vary across different environments. resting echolocation frequencyneutral evolutionmitochondrial dnagene flowsensory ecologyrhinolophidae 