Introduction

Understanding the mechanisms underlying biodiversity patterns and community assembly is a major goal in community ecology (Mori et al., 2018), particularly in the current scenario of increasing threats to biodiversity (Dudgeon et al., 2006). The study of beta diversity (i.e. variation in species composition among sites; Anderson et al., 2011) may offer insights regarding the factors driving biodiversity patterns (Socolar et al., 2016), especially in highly heterogeneous environments (Petsch, 2016; Mori et al., 2018). For instance, environmental heterogeneity (Heino et al., 2015; Leibold & Chase, 2018), dispersal (Padial et al., 2014) and habitat productivity (Chase, 2010; Bini et al., 2014) are regarded as major drivers of beta diversity. Environmental heterogeneity promotes beta diversity because, when dispersal is sufficient, differences in abiotic conditions among sites allow the colonization of suitable sites by different sets of species (Leibold & Chase, 2018). Higher productivity allows for a stronger role of stochastic assembly processes, mainly through more intense priority effects, leading to higher compositional variation among communities in more productive environments (Chase, 2010). However, there is a paucity of studies on the extent to which each local community contributes to the total variation in community composition within a metacommunity, namely, the local contribution to beta diversity (LCBD; Legendre & De Cáceres, 2013; Vilmi et al., 2017; Landeiro et al., 2018).

Sites (e.g. streams) with higher LCBD values exhibit substantial dissimilarity in species composition when compared to the regional (e.g. catchment) typical community composition (Legendre and De Cáceres, 2013). It is also possible to investigate how unique sites are in terms of species replacement (LCBDRep) or nestedness/richness difference (LCBDNes) (Legendre, 2014; Szabó et al., 2019). Thus, sites with higher LCBDRep are those with higher species replacement in relation to the typical community, such as streams in transition zones between headwaters and mainstreams where environmental characteristics are unique (Legendre, 2014). On the other hand, higher LCBDNes values reflect sites with very low species richness, as may be the case of headwater or polluted sites, or very high species richness, such as downstream sites (Legendre, 2014).

So far, research suggests that species-compositional uniqueness in freshwater ecosystems can be driven by water characteristics (Pajunen et al., 2017; Szabó et al., 2019) and land use (Heino et al., 2017; Winegardner et al., 2017). To our knowledge, studies searching for correlates of species-compositional uniqueness tend to focus on testing the importance of specific environmental variables (e.g. Vilmi et al., 2017; Sor et al., 2018; Szabó et al., 2019). An alternative and interesting approach consists in testing the relationship between species-compositional uniqueness and environmental uniqueness. This issue is especially important considering the homogenization of abiotic conditions due to human-induced disturbances (Petsch, 2016). For instance, a positive relationship between compositional and environmental uniqueness would indicate that more environmentally different sites should be prioritized because they include species compositions deserving either conservation or restoration efforts (Legendre, 2014).

Streams are subject to different environmental gradients (size, hydrology, physical and chemical conditions) and contain groups of organisms with different traits and environmental requirements (e.g. periphytic microalgae and insects). Near-pristine streams may show high variation in physical conditions (e.g. water flow and substrate composition) even within the same reach (Heino et al., 2013), but are not expected to show much variation in chemical conditions, such as nutrients and dissolved oxygen (Allan & Castillo, 2007). In addition, as streams have unidirectional flow, site position within streams may be an important factor structuring communities (Carrara et al., 2012; Durães et al., 2016). For example, environmental selection and dispersal limitation may be major forces driving variation in upstream reaches, while environmental selection and intensive dispersal shape communities in more connected reaches downstream (Brown & Swan, 2010; but see Henriques-Silva et al., 2019). Thus, because downstream sites receive organisms from upstream sites by drift (Swan & Brown, 2014; Lancaster & Downes, 2017), it is expected that upstream sites would have more unique communities and that compositional uniqueness in terms of nestedness would be more strongly related to site position than uniqueness in terms of species replacement.

We investigated the compositional uniqueness (i.e. the local contribution to beta diversity, LCBD) of periphytic diatoms and insects of near-pristine streams and tested whether compositional uniqueness of riffles within streams was positively correlated with environmental uniqueness and riffle position (from downstream to upstream reaches). We also tested whether compositional uniqueness in terms of species replacement was positively related to environmental uniqueness and whether compositional uniqueness in terms of nestedness was positively correlated with riffle position.

Methods

Study area

