Metabarcoding of trap nests reveals differential impact of urbanization on cavity‐nesting bee and wasp communities

Urbanization is affecting arthropod communities worldwide, for example by changing the availability of food resources. However, the strength and direction of a community's response is species‐specific and depends on species' trophic level. Here, we investigated interacting species at different trophic levels in nests of cavity‐nesting bees and wasps along two urbanization gradients in four German cities using trap nests. We analysed bee and wasp diversity and their trophic interaction partners by metabarcoding the DNA of bee pollen and preyed arthropods found in wasp nests. We found that the pollen richness increased with increasing distance from city centres and at sites characterized by a high percentage of impervious and developed surface, while the richness of pollinators was unaffected by urbanization. In contrast, species richness of wasps, but not their arthropod prey, was highest at sites with low levels of urbanization. However, the community structure of wasp prey changed with urbanization at both local and regional scales. Throughout the study area, the community of wasps consisted of specialists, while bee species were generalists. Our results suggest that Hymenoptera and their food resources are negatively affected by increasing urbanization. However, to understand distribution patterns of both, wasps and bees in urban settings other factors besides food availability should be considered.


| INTRODUC TI ON
Worldwide, the number of people living in cities is increasing, resulting in an ongoing expansion of urban areas (United Nations, Department of Economic and Social Affairs, Population Division, 2019).In 2022, 6.5% of Germanys' terrestrial surface was sealed by settlement and transport areas, which means that between 2016 and 2019, 52 hectares were sealed every day (Umweltbundesamt, 2021(Umweltbundesamt, , 2022)).
Urbanization can be considered as an extreme example of habitat fragmentation, where patches of green vegetation are small and separated by seemingly inhospitable and impassable obstacles such as houses and roads, complicating foraging activities and the establishment of viable animal populations, in particular of large species (but see Lowry et al., 2013).In addition, expansion of urban areas also leads to the disturbance and degradation of natural and seminatural habitats, impeding the establishment of habitat specialists (Fortel et al., 2014).Hence, urbanization can lead to a decline of species, populations and ecosystem functions, such as pollination (Bates et al., 2011;Fenoglio et al., 2020;McKinney, 2002).
However, urban areas are also habitat to many species (Newbold et al., 2015) that are adapted to the new environment.Hence, the increase of urban areas does not affect all species the same way.
Solitary cavity-nesting bees, a large group of pollinators, may even benefit from urbanization (Theodorou et al., 2017).For example, urban areas provide optimal microclimatic conditions and abundant nesting and foraging resources for the thermophilic bee species Osmia cornuta (Fortel et al., 2016;Kratschmer et al., 2020;Udy et al., 2020).In general, generalistic solitary bees can benefit from higher pollen diversity in urban areas due to the presence of nonnative plants (Udy et al., 2020;Wilson & Jamieson, 2019).Therefore, cities can even serve as a refuge for pollinators, in particular when their diversity is threatened by agricultural intensification (Hall et al., 2017;Theodorou et al., 2020).
In contrast to herbivorous bees, species at higher trophic levels, for example solitary wasps feeding on other arthropods, may respond more strongly and more negatively to habitat change (Korányi et al., 2021;Kruess & Tscharntke, 1994;Mayr et al., 2020).
One explanation is the lower availability of host species, which does not allow the formation of stable predator populations (Thies et al., 2003).This should be particularly true for specialist predators such as aphid-and spider-hunting wasps, whose persistence is closely linked to their prey species.However, a study in an urban context found predatory wasp communities resilient to change, emphasizing that urbanization effects are scale-dependent (Christie & Hochuli, 2009).
To link the impact of urbanization on communities of pollinator bees and predator wasps, we need a better understanding of how their interactions, for example, feeding interactions are affected.
Novel techniques, such as DNA metabarcoding are able to identify food resources at species-level, thereby allowing to reconstruct detailed trophic interactions networks (Tiede et al., 2021).
DNA metabarcoding is particularly powerful, when morphological identification of food resources is either very time-consuming and requiring expert knowledge (such as for pollen) or not possible because hard remains are lacking (such as in faeces).The application of metabarcoding in ecological studies has therefore helped enormously to detect and quantify species interactions for example, of pollinator-flower interactions (e.g., Casanelles-Abella et al., 2022) or of predator-prey-interactions of wasps (Schmack et al., 2021).
In the present study, we used insect samples collected in a citizen science project.The project was conducted by researchers in collaboration with teachers and pupils of the Robert Bosch College Freiburg and enrolled schools in four metropolitan regions across Germany to explore the community structure of cavity-nesting bees and wasps.For the analysis of this study, we used a combination of morphological identification of hymenopteran species and metabarcoding of their food residues in trap nests to investigate their diversity, abundance and structure of trophic interactions.To explore the scale-dependency of urbanization effects we looked at changes in community metrics along two gradients, one mirroring changes at a local scale, the other on a regional scale.We hypothesize that (i) urbanization increases the diversity of pollen, but not the diversity of arthropod prey and (ii) that this translates into positive responses of bees at the lower trophic level but negative responses of wasps at higher trophic levels.

