{'fraction_non_alphanumeric': 0.03001957798564281, 'fraction_numerical': 0.022362410267565802, 'mean_word_length': 5.108424129683763, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Comprehensive inventory of true flies (Diptera) at a tropical site

Estimations of tropical insect diversity generally suffer from lack of known groups or faunas against which extrapolations can be made, and have seriously underestimated the diversity of some taxa. Here we report the intensive inventory of a four-hectare tropical cloud forest in Costa Rica for one year, which yielded 4332 species of Diptera, providing the first verifiable basis for diversity of a major group of insects at a single site in the tropics. In total 73 families were present, all of which were studied to the species level, providing potentially complete coverage of all families of the order likely to be present at the site. Even so, extrapolations based on our data indicate that with further sampling, the actual total for the site could be closer to 8000 species. Efforts to completely sample a site, although resource-intensive and time-consuming, are needed to better ground estimations of world biodiversity based on limited sampling.

A ssessing the richness of the world's biodiversity has long been a goal of biologists. For many groups of organisms, this richness, whether measured in species, interactions, niches, biomass, morphologies, natural histories, behaviors, or other scientific currency, hinges on the megadiverse tropics, especially the New World tropics, where for many groups the greatest number of the world's species occur [1][2][3] . May 4 provocatively stated that what was needed was "to assemble a team of taxonomists, with a comprehensive range of expertise, and then make a rough list of all the species found in one representative hectare in the tropical rain forest… Until this is done, I will not trust any estimate of the global total of species." Indeed, estimated numbers of world species have continued to range from stunningly large totals, such as 30-100 million species [5][6][7] to more modest numbers of 5-10 million species [8][9][10][11][12][13] .
Insects make up the bulk of the world's known species 14 , outside of prokaryotes and fungi, in which species-level assignments are not clear in many taxa. Projections about terrestrial diversity largely hinge on the status of four major groups: Coleoptera (beetles), Diptera (true flies), Hymenoptera (wasps, bees, ants), and Lepidoptera (moths and butterflies). Coleoptera comprise the largest number of named species, but Diptera are possibly the least-studied of these megadiverse groups. Each of the four groups is far more diverse in comparison to more popular and intensively studied vertebrates. For example, the fly family Tipulidae (crane flies) alone includes about the same number of named species as all mammals and birds combined 14 .
For entomologists, the goal of understanding more than a small fragment of tropical diversity has heretofore been largely unattainable, due to the shortage of taxonomists, the dearth of funding, challenging curatorial techniques (such as slide mounting), and the overwhelming numbers of unknown species. Relative to the needs of science, collections are small and limited in scope such that Bickel 15 found collecting intensity to be more correlated with species richness than any inherent characteristics of collecting sites. The number of well-known mainland tropical areas is virtually none. Instead, numbers of species in tropical inventories are estimated by taking small samples of faunas (often including just a few families), and extrapolating against some putatively known larger group or area. Unfortunately, with such extrapolations, there is little anchoring in verifiable data. Even more poorly known is the range of morphologies, life histories, hosts, parasitoids, and other data that make an inventory more than just a number.
One of the world's best-known biotas is that of Great Britain, where generations of naturalists have searched the landscape looking for, recording, and classifying their local biodiversity. There,~24,000 species of insects are found 16 , of which about 7,000 species are Diptera 17 , many more than 4000 Coleoptera. In comparison, for all the research that has been done in the mainland tropics (some islands have been more extensively surveyed), almost no single site has been successfully surveyed by a group of scientists for a major group of biodiversity-rich insects. A single exception is a beetle inventory of Dumoga-Bone National Park in Sulawesi, Indonesia 18 , for which a large effort was made to obtain all species.
In the face of the challenge of understanding tropical diversity of Diptera, a group of dipterists decided to determine all species of Diptera collected from a single site, a cloud forest in Zurquí de Moravia, Costa Rica (hereafter referred to as Zurquí). To make this project feasible, the time scale for collecting (one year), geographical scale (four hectares), and collecting protocols 19 were strictly constrained.
The ZADBI Zurquí All Diptera Biodiversity Inventory project (http://www.tropicalflies.net/) is the first successful modern effort to directly measure species richness of any megadiverse order of insects in a mainland tropical area. We found 4332 fly species based on direct evidence, which is important for other inferences on conservation of natural tropical and non-tropical environments in the world, adjustments of biodiversity study protocols, and understanding the funding needs for study and estimation of the group worldwide.

Results
Number of specimens. The ZADBI collecting effort resulted in 613 sampling events at Zurquí. From the many hundreds of thousands of Diptera collected, 52,947 were available for identification; of these 41,001 were identified. Many thousands of others were examined in alcohol but not identified in the database because they were perceived to be duplicates, or were the wrong sex for identification.
Number of species. From the 41,001 specimens, 4,332 species of Diptera were identified (Supplementary Data 1). Seventy-three of the world's approximately 160 families were collected. We suspect that a small number of other families could theoretically be present (e.g. Platypeza sp., family Platypezidae were collected at Zurquí in 1995), but in general, most families expected to be present were found and treated.
Largest families. The most species-rich family at this site was the Cecidomyiidae (gall midges), with 800 species recorded ( Table 1). As one of the least-studied families of flies in the world (relative to the number of species present), Cecidomyiidae also contain some of the smallest and most fragile specimens. Great care and special handling were necessary to collect, separate and slide mount these specimens without causing damage that would prevent their identification. Only a small fraction of the enormous amount of material collected by the various traps could be mounted and identified, and further work would undoubtedly yield even more species, perhaps allowing the total to exceed 1000. Cecidomyiidae generally have not been included in inventories that use trapping because previous research on plantassociated species of this family concentrated on obtaining all life stages through rearing 20,21 . The ZADBI project is nearly unique in this regard, as we found that specimens of Cecidomyiidae have abundant, previously unused, structural characters, especially in the male genitalia, that make their identification possible. We object to the idea that alone among the Diptera, this family cannot be identified using morphology; the feasibility of this approach is demonstrated by the 800 species recognized herein. A notable exception to the lack of cecidomyiids in inventories is Hebert et al. 22 , who identified taxa of Canadian insects collected by Malaise trapping using DNA barcodes. They found Cecidomyiidae to be significantly underestimated, and extrapolated a worldwide total of 1.8-2.0 million species in this family alone.
The second most species-rich family was Phoridae, with 407 species (Table 1). Like cecidomyiids, phorids were represented in Malaise trap samples in huge numbers, with 100,000 or more specimens from Malaise trap 1 alone. We were unable to process all of this material, but the 407 species recognized is probably well below the actual total present. The third to seventh largest families were Tachinidae, Mycetophilidae, Tipulidae, Drosophilidae, Sciaridae, and Ceratopogonidae, groups that were also documented as abundant and understudied by Brown 23 in other Neotropical Malaise trap samples.
The Zurquí ranking of the top 15 most species-rich families ( Table 1) differs from that of the best known fauna, that of Great Britain 17 , and to that of the current world list 24 . This suggests that the current understanding of species richness per family has important biases, and that especially the world list is dominated by the idiosyncratic way that taxonomy develops. Families with large, showy species; those of agricultural, medical, and veterinary importance; and in one case, those that were the subjects of study by a determined and almost superhumanly productive individual (C.P. Alexander describing over 10,000 Tipulidae), led to taxonomic favorites being ranked as most species-rich (Table 2). Our results suggest that the world list in particular is highly deficient in species of Cecidomyiidae, Phoridae, and other taxa whose lines connecting names from Zurquí to the world fauna in Fig. 1 (on the right side) slope downward to the right.
Genus-level diversity. Generic concepts are human constructs, but are useful when they represent monophyletic assemblages of species. The overall fauna at Zurquí is not dominated by large radiations of species but instead by many genera with a few species in each. For instance, 49% of the genera were represented by one species, 65% by one or two species. The mean number of species per genus is 4.63. These genera are not restricted to Zurquí; instead, they have relatives in other parts of the world 25,26 , notably other sites in Central America.
In contrast to the overall fauna, two genera are extremely diverse at Zurquí (and elsewhere): Megaselia Rondani with 240 species (Phoridae) and Mycetophila Meigen with 136 species (Mycetophilidae). Both were considered "open-ended", nearly impossible groups by Bickel 27 , who declared them too diverse and too difficult to collect in their entirety for us to ever fully know them.
The phorid genus Megaselia represents 60% of the phorid fauna at Zurquí (Supplementary Data 1), but with much of the material still not identified due to the overwhelming number of specimens. The taxonomic status of this genus is uncertain because of questions of its monophyly [28][29][30] . The genus is   4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50  Mycetophila is a morphologically distinctive group, although its monophyly has not been rigorously tested. At Zurquí, this genus is far more diverse than any other mycetophilid genus, making up over half of all species documented in the family (136 of 267; 51%). This proportion is much greater than what is seen in the much better-studied Nordic region of Europe 31-33 , where Mycetophila makes up between 9 and 13% of the mycetophilid species. Despite the predominance of Mycetophila in tropical habitats, however, only four Mycetophila species are named and recorded for all of Costa Rica. It has not yet been ascertained whether any of the four named species were captured at Zurquí or if all 136 species captured in this study are new and undescribed.
Extrapolations. Based on the Chao 1 formula, our data (S obs = 3,925; #singletons = 1,777; #doubletons = 682) give an estimated total of 6647 species, 1.7 times the observed total. These data exclude the phorids, which were processed differently and all of which are singletons. If phorids were included, and their observed number of species (407) scaled in the same way, the projected number of phorids would be 689 species, and the estimate for the total Diptera fauna would be 7336 for the site.
None of the estimators for the sample-based species accumulation curves for the combined 49 families (for which all specimens were extracted and identified) reached an asymptote, although they began to converge on values (Fig. 2). Both graphs show the number of species accumulated to be well below the expected total, with estimators predicting 1071 species for Malaise trap #1 (1.8 times the 590 species actually collected) and 270 species, for Malaise trap #2 (2.3 times the 116 species actually collected) ( Table 3). Rarefaction of the data from the two traps indicate that they were sampling a similar-sized fauna, albeit with Malaise trap #2 collecting more slowly (Fig. 3).

Discussion
Based on the sample-based estimates from the catch of our two Malaise traps, we found that our collecting underestimates the fauna by at least 1.7 times. Thus, our total of 4332 species could easily be 7,364 species (4332 × 1.7), or more likely even higher, since some of our estimates included only 49 families and did not include, among others, the megadiverse cecidomyiids or phorids. The estimated total is similar to that for the individual-based Chao 1 estimations of 7336 species.
Reasonable and predictive extrapolations of global diversity will become available only when more tropical faunas are interpreted at the species level, including those that are small-bodied or otherwise difficult to curate. Until then, we continue to be highly skeptical of projections, especially those at the lower end of the published ranges. For instance, a study of 0.48 hectares of a lowland tropical forest in Panama 9 collected 6144 species of arthropods extrapolated using various models to suggest that the total reserve of 6000 hectares supported 25,000 species. Although including 102 researchers to identify an ecologically broad spectrum of taxa, their taxon sampling was actually quite low for the Diptera, which included only four families (compared to the 73 families in the current study). Of these, Dolichopodidae had 132 species, Asilidae 21, Scatopsidae 16 and Stratiomyidae 24 (178, 20, 22, 36 at Zurquí). This led them to suggest the presence of either 1754 or 1429 species of Diptera, depending on global or local comparisons. Even considering their more limited sampling area and different habitat in the lowlands, this contrasts strongly with the ZADBI collection of 4332 species and a total estimation of about 7300 species. It is likely that Diptera were seriously underestimated due to their constricted taxon sampling, much more so than their statement "…if the global species richness of Nematocera is grossly underestimated, then our estimate of total species richness may be more than twice as high as the one reported here…" indicated. It is consequently uncertain what impact this has on their estimation of 25,000 arthropod species present at their site, as well as their larger extrapolated conclusion that "The robust estimates of local arthropod diversity derived in our study thus support previous estimates of global species richness [of 6.1 million species]." Clearly, the Diptera are much more species-rich than represented in some previous estimates. A comparison of Zurquí diversity 34 family by family with described species from Central America, Colombia, the entire Neotropical Region and the world, showed that current numbers of named species of Diptera are extremely low. Hebert et al. 22 . extrapolated from their collecting that there might be 50,000 species of Canadian Diptera. Considering the Canadian fauna to be 1% of global biodiversity, their extrapolation would lead to 5 million Diptera species worldwide, a number that is not inconceivable considering the diversity found at Zurquí. In addition, although no other sites have been similarly inventoried, there are indications that Zurquí is not  18 . Given that this survey took place over a much larger area (500 ha), including elevations from 200 to 1140 m, it is difficult to relate their preliminary number of 5649 species to that documented herein for a site two orders of magnitude smaller.
The species accumulation curves and projections (Figs. 2 and  3) for the ZADBI collections indicate that the entire fauna still has been inadequately sampled. Therefore, even with its tremendous number of specimens collected and identified, the ZADBI project fell short of documenting all Diptera of this site. This does not represent a failure of the project, as the ZADBI project has generated a large amount of baseline data for future tropical inventories, but a reflection of the difficulty of doing a proper survey. Reasons for the shortfall might include undersampling of the forest canopy, where much of tropical forest diversity is assumed to exist 9,38,39 , insufficient or incorrect use of some trapping methods, or simply not collecting long enough.
The ZADBI project, although tightly constrained, uncovered 4332 species of Diptera in a mere four hectares of property. These results suggest that conservative estimates of world Diptera biodiversity based on much less thorough sampling are probably too low, not only for their underestimation of megadiverse Cecidomyiidae, but also for the legions of other small-to-large, undescribed flies. Furthermore, a tremendous number of evolutionary lineages are involved in this diversity, with low numbers of species per genus being the norm, indicating that similar diversity will be found elsewhere. Many species are small in size, meaning that fine morphological examination will be necessary to interpret character evolution, even as molecular methods begin to become more common in performing quantitative assessments of biodiversity (e.g., DNA barcoding 22 or high throughput sequencing after homogenizing samples with a blender 40 ). Many more largescale, intensive inventories at other sites are needed to determine the distribution of this spectacular Diptera diversity and to fully document as much of it as possible before these species disappear. Our protocol and results provide a model for such future inventories.

Methods
Sampling protocol. Methods of the ZADBI project were previously outlined in detail 19 , including rationale for selecting this site. In short, Zurquí was selected to maximize biodiversity, based on anecdotal data from collections made at the site over the 20 years since its discovery, and to minimize difficulties, being on private land and located a short distance from the collaborating Instituto Nacional de Biodiversidad (INBIO). A variety of sampling methods were used at a partially disturbed cloud forest site at Zurquí (10.05°N, 84.01°W, 1600 m elevation) for one year. The four-hectare collecting site consisted of two forested ravines and some pasture adjacent to extensive primary forest in Braulio Carrillo National Park (Fig. 1 in Borkent and Brown 19 ). We report here primarily on the catch from two Malaise traps (light-weight Townes model 41 , purchased from Sante Traps) that were operated in the same locations throughout the one-year sampling period. Malaise trap 1 was placed near a forest edge, with the area in front of the trap consisting of a rough lawn. Malaise trap 2 was placed in the ravine near the small permanent stream. Three days per month, Malaise trapping was supplemented by sweep netting, flight-interception trapping, light trapping, pan trapping, baiting, and emergence trapping. Three additional Malaise traps were operated to provide a specimen pool for families represented by low numbers. All Diptera were separated, sorted to family, then either curated, or for perceived duplicates of previously extracted species, left in alcohol. Curated specimens were fully prepared to our specifications, generally as dried or slide-mounted specimens, entered into our database, and distributed to each of us for detailed study. Species identifications were based on morphological criteria only. Once identified, names of species, or numbered morphotypes were added to our database (Supplementary Data 1).
Although not fully indicative of whether or not a species was previously described, we note that 93% of all species identifications were morphospecies, i.e., not immediately recognized by experts as named taxa. Further taxonomic work, in many cases full revisions, would be necessary to recognize how many undescribed species were present in the material.
Phoridae were treated slightly differently, in that samples were examined and only presumed novel species were removed, recorded, and entered into our database.
Species number estimates. An estimate of the number of species actually occurring at Zurquí was made using the Chao 1 formula 42,43 , S Chao1 ¼ S observed þ ð #singletons 2 2 #doubletonsÞ, where #singletons is the number of species known from only one specimen and #doubletons those only known from two specimens (this formula is only valid if #doubletons > 0). All families and all samples were used for this estimation, except phorids, whose sorting only recorded singletons. To study the effectiveness of the two primary Malaise traps, samplebased species accumulation curves were developed with EstimateS 44 , using abundance data for 49 families of Diptera (less diverse families that could be fully extracted and identified: Agromyzidae, Anisopodidae, Anthomyiidae, Anthomyzidae, Asilidae, Asteiidae, Aulacigastridae, Bombyliidae, Calliphoridae, Chamaemyiidae, Clusiidae, Conopidae, Ctenostylidae, Culicidae, Diastatidae, Dixidae, Ephydridae, Fanniidae, Heleomyzidae, Inbiomyiidae, Lonchaeidae, Lygistorrhinidae, Micropezidae, Milichiidae, Neriidae, Odiniidae, Oestridae, Periscelididae, Piophilidae, Pipunculidae, Pseudopomyzidae, Pyrgotidae, Rhagionidae, Rhinophoridae, Richardiidae, Sarcophagidae, Scathophagidae, Scatopsidae, Sepsidae, Simuliidae, Stratiomyidae, Syrphidae, Tabanidae, Tachinidae, Tanypezidae, Tephritidae, Ulidiidae, Xylomyidae, Xylophagidae) from 50 week-long Malaise trap samples from Malaise traps 1 and 2. The program considers each sample to be a unit for constructing a species accumulation curve, randomizes the samples and smooths the curves based on sampling within all samples (Supplementary Data 2). Rarefaction of the two sample sets was performed using iNext Online; 45 this procedure compares samples for distinct sites and equalizes the sampling effort based on the number of specimens, rather than samples (Supplementary Data 3). The point at which the samples are joined based on the limitation of the number of specimens in the smaller sample, is shown by a large dot in Fig. 3.
Family classification follows that of Brown et al. 46,47 , other than the Empididae sensu lato, which are here treated as three families, namely Empididae, Brachystomatidae, and Hybotidae.
Data availability. The data underlying the species accumulation analyses are given in Supplementary Materials.