The study was conducted in the Carmo River Basin (Fig. 1), located in the Intervales State Park (24°18′S, 48°25′W; São Paulo State, Brazil). This protected area has 48.000 ha and encompasses part of the largest portion of the preserved Atlantic Forest in the State of São Paulo (Morellato et al., 2000). The area of the Carmo River drainage is entirely located within the park. The region is characterized by an average annual rainfall of 2040 mm; the air temperature ranges from 15º to 30°C during the austral summer (September–March) and from 0º to 25°C during the winter (April–August) (Costa & Melo, 2008). The climate is classified as humid subtropical (Alvares et al., 2013).

Fig. 1
figure 1

Positions of the first and last riffles studied of each stream in Carmo River Basin (gray circles). Blue lines symbolize the hydrographic network of Carmo River and the numbers indicate the nine streams sampled in this study

Biological and environmental data

We sampled 10 riffles in nine streams (totaling 90 riffles) in April 2015. Stream order ranged from 2nd to 4th. Within each stream, the riffles were ~ 10 to 50 m distant from each other and the distances between the most upstream and the most downstream riffles ranged from 190 to 430 m. At each riffle, we sampled periphytic diatoms from 10 stones and pooled the material to constitute a single sample for each riffle. For each stone, we brushed an area of 25 cm2 using a soft bristle brush. In the laboratory, we oxidized the samples using potassium permanganate (KMNO4) and concentrated hydrochloric acid (HCl) and mounted permanent slides using Naphrax® mounting medium. We counted 500 valves from each sample using a Zeiss Primo Star microscope with 1000 × magnification. Diatoms were identified to species or variety level using specialized literature (Metzeltin & Lange-Bertalot, 1998, 2007; Metzeltin et al., 2005). We sampled insects using a kick-net with a mesh size of 0.50 mm. At each riffle, we took a 2-min kick-net sample by gently kicking the stony bottom of different microhabitats (e.g., which considered differences in current velocity, depth, and substrate particle size; Heino et al., 2018; Valente-Neto et al., 2018). The samples were preserved in 70% ethanol and taken to the laboratory for further processing and identification using specialized literature (Domínguez et al., 2006; Heckman, 2006; Domínguez & Fernández, 2009). Different groups (Coleoptera, Ephemeroptera, Megaloptera, Odonata, Plecoptera and Trichoptera) were identified to genus level. We chose these orders because they include many genera that are usually abundant in riffles and because their larvae exhibit varying responses to changes in the local habitat (Rosenberg & Resh, 1993).

We measured five physical variables per riffle: water depth, water velocity, stream width, substrate composition and percentage of canopy cover. These variables are thought to be important drivers of stream communities (Heino et al., 2013; Astorga et al., 2014). We measured water depth and water velocity in nine points on each riffle using a ruler and a water flow probe (Global Water FP111), respectively. Stream width was measured in three points of each riffle using a measuring tape. The characterization of streambed substrates was performed in three random quadrats of 50 × 50 cm at each riffle. In each quadrat, the percentages of the following substrate types were estimated visually: sand (0.25–2 mm), gravel (2–16 mm), pebble (16–64 mm), cobble (64–256 mm) and boulders (> 256 mm). Percentage of canopy cover (stream shading) was visually estimated in three points of each riffle. We also took water samples in three points of each stream (upstream riffle, middle riffle and downstream riffle) to determine total nitrogen (mg l−1) and total phosphorus (μg l−1) concentrations following standard methods (APHA, 2017) and we used a Horiba® multiparameter probe to obtain in situ data on pH, dissolved oxygen and turbidity (Table 1).

Table 1 Mean and range of values of environmental variables (within riffles) in the nine streams sampled in southeast Brazil

Data analysis