| Study system
Arthropod and pollen samples were collected from trap nests at 18 locations selected within the project "Schulinsektenhaus.de", a large-scale citizen science project exploring the diversity of cavitynesting bee and wasp species at school yards of over 300 locations in Germany.The locations were situated in the cities of Berlin, Cologne, Frankfurt and Hamburg and were selected to represent an urban-rural gradient (Figure 1a; Table S1).Traps consisted of 20 cm long bundles of reed and bamboo in PVC tubes (diameter 11 cm; reed cavity diameter ranged 1-16 mm: Staab et al., 2018).
The percentage of urban area within a radius of 500 m of each site-the approximated average maximum foraging range of bees and wasps (Banaszak-Cibicka & Żmihorski, 2012;Kratschmer et al., 2020)-was assessed using the CORINE Land Cover (CLC5) data set (Umweltbundesamt, 2021) in QGIS 3.12.Within this radius, 15 land-use categories were extracted and subsequently categorized as "urban" (continuous urban fabric, discontinuous urban fabric, industrial or commercial units, port areas, construction sites, sport and leisure facilities) and "nonurban" (green urban areas, nonirrigated arable land, fruit trees and berry plantations, pastures, complex cultivation patterns, broad-leaved forest, coniferous forest, mixed forest, sparsely vegetated areas), respectively (Figure 1b; Choate et al., 2018;Fortel et al., 2014;Udy et al., 2020).In addition, the distance between each location and the city centre (defined by the location of the main railway station) was calculated for each city.
While the percentage of urban area represents a local measure of urbanization, distance from city centre captures urbanization effects on a regional level.

| Sample collection
Trap nests were installed to allow for hymenopteran colonization between March and December 2019.Reed cavities containing insect nests were collected and nests processed in Winter 2019/2020.Biological material from each trap nest was collected under clean conditions using heat-sterilized tools (knife, tweezers and spatula) to avoid cross-contamination.Arthropod remains (faeces, undigested prey tissue) and pollen of a maximum of three brood cells were extracted and stored individually in 2 ml microcentrifuge tubes at −18°C until further processing.Living larva, pupa and imago were reared (8 weeks at 6°C, subsequent weeks at 20°C until development was completed) allowing later morphological species identification.
To avoid over-representation of one hymenopteran species per trap nest, we collected a maximum of 10 bee and wasp nests per species per trap nest location.In total, 318 biological samples from 18 locations were used in this study.

| DNA extraction of arthropod and pollen samples
We extracted the DNA of arthropod samples using a salt-based extraction protocol (Aljanabi & Martinez, 1997) adopting the modifications by Vesterinen et al. (2016).A blank control was included within each batch of 23 individuals to test for DNA carry-over contamination.The extraction of pollen DNA followed the same protocol as for arthropod DNA, but with a maximal tissue mass of 50 mg (Kratschmer et al., 2020).For better lysis, pollen samples were homogenized using 0.6-0.8mm ceramic beads (Bead Tubes Type A from Macherey-Nagel).In total, we isolated DNA from 116 arthropod samples and 212 pollen samples.

