1/40 1 Supplementary material Appendix A: characteristics of the sample sites

2 Elevation (in meters), GPS coordinates, pitfall activity (in days), year of sampling, mean canopy index (from 0 = absence to 2 = dense),

3 general exposure (F = Favorable, mostly southern exposure and U = Unfavorable, mostly northern exposure), annual mean temperature (°C),

4 annual precipitation (mm), main characteristics (vegetation, dominant species of shrubs or trees) and pictures illustrating some of the 20 sites in

5 the two Pyrenean valleys in which ants were sampled (9 sites in the Madriu valley and 11 sites in the Pique valley).

6 Annual mean temperature and annual precipitation were obtained from the WorldClim 1.4 database.

7 ABAL = Abies alba, ARUV = Arctostaphylos uva-ursi, BEPE = Betula pendula, COAV = Corylus avellana, FASY = Fagus sylvatica, PIMU =

8 Pinus mugo, PISY = Pinus sylvestris, RHFE = Rhododendron ferrugineum.

9

10 Valleys Alt. (m) GPS coordinates Pitfall activity Year Canopy index Exposure Temperature (°C) Precipitation (mm) Dominant vegetation 11 12 Madriu valley 1351 42° 30‘ 1” N, 1° 33‘ 1” E 7 2006 0.80 F 7.5 1037 Grassland with COAV and BEPE 13 1471 42° 29‘ 5” N, 1° 33‘ 3” E 7 2005 0.90 F 6.4 1102 Grassland with COAV 14 1612 42° 29‘ 4“ N, 1° 34‘ 1“ E 8 2005 0.00 F 5.7 1145 Grassland 15 1941 42° 29‘ 2“ N, 1° 35‘ 4“ E 6 2005 0.90 U 3.9 1263 Forest with BEPE and ABAL 16 2036 42° 29‘ 4“ N, 1° 35‘ 3“ E 6 2005 0.20 F 3.4 1294 Scree with ARUV, PIMU and PISY 17 2067 42° 29‘ 1“ N, 1° 34‘ 6“ E 6 2006 1.20 U 3.2 1308 Forest with RHFE, PIMU and ABAL 18 2280 42° 28‘ 5“ N, 1° 38‘ 2“ E 5 2005 0.35 F 2.6 1350 Grassland with RHFE and PIMU 19 2280 42° 28‘ 2“ N, 1° 34‘ 4“ E 5 2005 0.25 F 2.8 1334 Grassland with PIMU 20 2339 42° 29‘ 3“ N, 1° 34‘ 5“ E 5 2005 0.00 F 3.1 1318 Grassland with PIMU 21 22 23 Pique valley 1009 42° 44‘ 1" N, 0° 37‘ 2" E 7 2007 1.10 F 8.6 1027 Grassland with COAV 24 1044 42° 44‘ 4" N, 0° 37‘ 2" E 6 2007 1.85 U 8.6 1027 Forest with FASY and ABAL 25 1124 42° 44‘ 2" N, 0° 37‘ 1" E 6 2007 1.70 U 8.6 1027 Forest with FASY 26 1422 42° 43‘ 0" N, 0° 39‘ 0" E 6 2007 1.10 F 6.5 1124 Grassland with FASY and ABAL 27 1426 42° 43‘ 2" N, 0° 39‘ 1" E 6 2007 0.75 F 6.5 1124 Grassland with FASY and ABAL 28 1544 42° 43‘ 0" N, 0° 38‘ 2" E 6 2007 1.00 U 6.6 1114 Grassland with FASY and ABAL 29 1641 42° 44‘ 0" N, 0° 38‘ 3" E 6 2007 1.30 F 5.8 1159 Grassland with FASY and ABAL 30 1922 42° 42‘ 3" N, 0° 39‘ 3" E 6 2007 0.05 U 5.7 1165 Grassland with RHFE 31 1997 42° 43‘ 2" N, 0° 40‘ 2" E 7 2007 0.00 F 3.4 1294 Grassland 32 2283 42° 41‘ 3" N, 0° 39‘ 4" E 6 2007 0.00 F 2.7 1337 Grassland and scree 33 2299 42° 41‘ 3" N, 0° 40‘ 0" E 6 2007 0.00 F 2.5 1348 Grassland and scree 34 2/40 35 Madriu valley

36

37

38 Pique valley

39 3/40

40 Supplementary material Appendix B: Results obtained with the different sampling methods

41 Ant species richness (S), number of species occurrences, Simpson’s index of diversity (1-D) and

42 species richness estimators (ICE = Incidence-based coverage estimator, Chao2, Jack2 = 2nd order

43 jackknife) for both sampling methods used (pitfalls and hand collection) for the different transects of the

44 two Pyrenean valleys sampled. The means (±SD) correspond to the means of the three species richness

45 estimators with their standard deviation. The percentage indicates the percentage of ant species collected

46 (compared to the maximum number of species predicted by the 3 species richness estimators) in the