We quantified the compositional uniqueness of riffles within streams separately for periphytic diatoms and insects using the Local Contribution to Beta Diversity (LCBD), an approach developed by Legendre & De Cáceres (2013). LCBD values vary from 0 to 1. The higher a LCBD value of a site, the higher its contribution to total beta diversity. We calculated LCBD for riffles separately for each of the nine streams and used it as response variable in our models (nine streams × 10 riffles = 90 LCBD values). LCBD was calculated for presence–absence (Sørensen Index) and raw abundance data (Bray–Curtis Index). We refer to total compositional uniqueness (LCBDTotal) here to differentiate from LCDB in terms of species replacement and nestedness. We opted to use Sørensen and Bray–Curtis dissimilarity coefficients because both metrics are recommended by Legendre & De Cáceres (2013) and by Legendre (2014). Moreover, by using coefficients based on presence–absence and abundance data we can detect patterns not only derived from changes in species incidence, but also from changes in species abundances (e.g. Siqueira et al., 2015). This is especially important at the small spatial scale of our study (within-stream riffles) because it is more likely that species would differ in their abundances than in their incidences (Legendre, 2014). Also, we calculated LCBD in terms of species replacement (LCBDRepS and LCBDRepBC, for presence–absence and abundance data, respectively) and nestedness (LCBDNesS and LCBDNesBC, for presence–absence and abundance data, respectively) (Legendre, 2014) using the methods of Baselga (2010, 2013). As an alternative, we used the methods developed by Podani & Schmera (2011) and Podani et al. (2013) to calculate the respective LCBD values for presence–absence (Sørensen Index) and abundance data (Bray–Curtis Index) (Legendre, 2014). LCBDNesBC and LCBDRepBC for diatoms were not calculated because we counted a fixed number of valves per riffle, which precludes the detection of abundance gradients between riffles.

We calculated the local contribution to environmental heterogeneity (LCEH), that is, the uniqueness of each riffle in terms of environmental characteristics. A high value of LCEH indicates that a riffle exhibits particularized environmental conditions. LCEH was calculated for each riffle using a standardized Euclidean distance (Legendre & Legendre, 1998). In addition to calculating LCEH using the total environmental matrix (LCEHtot), we also deconstructed this matrix and calculated two other metrics of environmental uniqueness: LCEH generated by stream physical characteristics not related to streambed substrates (LCEHphy; width, canopy cover, velocity and depth) and by substrate heterogeneity (LCEHsub; sand, gravel, pebble, cobble and boulder). We also included the position of each riffle within streams in the models (see below) as a rank variable (1, for the most downstream riffle, up to 10, for the most upstream riffle), since riffle position within streams may be an important factor structuring communities (Brown & Swan, 2010).

We did not include LCEHtot in our models because it was strongly correlated with LCEHsub (r = 0.84). We used linear mixed-effects models (LMMs, Lindstrom & Bates, 1988) with restricted maximum likelihood to test the relationships between compositional uniqueness (LCBD, separately for insects and diatoms), as a response variable, and LCEHphy, LCEHsub and riffle position, as explanatory variables. The variance inflation factor (VIF) was lower than 3 and thus, we included all three variables in the models (Zuur et al., 2009). We used stream identity as a random factor in these analyses. We reported the marginal R2 for each model, following Nakagawa & Schielzeth (2013). Marginal R2 in LMMs describes the proportion of variance explained by the fixed factors alone and is less susceptible to mathematical problems (e.g. negative or lower R2 in larger models) than other R2 metrics proposed for LMMs (Nakagawa & Schielzeth, 2013).

All analyses were done using R (R Core Team, 2018). Package vegan (Oksanen et al., 2018) was used to standardize the environmental variables and to obtain the environmental distance matrices used to calculate LCEH, adespatial (Dray et al., 2018) to obtain replacement and nestedness components and to calculate LCBD and LCEH metrics, nlme (Pinheiro et al., 2018) to calculate LMMs, car (Fox & Weisberg, 2018) to calculate VIF and MuMIn (Barton, 2018) to obtain the variance explained by fixed factors in LMMs (marginal R2 values).

Results

We recorded 260 periphytic diatom taxa and 81 insect taxa in the Carmo River Basin. The most abundant diatoms were Achnanthidium minutissimum (Kützing) Czarnecki, Nupela praecipua (Reichardt) Reichardt and Eolimna minima (Grunow) Lange-Bertalot. For insects, an unidentified genus of the family Hydropsychidae Curtis, the genera Traverhyphes Molineri, Farrodes Peters and Baetodes Needham and Murphy were the most abundant. Species richness in streams ranged from 69 to 146 for diatoms, while genus richness varied from 44 to 70 for insects.

There was no clear spatial pattern of total compositional uniqueness (LCBDTotal) for diatoms or insects among riffles within streams (Fig. 2; Online Resource 1, Fig. S1). Within-stream LCBDTotal values for diatoms ranged from 0.06 to 0.15 for presence–absence data and from 0.06 to 0.25 for abundance data. Similarly, for insects, LCBDTotal values ranged from 0.05 to 0.15 and from 0.06 to 0.23 for presence–absence and abundance data, respectively.