| PCR and library preparation
We carried out a two-stage PCR protocol to build the DNA libraries for next-generation sequencing (Vesterinen et al., 2016(Vesterinen et al., , 2018)).
All arthropod samples were analysed using the "Leray" primer pair mlCOIintF (Leray et al., 2013) and jgHCO2198 (Geller et al., 2013), which produced a 313 bp long fragment within the mitochondrial cytochrome c oxidase subunit I (COI) barcoding region.DNA of pollen samples was amplified using the primers ITS3/ITS4 (White et al., 1990), which produced a 389 bp fragment of the internal transcribed spacer region 2 (ITS2).
Each 10 microlitre (μl) PCR contained 5 μl MyTaq Red Mix PCR mastermix (Bioline), 0.5 μl bovine serum albumin (BSA, 3%; Roth), 0.5 μl sterile water, 0.5 mM of each primer, and 3 μl of DNA extract.PCR cycling conditions for primers mlCOIintF/jgHCO2198 followed the protocol in Leray et al. (2013) while primers ITS3/ ITS4 followed the protocol in White et al. (1990).Each PCR was carried out as two separate technical replicates.After the first, locus-specific PCR round, the second-step PCR followed directly, including Illumina-specific adapters with a unique dual-index combination for each single reaction, that is, PCR replicates were also tagged with unique indexes: for a reaction volume of 10 μl, we mixed 5 μl of MyTaq HS RedMix, 500 nM of each primer (i7 and i5) and 3 μl of locus-specific PCR product from the first PCR phase.
For PCR cycling, we used the following protocol: 4 min at 95°C, then 15 cycles of 20 s at 95°C, 15 s at 60°C and 30 s at 72°C, followed by 3 min at 72°C.Indexed PCR products were pooled and purified using a SPRI bead protocol (Vesterinen et al., 2016) at a ratio 1: 0.8, thus eliminating amplicons smaller than 400 bp.Sequencing was performed by Turku Bioscience, University of Turku, Finland, using version 3 chemistry with 300 cycles and 2*300 bp paired-end read length on an Illumina MiSeq platform.
F I G U R E 1 (a) Map of Germany with 18 sampling sites in Berlin, Cologne, Frankfurt and Hamburg marked as black dots.Detailed city map of Cologne with the five sampling sites; areas defined as "urban" are coloured grey, "nonurban" areas are coloured white (b); see Section 2 for details).