47 different transects.

48

49 50 Pitfalls 51 52 Valleys Alt. (m) S Occurrences 1-D ICE Chao2 ± SD Jack2 Mean ± SD % 53 54 Madriu valley 37 386 0.94 50.60 69.82 ± 26.35 59.82 60.08 ± 9.61 61.58 55 1351 21 85 0.91 32.27 32.40 ± 10.27 35.94 33.54 ± 2.08 62.62 56 1471 14 68 0.88 14.92 14.32 ± 0.89 15.99 15.08 ± 0.85 92.86 57 1612 11 73 0.84 13.28 12.43 ± 2.48 15.70 13.80 ± 1.70 79.69 58 1941 7 28 0.71 8.63 7.32 ± 0.89 8.99 8.31 ± 0.88 84.20 59 2036 10 33 0.76 17.71 13.17 ± 3.94 17.54 16.14 ± 2.57 61.96 60 2067 5 31 0.73 5.00 5.00 ± 0.10 4.15 4.72 ± 0.49 100.0 61 2280 6 38 0.75 6.46 6.00 ± 0.43 7.85 6.77 ± 0.96 88.63 62 2280 6 20 0.74 7.81 6.48 ± 1.24 8.85 7.71 ± 1.19 77.79 63 2339 1 10 0.00 1.00 1.00 ± 0.01 1.00 1.00 ± 0.00 100.0 64 65 66 Pique valley 25 256 0.91 26.54 25.60 ± 1.18 27.01 26.38 ± 0.72 94.76 67 1009 10 25 0.86 12.05 10.71 ± 1.37 12.99 11.92 ± 1.15 83.92 68 1044 3 7 0.57 3.73 3.00 ± 0.24 4.00 3.58 ± 0.52 83.88 69 1124 8 15 0.78 19.80 11.17 ± 3.94 15.54 15.50 ± 4.32 51.60 70 1422 9 19 0.86 10.69 9.95 ± 1.74 12.84 11.16 ± 1.50 80.65 71 1426 8 21 0.77 17.34 17.50 ± 9.63 17.25 17.36 ± 0.13 46.07 72 1544 6 16 0.78 7.16 6.95 ± 2.12 9.70 7.94 ± 1.53 75.60 73 1641 5 18 0.62 7.84 5.48 ± 1.24 7.85 7.06 ± 1.37 70.85 74 1922 9 48 0.84 9.89 9.95 ± 2.16 12.70 10.85 ± 1.61 82.97 75 1997 4 29 0.57 4.62 4.00 ± 0.41 5.85 4.82 ± 0.94 82.93 76 2283 6 30 0.64 10.75 8.85 ± 4.21 11.55 10.38 ± 1.39 57.78 77 2299 4 28 0.57 5.23 4.00 ± 0.24 5.00 4.74 ± 0.65 84.33 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 4/40

97 Hand collection 98 99 Valleys Alt. (m) S Occurrences 1-D ICE Chao2 ± SD Jack2 Mean ± SD % 100 101 Madriu valley 35 264 0.93 39.65 38.48 ± 3.65 43.97 40.70 ± 2.89 86.00 102 1351 23 63 0.92 33.82 27.89 ± 4.45 34.53 32.08 ± 3.65 71.70 103 1471 16 54 0.90 20.34 18.38 ± 3.02 22.69 20.47 ± 2.16 78.16 104 1612 9 40 0.78 11.50 10.43 ± 2.48 13.70 11.88 ± 1.67 75.78 105 1941 5 21 0.72 5.55 5.00 ± 0.24 6.00 5.52 ± 0.50 90.63 106 2036 7 22 0.71 11.74 7.95 ± 1.74 10.84 10.18 ± 1.98 68.78 107 2067 5 16 0.67 5.88 5.00 ± 0.16 5.14 5.34 ± 0.47 93.63 108 2280 5 18 0.74 5.45 5.00 ± 0.42 6.85 5.77 ± 0.96 86.71 109 2280 5 19 0.63 9.47 7.85 ± 4.18 10.55 9.29 ± 1.36 53.82 110 2339 2 11 0.16 3.10 2.00 ± 0.34 3.85 2.98 ± 0.93 67.04 111 112 113 Pique valley 26 240 0.91 30.4 33.47 ± 8.15 36.93 33.60 ± 3.27 77.38 114 1009 12 37 0.87 16.79 15.17 ± 3.94 19.54 17.17 ± 2.21 69.90 115 1044 5 10 0.72 9.29 7.85 ± 4.18 10.55 9.23 ± 1.35 54.17 116 1124 6 8 0.81 12.00 7.9 ± 2.76 11.69 10.53 ± 2.28 56.98 117 1422 8 20 0.84 9.09 8.32 ± 0.89 9.99 9.13 ± 0.84 87.59 118 1426 11 32 0.86 14.29 13.85 ± 3.99 17.55 15.23 ± 2.02 72.23 119 1544 6 12 0.79 7.39 6.24 ± 0.71 7.14 6.92 ± 0.60 86.66 120 1641 4 11 0.64 6.13 4.95 ± 2.07 7.70 6.26 ± 1.38 63.90 121 1922 9 47 0.78 16.61 11.85 ± 3.99 15.55 14.67 ± 2.50 61.35 122 1997 4 13 0.56 5.10 4.00 ± 0.16 4.14 4.41 ± 0.60 90.63 123 2283 5 29 0.63 5.50 5.00 ± 0.42 6.85 5.78 ± 0.96 86.46 124 2299 3 21 0.32 3.00 3.00 ± 0.05 1.29 2.43 ± 0.99 100.0 5/40 125 Supplementary material Appendix C: Sampling site dissimilarity matrix