Fig. 2
figure 2

Simplified map of the Carmo River Basin showing compositional uniqueness (local contribution to beta diversity, LCBDTotal values) using presence–absence (Sørensen index) data for periphytic diatoms (a) and insects (b). Arrows inside boxes indicate flow direction. The size of the circles is proportional to the LCBDTotal value, blue and red circles represent significant (P < 0.05) and non-significant values of LCBDTotal, respectively. A detailed map can be found in Fig. 1

Results for compositional uniqueness using Baselga’s and Podani’s approaches were similar and, thus, for brevity, we show here only the results based on Baselga’s indices (see Online Resource 2 for results based on Podani’s indices). The compositional uniqueness in terms of species replacement and nestedness of diatoms (Fig. 3) and insects (Fig. 4; Online Resource 1, Fig. S2) did not show spatial patterns. In general, for both diatoms and insects, compositional uniqueness generated by replacement showed similar values among riffles within each stream, while compositional uniqueness generated by nestedness showed high variability among riffles, with usually one riffle per stream showing a much higher value than the others (Figs. 3, 4; Online Resource 1, Fig. S2).

Fig. 3
figure 3

Simplified map of the Carmo River Basin showing compositional uniqueness in terms of nestedness (LCBDNesS) (a) and species replacement (LCBDRepS) (b) using presence–absence (Sørensen index) data for periphytic diatoms. Arrows inside boxes indicate flow direction. The size of the circles is proportional to the LCBD values. Significance of the values was not evaluated. A detailed map can be found in Fig. 1

Fig. 4
figure 4

Simplified map of the Carmo River Basin showing compositional uniqueness in terms of nestedness (LCBDNesS) (a) and species replacement (LCBDRepS) (b) using presence–absence (Sørensen index) data for insects. Arrows inside boxes indicate flow direction. The size of the circles is proportional to the LCBD values. Significance of the values was not evaluated. A detailed map can be found in Fig. 1

Only uniqueness in substrate composition of riffles (LCEHsub) showed a positive relationship with total compositional uniqueness of diatoms (presence–absence data) (Table 2). For insects, we did not find any relationship between LCBDTotal and the explanatory variables (Table 2). LCBDNes (obtained using both Baselga and Podani methods) showed a significant, but weak, positive relationship with uniqueness in substrate composition (LCEHsub) for both diatoms (presence–absence data) and insects (abundance data) (Tables 3 and 4, Online resource 2, Tables S1 and S2). LCBDRep was not correlated with the explanatory variables independently of the type of data (presence–absence or abundance) and the biological group (Tables 3 and 4). However, using the Podani’s approach, LCBDRep of insects (abundance data) was negatively correlated with LCEHsub (Online resource 2, Table S2).

Table 2 Results of linear mixed-effects model using compositional uniqueness (local contribution to beta diversity, LCBDTotal) of periphytic diatoms and insects as response variables (degrees of freedom = 78)
Table 3 Results of linear mixed-effects model using compositional uniqueness in terms of nestedness (LCBDNes) and species replacement (LCBDRep) of periphytic diatoms as response variables (degrees of freedom = 78)
Table 4 Results of linear mixed-effects model using compositional uniqueness in terms of nestedness (LCBDNes) and species replacement (LCBDRep) of insects as response variables (degrees of freedom = 78)

Discussion

Contrary to our expectations, total compositional uniqueness of both periphytic diatoms and insects were poorly explained by environmental uniqueness and riffle position. In addition, our expectation that compositional uniqueness in terms of species replacement and nestedness would be explained by different factors was only partly corroborated. These results indicate that understanding the mechanisms responsible for beta diversity patterns is far from trivial, as more unique habitats are not necessarily the ones harboring more unique communities. This is also in line with other studies indicating the difficulty in finding consistent correlates of beta diversity (Heino & Grönroos, 2017; Lopes et al., 2017; Ceschin et al., 2018).