| Bioinformatics
The Illumina sequencing run yielded a total of 9,706,850 paired-end reads, which were preprocessed through Q20 filter and demultiplexed to samples based on unique dual-index combinations.The Leray data set consisted of 1,735,981 reads and ITS data set of 7,970,869 reads.
For trimming and further analysis the reads were uploaded to CSC servers (IT Centre for Science, www.csc.fi) and analysed through the bioinformatics pipeline as described in Morrill et al. (2021) as follows.
First, primers were removed separately for R1 and R2 reads by using the Python program cutadapt (Martin, 2011) with 20% mismatch rate for primers and minimum length after trimming 100 bp.Altogether, most of the raw reads were retained after the primer trimming: 1,725,693 trimmed reads for Leray,and 7,955,294 for ITS primers.The subsequent bioinformatics followed the dada2 pipeline, conducted in r (version 3.6.1;R Core Team, 2021), to define the ASVs separately for each primer set (Callahan et al., 2016), with some primer-specific enhancements and modifications based on trials with a small subset of data.For the filterAndTrim step, the maximum allowed expected errors (maxEE parameter) was set to 1, and the number of bases after which bases were truncated (trunclen parameter) was set to R1: 200, R2: 160.The Leray set was represented by 1324 ASVs in 1,335,484 nonchimeric (denoised) reads, and the ITS set with 1268 ASVs in 4,333,180 nonchimeric (denoised) reads.Leray ASVs were assigned to taxonomy with SINTAX algorithm as implemented in USEARCH using all the public sequences on BOLD Systems (http://www.boldsystems.org)with species identification (Edgar, 2010).To complement the taxonomic information, we used a custom bold-script to retrieve BIN codes and full taxonomic paths for the assigned ASVs (Vesterinen et al., 2020).When comparing the taxonomic placements between the two approaches, we found that one ASV (ASV_5) was incorrectly defined as an insect (Coleoptera, Elateridae, Alaus melanops), although it seemed to be a mucor Fungi (Lichtheimia ramosa).This was an error in one database record, and was later confirmed by a database search and comparing the individual ASV using blast (Altschul et al., 1990).
This ASV was subsequently filtered away from the final data set.ITS sequences were assigned using both ITS-plant databases (Banchi et al., 2020) and Fungi database Protax-fungi (Abarenkov et al., 2018).
Next, the nonchimeric seqtabs (= ASV × sample matrices) were filtered for wrongly assigned reads based on the negative controls (extraction blanks and PCR negatives) by removing the reads assigned to an ASV from each sample where the read count was below the read count of any negative control.For Leray, only three ASVs contained reads in negative control samples, altogether 27 reads.Then, we defined the following thresholds from the SINTAX probabilities for each locus; Leray: species <0.6, genus <0.4,family <0.3, and order <0.2;ITS2: species <0.9, genus <0.8, family <0.5, and order <0.2.We collapsed and summed up the reads of all ASVs that were identified to the same taxa within samples and then removed target taxa from the samples if only one of the replicates had produced reads.To remove reads that could have been misassigned during index demultiplexing (known as "tag-jumping" or "sample cross-talk"), we defined a general tag-jumping rate (0.05%).
Then, we removed any ASV with a proportion of reads less than the specified tag-jump rate of the total read sum of the samplespecific read number.Then we removed all the matches to nontarget: in the Leray set 722,235 Arthropoda reads (~76%) remained in the final data set.The removed ASVs were analysed, and they consisted mainly of microscopic Fungi and some Bacteria, such as Rickettsiales, known endosymbionts of arthropods.For the ITS2 data, only 2265 reads (~0.05%) were from plants, and the rest were Fungi.
A feeding interaction was verified when a minimum of five prey and pollen sequences, respectively, were detected within the two technical replicates of a sample (Alberdi et al., 2018).In addition, we only accepted species as prey and pollen food, that were already described as such in specific literature (e.g., Blösch, 2000), eliminating other coamplified species such as nest-dwelling bark lice.

| Statistical analysis
All statistical analyses were conducted in r version 4.1.1(R Core Team, 2021).The proportion of resources (arthropod prey and pollen respectively) in response to the explanatory variables "distance from city centre" and "percentage of urban area" were analysed using multinomial models (nnet package; Tiede et al., 2020;Venables & Ripley, 2002).Here, only the five most common pollen and eight most common arthropod prey species were used, as some species only occurred in one or two locations.
To test for an effect of "distance from city centre" and "percentage of urban area" on abundance of bees and wasps and species richness of pollen and arthropod hosts, we used generalized linear mixed-effects models using Template Model Builder (package glmmtmb [Brooks et al., 2017]).While "distance" and "percentage of urban area" were significantly negatively correlated in the bee/pollen data set (Pearson's r = −0.70,p = .034),both variables did not correlate significantly in the wasp/prey data set (Pearson's r = −0.54,p = .057).We therefore included an interaction term for the analysis of prey and wasp species richness and wasp abundance.
All models included "city" as a random effect.As the response variables were counts, we selected the most appropriate error distribution by setting up models with exactly the same fixed-and random-effects structure, using either Poisson, Negative Binomial or Conway-Maxwell Poisson distributions.These models were then compared using Akaike's Information criterion, corrected for small sample sizes (AICc), and we then selected the model with the smallest value of AICc among each set of candidate models.
Using the same model structure, we additionally tested for a correlation between species richness of consumers (bees and wasps) and the species richness of their respective resources (pollen and arthropod prey).

| RE SULTS
Sequences of pollen and prey were clearly identified for 85 of 318 samples (26.7%).From a total of 116 arthropod samples from 17 sites, 67 samples (57.6%) from 13 sites were determined as wasp prey species, which represent 69.5% of the arthropod sequences.
Pollen was identified in 18 out of 212 pollen samples (8.5%), which originated from nine out of 17 sites (Table S2).

| Community composition and interactions
The predatory wasp community consisted of 15 wasp taxa belonging to three families feeding on 29 different arthropod host taxa.
The bee pollinator community consisted of five cavity-nesting bee taxa belonging to two families.Pollen found in bee nests derived from 12 different plant genera belonging to eight families (for details see Table S3).All of the identified predator-prey (n = 39) and plant-pollinator-interactions (n = 17) were true feeding links (Figures 2 and 3).
Wasp species richness significantly increased with increasing distance from the city centre, while percentage of urban area had no effect (Table 1).Species richness of arthropod prey did not change with distance nor with percentage of urban area.
While bee species richness did not change with any of the two gradients, richness of pollen increased with increasing distance  from the city centres and with increasing percentage of urban area.
Bee abundance, but not wasp abundance, increased with increasing distance to city centres (Table 1).

| DISCUSS ION
The present study is the first to simultaneously assess predatorprey and plant-pollinator interactions of hymenopteran species in an urban context.For this we combined citizen-science derived trap nests with molecular tools, allowing to gain a deeper insight into the mechanisms driving the impact of urbanization on hymenopteran communities.Using state-of-the-art DNA metabarcoding techniques and sampling across four German cities, we found that community structure of predatory wasps and bee pollinators and their resources is directly shaped by the magnitude of surrounding urban landscape-expressed as percentage of urban area and distance to city centre.Specifically, we found changes in pollen richness and shifts in community composition of arthropod prey along the two gradients, while distance to the city centre only affected species richness of wasps.

F I G U R E 5
Proportional abundance of the five most abundant plant pollen taxa based on a multinomial model along (a) a gradient of urban area and (b) distance from the city Centre.Probabilities were calculated using the "allEffects" function in the "effects" package in r, backtransforming probabilities from a logit scale with reference to the baseline category.Rugs on the x-axis represent single data points.

(b) (a)
TA B L E 1 ANOVA table of generalized linear mixed effect models of different response variables with the scaled predictor variables percentage urban area (% urban area) and distance from city centres (distance) and their interaction

| Urbanization effects on pollen and wild bees
In accordance with our first hypothesis, food resources of bee pollinators increased with increasing urbanization.Richness of plant pollen, indicating high plant richness, increased with increasing local urban area.Plant richness had been shown to be higher in urban areas compared with rural areas of the same size (Wania et al., 2006).This is because cities and other urban regions harbour many non-native plant species in gardens, parks and balconies (Marquardt et al., 2021;Udy et al., 2020), which benefit from a highly variable landscape structure and favourable temperatures (Schmidt et al., 2014;Wania et al., 2006).Indeed, in pollen of nests collected in highly urban areas we found predominantly non-native garden plants such as Aubrieta and Erysimum but also trees common to gardens and parks such as Prunus (Genus including cherries, plums and almond) and horse chestnut (Aesculus).Only recently, the importance of trees for feeding wild bees in an urban context has been acknowledged (Hausmann et al., 2016).In addition, the ubiquitous plantains (Plantago), form part of urban wild bee diets, as has already been shown for honey bees (Richardson et al., 2021).Therefore, urban areas provide a suitable mix of native and introduced plant species that is used as food resource by generalist bee species.
Pollen richness was also higher in sites far from the city centres, indicating that urbanization can have differential effects, depending on the scale that represents urbanization.Our sampling included sites at school yards of suburban settlements.These sites can be highly sealed and distant to city centres but benefit from a diverse environment on the landscape scale.Particularly in small towns and villages plant species richness can reach high numbers due to the presence of green areas and private gardens, supporting a speciesrich community of pollinators (Udy et al., 2020).
While across all sites pollen richness was positively correlated with wild bee richness, we did not find bee richness to be higher in urban areas and therefore, in respect to bees, no support for our second hypothesis.This is contrasting to studies, which found that species richness of wild bees is highest inside cities and villages (Fortel et al., 2014;Udy et al., 2020).Wild bees benefit from urbanization not only due to the diversity of food sources but also due to extended seasonal availability of pollen and nectar provided by a mixed community of native and non-native flora (Choate et al., 2018;Marquardt et al., 2021;Staab et al., 2020;Wania et al., 2006).In addition, cavity-nesting bees in cities find favourable nesting opportunities including manmade cavities (Hernandez et al., 2009).Also, the high diversity of resources does not translate into a higher number of specialist bee species.Most of the bees in this study belong to polylectic species, which have a broad food spectrum and easily adapt to changes in food resources (Casanelles-Abella et al., 2022;Kratschmer et al., 2020).In this study, only the megachilid bee Chelostoma florisomne was specialized (oligolectic) on the plant family Ranunculaceae (Dobson & Peng, 1997).The lack of specialists was probably due to the composition of plant species at the local landscape, while the competition by polylectic species can have additional negative effects on specialist bees (Konzmann et al., 2020;Török et al., 2022).Hence, a high richness of plant species may not necessarily create a favourable habitat for (often) rare pollen specialists.In contrast, abundance of wild bees was highest at highly urban sites that were far from the city centres.This may simply reflect the habitat choice of generalist bee species, like Osmia cornuta, that occur in higher numbers at sites providing their preferred microclimatic condition and abundant food resources.

| Urbanization effects on arthropod prey and predatory wasps
While we found no effect of urbanization on prey species, predatory wasp richness increased with increasing distance from the city centre, supporting our second hypothesis.In contrast to wild bees, the community of solitary wasps consisted of species with a specialized feeding ecology.Here, we found predators of beetle larvae (e.g., Symmorphus, Eumenidae), moth larvae (Ancistrocerus, Eumenidae) and aphids (e.g., Passaloecus, Crabronidae), spider-hunting species (e.g., Trypoxylon, Crabronidae) and species specialized on barklice (e.g., Rhopalum, Crabronidae).In our study set up, the composition of wasp prey communities was inherently linked to the composition of the wasp community and causation in either direction is possible.However, from a bottom-up perspective the wasp community should change with the availability of prey communities.
While a rich diversity of spiders was found in nests across both gradients, we detected increased abundance of spider hunting wasps in rural sites, indicating increased food availability at rural sites.For example, sheet web weavers, such as linyphiid spiders, benefit from vegetation cover and low landscape fragmentation, resulting in higher abundances and species richness (Argañaraz & Gleiser, 2020).However, in our study, the high occurrence of linyphiid spider Linyphia triangularis in urban settings was probably due to their potential increased occurrences in parks and gardens near our sampling sites.Additionally, beetle larvae, such as leaf beetle Chrysomela vigintipuntata and weevil Stereonychus fraxini have been detected at multiple sites along the two gradients.Both species might benefit from tree species in city parks and along boulevards, such as willows and poplar trees.
Fragmented landscapes are thought to be detrimental to populations of higher trophic guilds, such as parasitoids and predators and can even lead to local extinction due to small prey populations (Kruess & Tscharntke, 1994).Our findings confirmed that wasps benefit from lower degrees of urbanization as more species were found in sites distant from city centres.While we found a positive correlation between species richness of predators and their prey, our results indicate that richness of prey and predators are differentially affected by urbanization.Hence, the decrease of wasp richness in urban environments is potentially decoupled from the availability of prey, not supporting the findings from previous studies (Kruess & Tscharntke, 1994).Wasp species need suitable microclimatic conditions, which are not necessarily present in an urban setting.
Moreover, the adults of many wasp species feed on flowers with easy access to nectar, such as Apiaceae or Mentha, but which may not be present in highly urbanized areas, due to the lack of extensive grassland or river banks.Hence, to understand the diversity and community changes of higher trophic levels we must take into account all of their feeding interactions-as larvae and as adults.
The urban space seems to offer multiple benefits to solitary, cavity-nesting species (Banaszak-Cibicka & Żmihorski, 2012;Sexton et al., 2021).This underlines the claim that effects of urbanization depend on many aspects including taxonomy and functional role of species, but also on the scale of urbanization, with intermediate levels being most diverse (Newbold et al., 2015).The dependency of species richness between wasps and their prey and between bees and their plants shows that there might be more (specialized) species if the food supply is more diverse.A more heterogeneous and vegetated urban environment can support high diversity.Although wasp diversity can be quite resilient to urban effects, it is probably still dependent on food diversity due to the frequently found host specificity (Christie & Hochuli, 2009).
Our study is the first to apply a metabarcoding approach on prey DNA residues found in trap nests, allowing for a noninvasive detection of feeding preferences of cavity-nesting wasps.In combination with established high-throughput sequencing of pollen collected by pollinator bees (Bell et al., 2016), we were thus able to compare the impact of urbanization on biotic interactions of different trophic levels within the insect order Hymenoptera.As our study provides new insight into the feeding ecology of pollinator bee and predatory wasp species, our metabarcoding approach may even be extended to identify parasitoids and hyperparasitoids feeding on bee and wasp (host) larvae.Identifying these top-consumers will not only add important information for a more complete food web but will also help to assess the impact of top-down forces controlling bee and wasp populations (Osorio-Canadas et al., 2018).Although our metabarcoding approach is advantageous, it requires a careful interpretation of the generated sequencing data.For example, a large part of the arthropod sequences was derived from the hymenopteran host, from parasitoid and parasitic wasps and flies but also from other insects dwelling or foraging in the nests.The excess amplification of these nontarget taxa did not only reduce sequencing success of target DNA, potentially cutting out real feeding interactions, but could also lead to wrong assumptions about width of hymenopteran diets.For example, the crabronid wasp Rhopalum clavipes is a true predator of bark lice (Psocodea).However, bark lice are also common saprophagous dwellers in trap nests.Therefore, we have also detected DNA of bark lice in samples of the specialist spider-hunter Trypoxylon figulus.To rule out incorrect feeding links it was thus crucial to compare our results with published information on the species' feeding biology.Similarly, we relied on rearing and morphological identification of bee and wasp species to avoid potential misidentification through the high diversity of hymenopteran DNA found within nests.On the plant side, the ITS2 region has been successfully applied in multiple pollen barcoding studies but is prone to coamplification of fungi (Bell et al., 2016), which is facilitated by a high prevalence of fungal spores in trap nests.
The benefits of using ITS as marker gene (e.g., established primer sets and comprehensive reference library available) may be offset by the large loss of sequences caused by fungal DNA.To counteract such effects we therefore propose the use of ITS in combination with chloroplast barcoding regions only present in plants, such as rbcl, matK or trnH-psbA in future studies (Bell et al., 2016).

| CON CLUS ION
In this study, we were able to show that hymenopteran species and

CO N FLI C T O F I NTE R E S T
The authors declare no conflict of interest.

FU N D I N G I N FO R M ATI O N
We thank the Robert-Bosch Foundation and the Wissenschaftliche Gesellschaft in Freiburg im Breisgau for funding.

O PE N R E S E A RCH BA D G E S
This article has earned an Open Data badge for making publicly available the digitally-shareable data necessary to reproduce the reported results.The data is available at https://doi.org/10.5061/dryad.cnp5hqc7r.
Arthropod prey species composition of the eight most abundant species significantly changed with increasing urban area and distance from the city centre (Multinomial Model: Percentage urban area: χ 2 = 13.93,df = 5, p = .016;Distance: χ 2 = 42.02,df = 5; p < .01; Figure 4a,b).Across the urbanization gradient, the herbivores Chrysomela vigintipunctata (Coleoptera: Chrysomelidae) and to a lesser degree Stereonychus fraxini (Coleoptera: Curculionidae), Clavigesta purdeyi (Lepidoptera: Tortricidae) and the spider species Phylloneta impressa (Araneae: Theridiidae) were detected almost constantly in wasp nests regardless of the percentage of urban area.In contrast the spider species Linyphia triangularis (Araneae: Linyphiidae) dominated wasp diet only in highly urban areas (90%-100% cover).We also detected a substantial shift in prey community composition with distance from the city centre.While prey diversity was highest within a 20 km radius around the city centre, L. triangularis was the dominating prey outside of this radius.Interestingly, the aphid Nasonovia ribisnigri (Hemiptera: Aphididae) was only found in nests within a 10 km radius around the city centre.The community composition of pollen collected by bees neither changed with urban area (multinomial model χ 2 = 8.31, df = 4, p = .0809;Figure 5a) nor distance to the city centre (χ 2 = 5.61, df = 4, p = .23011).Pollen of Quercus was mostly found in bee nests at low percentage of urban area, and together with Berteroa (Brassicaceae) most abundantly found in nests close to city centres.Pollen of Plantago was associated with a high percentage of urban area.The proportion of Brassicaceae pollen increased with increasing distance from the city centre.F I G U R E 2 Trophic interactions of cavity-nesting wasp species (upper bars) and their arthropod prey groups (lower bars), as identified by DNA metabarcoding.The width of the lower bars corresponds to the relative abundance of prey species found in the trap nest.
r a g n a t h a o b t u s a P h y ll o n e t a im p r e s s a E n o p lo g n a t h a o v a t a O z y p t il a p r a t ic o la A c y r t h o s ip h o p s o c u s c a li f o r n ic u s E li p s o c u

F
Trophic interactions of cavity-nesting bee species (upper bars) and their pollen food (lower bars), as identified by DNA metabarcoding.The width of the lower bars represents relative abundance of plant pollen species found in the trap nest.
x i n u s F a l l o p i a Q u e r c u s P l a n t a g o A u b r i e t a B e r t e r o a E r y s i m u m B r a s s i c a c e a e A e s c u l u s M a l u s P r u n u s R a n u n c u l u s Proportional abundance of the six most abundant arthropod prey taxa based on a multinomial model along (a) a gradient of urban area and (b) distance from the city Centre.Probabilities were calculated using the "allEffects" function in the "effects" package in r, back-transforming probabilities from a logit scale with reference to the baseline category.Rugs on the x-axis represent single data points.
their food resources can respond positively or negatively to urbanization.The response depends on the functional role of species and on the scale that is used to represent urbanization.Further studies including the assessment of background occurrences of, for example, flowers, host plants of herbivores, herbivores and even spiders may be necessary to fully resolve the multiple mechanisms that interactively alter Hymenoptera communities in an urban context.As Hymenoptera are important for many ecosystem functions such as pollination and pest control, a diverse and abundant community of Hymenoptera should be preserved.AUTH O R CO NTR I B UTI O N SEllen Dürrbaum, Bernhard Eitzinger and Felix Fornoff conceived the study and planned its design.Ellen Dürrbaum performed morphological identification of wasp and bees and conducted molecular analysis assisted by Bernhard Eitzinger.Eero J. Vesterinen and Bernhard Eitzinger conducted bioinformatic analysis.Ellen Dürrbaum, Felix Fornoff, Bernhard Eitzinger and Christoph Scherber performed the analysis of community data.All authors wrote and reviewed the draft of the manuscript.ACK N O WLE D G E M ENTSWe are indebted to the many citizen scientists from schools across Berlin, Cologne, Frankfurt and Hamburg participating in the project "Schulinsektenhaus.de"and especially Tobias Kellner and the staff and students from the Robert-Bosch United World College Freiburg (years 2018 to 2021) that conducted and supported the project in essential steps.Professor Gernot Segelbacher for providing workspace in his molecular laboratory at the University of Freiburg and Amibeth Thompson for improving the language.Open Access funding enabled and organized by Projekt DEAL.