126 Sampling site dissimilarity matrix computed with the Bray–Curtis distance index on the matrix of species presence/absence. The first

127 letter of the site label indicates the valley in which the transect was located (M for Madriu, P for Pique) and the four digits that follow the

128 elevation of the transect.

129 130 Sites M-1351 M-1471 M-1612 M-1941 M-2036 M-2067 M-2280 M-2280 M-2339 P-1009 P-1044 P-1124 P-1422 P-1426 P-1544 P-1641 P-1922 P-1997 P-2283 131 132 M-1471 0.37 133 134 M-1612 0.51 0.29 135 136 M-1941 0.81 0.83 0.79 137 138 M-2036 0.53 0.52 0.60 0.80 139 140 M-2067 0.87 1.00 1.00 0.33 0.78 141 142 M-2280 0.94 0.91 0.89 0.29 0.80 0.50 143 144 M-2280 0.81 0.91 0.89 0.43 0.60 0.33 0.29 145 146 M-2339 0.93 0.89 0.86 0.56 0.87 0.71 0.56 0.56 147 148 P-1009 0.49 0.47 0.62 0.90 0.56 1.00 0.90 0.90 0.88 149 150 P-1044 0.67 0.81 0.88 1.00 0.78 0.80 1.00 0.83 1.00 0.79 151 P-1124 0.65 0.76 0.81 0.88 0.73 0.86 0.88 0.88 1.00 0.48 0.57 152 P-1422 0.54 0.54 0.55 0.88 0.57 1.00 0.88 0.88 0.83 0.33 0.73 0.37 153 P-1426 0.53 0.59 0.68 0.80 0.62 0.89 0.80 0.80 0.87 0.41 0.67 0.550.39 154 P-1544 0.81 0.82 0.78 0.54 0.89 0.64 0.54 0.69 0.75 0.70 0.82 0.600.63 0.68 155 P-1641 0.67 0.71 0.65 0.83 0.78 0.80 1.00 0.83 1.00 0.68 0.60 0.710.60 0.67 0.45 156 P-1922 0.71 0.85 0.82 0.41 0.74 0.47 0.29 0.41 0.67 0.75 0.73 0.680.60 0.65 0.38 0.60 157 P-1997 0.93 0.90 0.88 0.45 0.88 0.56 0.27 0.45 0.33 0.89 1.00 1.000.86 0.88 0.80 1.00 0.57 158 P-2283 0.87 0.91 0.89 0.38 0.79 0.27 0.23 0.23 0.50 0.90 0.82 0.870.88 0.79 0.67 0.82 0.38 0.20 159 P-2299 0.93 1.00 1.00 0.64 0.88 0.33 0.45 0.45 0.67 1.00 0.78 1.001.00 0.88 0.80 0.78 0.57 0.25 0.20 160 6/40 161 Supplementary material Appendix D: Results of generalized linear models

162 Results of generalized linear models used to examine the relationships between ant species richness and temperature (T°C), exposure

163 (EFavorable/Unfavorable) and mean canopy index (MCI) in the two Pyrenean valleys (VMadriu/Pique) in which ants were sampled. These models were fitted

164 with a Poisson distribution. Five different candidate models, using different combinations of independent variables and interactions were tested

165 (for further details, see data analysis). For each model, the coefficients of each factor are reported in the table (coefficients in bold are significant

166 at P < 0.05).

167

Model 2 2 description Intercept (T°C) T°C EF MCI VP (T°C) x VP T°C x VP Species richness

1) T°C + V M/P 2.48 0.28 -0.54 -0.17 + T°C x VM/P 2) (T°C)2 + T°C + VM/P + 2 2.36 0.03 0.29 -0.32 -0.05 -0.14 (T°C) x VM/P + T°C x VM/P 3) E + MCI F/U 1.96 0.55 0.41 -0.36 + VM/P 4) T°C + EF/U + MCI + VM/P 2.22 0.29 0.26 -0.25 -0.49 -0.08 + T°C x VM/P 5) (T°C)2 + T°C + EF/U + MCI + VM/P + 2.11 0.03 0.30 0.24 -0.27 -0.28 -0.05 -0.05 2 (T°C) x VM/P + T°C x VM/P

168 7/40 169