We expected that compositional uniqueness would be positively explained by riffle isolation within the stream network (i.e. more upstream reaches would contain more unique communities). This relationship should be even stronger when analyzing compositional uniqueness in terms of nestedness because upstream sites are isolated and tend to be dispersal-limited and thus to present lower species richness than downstream sites (Carrara et al., 2012; Jyrkänkallio-Mikkola et al., 2018). Although several studies have shown that site position within the stream network may be a proxy for isolation and thus a key factor structuring communities (Brown & Swan, 2010; Jyrkänkallio-Mikkola et al., 2018), our prediction was not supported. Riffles were relatively close to each other in the streams we sampled (the distance between the first and last reaches ranged from 190 to 430 m) and, due to these short distances, dispersal among riffles was likely high. Aquatic insects may have high dispersal rates along the stream channel (Lancaster & Downes, 2017), especially in regions where many species have multiple reproduction events per year (Vásquez et al., 2009). Thus, the predicted relationship is more likely to be found among streams of different orders (e.g. Finn et al., 2011; Jyrkänkallio-Mikkola et al., 2018) than among riffles within the same stream.

While previous studies tested for an association between compositional uniqueness and mean environmental characteristics, we evaluated whether more unique communities would be found in more unique environments (here called LCEH, local contribution to environmental heterogeneity). In general, compositional uniqueness at the riffle scale has been found to be weakly correlated with local (average) environmental variables and some studies argue that this result may be due to the lack of key explanatory variables (Vilmi et al., 2017), to the reduced species pool in disturbed streams (Tonkin et al., 2016) or to the fact that compositional uniqueness is more affected by large-scale than by local variables (Heino et al., 2017). Our analyses suggest that compositional uniqueness was only weakly related to LCEH in different tests. We, thus, suggest that finding correlates of compositional uniqueness is a challenging and pressing task, as LCBD is a potentially useful metric to select priority areas for restoration (Legendre & De Cáceres, 2013) and conservation (Landeiro et al., 2018).

Our results show that total compositional uniqueness of diatoms and insects was not related to LCEHphy (i.e. to uniqueness generated by width, canopy cover, velocity and depth), but that total compositional uniqueness of diatoms was positively related to substrate uniqueness (i.e. LCEHsub). This means that riffles that mostly deviate from the average composition of substrates within a stream are those that support more unique communities. Because LCBDTotal of diatoms was positively correlated with species richness (r = 0.23, P = 0.030 for presence–absence; r = 0.26, P = 0.011 for abundance data), it could be suggested that those unique communities in more environmentally unique riffles are more species rich than communities in less unique riffles. This result contrasts with the commonly observed negative correlation between compositional uniqueness and species richness (e.g. Legendre & De Cáceres, 2013; Heino et al., 2017; Vilmi et al., 2017; Jyrkänkallio-Mikkola et al., 2018), which could be because we sampled near-pristine streams not affected by human-induced changes in streambed composition. Moreover, despite LCBDRep did not correlate with any variable of environmental uniqueness (using Baselga’s method), the positive relationship between LCBDNes for both diatoms and insects and LCEHsub reinforces the importance of the uniqueness of substrate composition in streams. On the other hand, the unexpected negative relationship between LCBDRep for insects and LCEHsub deserves further attention despite the poor explanatory power, for it indicates higher species replacement in sites with more common substrate composition.

In general, the composition of streambed substrates has been found to be an important factor structuring communities (e.g. Bergey, 2005; Brown & Lawson, 2010; Petsch et al., 2017). For example, in an experimental study, Petsch et al. (2017) found higher beta diversity of periphytic diatoms among rough than among smooth substrates. Further, Brown & Lawson (2010) found a positive relationship between temporal variation in species composition of macroinvertebrates and substrate heterogeneity. Our results provide evidence that not only within-site substrate heterogeneity but also substrate uniqueness is a key factor in the organization of biological communities in streams.

Our results highlight that subtle differences in environmental uniqueness play a role in determining beta diversity of diatoms and insects in near-pristine streams. However, most of our findings suggest that the mechanisms generating biodiversity patterns at small spatial scales are even more complex to understand in undisturbed ecosystems, indicating that beta diversity of different groups of organisms may be explained by different factors. We argue that despite the difficulty in finding consistent correlates of beta diversity, uniqueness in streambed substrate composition is a driver of compositional uniqueness in near-pristine streams and, consequently, a determinant of regional gamma and beta diversity patterns. Thus, these results have implications in the understanding of the effects of human-induced habitat homogenization, especially in regions strongly affected by deforestation and land-use intensification, as is the case of most tropical streams. Finally, we suggest that studies aiming to understand the extent to which local communities contribute to the total variation in a metacommunity should encompass not only mean environmental characteristics but also different metrics of environmental uniqueness.