To the best of our knowledge, this is the most comprehensive characterization to date of antibiotic, metal and biocide resistomes, as well as markers of MGEs, covering human, animal and external environments. Environments polluted with discharges from pharmaceutical production and Beijing smog carried the largest relative abundance and diversity of ARGs, followed by wastewater/sludge, human and animal microbiomes with intermediate figures, and considerable lower counts in other external environments. The explanation behind the high relative abundance of ARGs in pharmaceutically polluted environments is most likely an exceptionally strong, prevailing antibiotic selection pressure, whereas the high diversity of resistance genes, taxa and MGEs found in smog is more likely a consequence of air coming into contact with many different environments with different types of bacteria. Conceivably, depending on the host bacterium, ARGs could have other functions that are not directly related antibiotic resistance, which could contribute to their abundance in different environments [34, 35]. Regardless of the causes, our observations suggest that urban air and pharmaceutically polluted environments warrant further investigation of their roles as reservoirs and point sources of ARGs. Previous meta-analyses of the diversity of ARGs in metagenomes from different environment types have not included air and pharmaceutically polluted environments. Hence, their potential importance has largely gone unobserved [28–30]. Human and animal microbiomes stood out by having the lowest relative abundance and diversity of both MGEs and biocide/metal resistance genes. This may, at least partially, be explained by lower taxonomic diversity in these communities. The much larger taxonomic diversity, together with a multitude of mechanisms for genetic mobility and larger beta-diversity of ARGs in external environments, supports the hypothesis that these form vast sources of unknown resistance genes, with potential to be transferred to pathogens in the future.

Recurring smog events in Beijing and other megacities are already growing public health issues [36, 37]. We interpret the high relative abundances of ARGs in smog as a reflection of that air comes into direct contact with many other types of environments, thereby accumulates a highly diverse collection of bacteria, including resistant ones. This is further supported by a very high taxonomic richness in these samples. We are not aware of any other deeply sequenced shotgun data from air, preventing us from generalizing our results to other air environments. When we investigated metagenomes of air samples from the USA, albeit produced by 454 technology to a considerably smaller sequencing depth, we found preliminary support for similarly large relative abundances of ARGs. However, the diversity in the US air samples was overall lower than in Beijing smog. Using culture-based approaches, air samples from wastewater treatment plants, animal slaughter houses and swine feeding operations have earlier been shown to carry resistant bacteria [38–40]. In addition, aerial transport of antibiotic-resistant bacteria from cattle feed yards was recently proposed [41], but in general, the primary sources and the importance of resistant bacteria in urban air are not clear. Taken together, this highlights that air transmission is, to this point, an under-investigated route for the spread of resistance. Although we do not know the proportion of live bacteria in smog, neither the bacterial hosts of the ARGs, we think that the finding of resistance genes such as IND, GES, IMP, OXA-50, OXA-51 and OXA-58 carbapenemases calls for concern given the growing global threat of carbapenem-resistant Enterobacteriaceae [42, 43]. That said, the Beijing smog samples were collected from a single smog event that lasted for 5 days (January 10–14, 2013) [36], and thus, air samples from more types of environments with different potential sources of bacteria taken at other locations would provide a clearer picture regarding air as a dissemination route of antibiotic resistance.

It seems unlikely that antibiotic selection is an important factor shaping the air resistome, given the limitations for most bacteria to grow in air. In other environments, the ARG profiles may be more influenced by direct selection from antibiotics or other chemicals. This includes environments polluted by wastewater from the manufacturing of antibiotics [44]. Recent culture-dependent and culture-independent studies suggest that these indeed are the most extreme environments described to date on earth, not only when it comes to multi-resistance to antibiotics but also in terms of carrying integrons of classes 1 and 2, known to often be associated with ARGs [45–47]. Bacteria from a polluted lake had the ability to transfer novel resistance plasmids to E. coli, stressing the potential role of industrial antibiotic pollution in the emergence of resistance in pathogens [48]. This raises strong concerns about the risks for human health associated with discharges of high levels of antibiotics and warrants both actions to reduce discharges [49] and deeper investigation of the role of pharmaceutical pollution in the emergence and transmission of resistance.

Humans and domesticated animals are regularly exposed to selective concentrations of antibiotics during therapy, inevitably driving resistance. Accordingly, the strong dominance of tetracycline resistance genes in the animal microbiomes, also identified by Durso et al. [28], may partially be explained by current and historical exposure to selective concentrations of tetracyclines, as this is the most commonly used antibiotic class for animals worldwide [50, 51]. Whereas tetracycline is known to promote enrichment of tet-genes in communities to a larger extent than it promotes other classes of ARGs [52], co-selection between classes may also be important. Thus, based on the type of ARGs found, it is not straightforward to conclude which classes of antibiotics that could have provided a selection pressure. Background knowledge of resistance genes that usually occur in a given environment type allows identification of deviations from the norm. Therefore, overrepresentation of resistance genes could provide clues to what selective agents that could be present. In environments other than human, animal and pharmaceutically polluted ones, it is considerably less clear if the levels of antibiotics, or for that sake also metals and biocides, are sufficiently high to select for ARGs. Relatively strong correlation between richness of genera and biocide/metal resistance genes does not support a role of environmental-specific selection pressures, but does of course not exclude that it occurs in individual cases. Note that the correlation with taxonomic diversity is considerably lower for (known) ARGs, as ARG diversity can be low despite very large taxonomic diversity. In contrast to ARGs, relative abundance and diversity of biocide/metal resistance genes were higher in environmental microbiomes than in the human microbiome, which is highly consistent with our previous study of antibiotic, biocide and metal resistance genes on plasmids from bacterial isolates of multiple environments [27]. Analyses of metagenomes as performed here, compared to studies of isolates, allow insight also into the uncultivable portion of different communities but pays the price of not providing the genetic context of resistance genes. Short-read metagenomic assembly approaches for determining the genetic context of resistance genes in complex metagenomes still face many technical limitations mainly because resistance genes occur in multiple contexts [47, 53]. The recently developed epicPCR methodology has the potential to address at least some of these shortcomings of metagenomics [54].

The variable abundances and types of resistance genes are only partially governed by the selection pressure within each environment type. Transmission between environments, primarily from human and animal sources, which typically carry larger relative abundances of ARGs than most external environments, are likely to play an important role as well [55]. This is a particularly tenable explanation for the relatively high abundance and diversity of ARGs in sewage/sludge. In this type of environment, the complex mixtures of antibiotics, detergents and metals could also, if present at sufficiently high levels, provide a selection pressure for antibiotic-resistant bacteria [56], but clear-cut evidence for this is still lacking [57]. Some of the high relative abundance and diversity of ARGs in the human microbiota is very likely a consequence of transmission between humans rather than a direct effect of antibiotic selection pressure in the studied individuals. This interpretation does not only fit the general view of how humans tend to share microbiota with each other but also supported in our analysis by the comparably low and highly nested beta-diversity of ARGs found in the human microbiota (except airways) compared to, e.g. soil. Evidence for the role of transmission in determining the ARG profiles of human-associated bacteria can easily be seen on larger geographical scales, where we find dominance of certain ARGs in human pathogens from some regions, while other genes with similar resistance function dominate in other countries, for example, KPC carbapenemases in the USA and NDM-type carbapenemases in India [58, 59].

In addition to selective pressures and transmission, the different biotic and abiotic conditions associated with different environments also favour certain types of bacteria, indirectly favouring resistance genes that tend to be associated with those taxa. Data on taxonomic composition may therefore provide possible explanations to the overrepresentation of specific resistance genes that are independent of selective pressures or recent transmission events. In addition, a high degree of taxonomic similarity across environments can provide clues to their potential ecological connectivity [60, 61]. Strong differences in biotic and abiotic conditions limit the ability of bacteria, and hence ARGs, to transfer and establish themselves in new environments, even if the physical distance is small, as illustrated, for example, by the differences in both taxa and ARGs between human body sites. The opposite is probably the explanation to why human gastrointestinal samples and those of animal origin (of which many are gastrointestinal) have a relatively large overlap in terms of ARGs and taxa. It would seem reasonable to assume that wastewater/sludge would harbour ARGs and taxa similar to those found in human gut simply because human faeces largely end up in sewage. However, we found that the ARGs and taxonomic profiles in wastewater/sludge microbiota had limited similarity to the human gut microbiota, as also reported by previously [53, 62–64], and was also much more variable between samples. An important explanation behind the discrepancy between faeces and wastewater is likely the difference in oxygen availability. Another study of ours shows that the strongest shift between the bacterial communities of human gut and wastewater microbiota is the almost complete elimination of the obligate anaerobes that dominate the gut microbiota [53].

Based on metagenomic analysis of known MGEs, environmental bacteria seem to be better adapted to transfer genes than those thriving on or in our bodies. Within the human microbiome, class 1 integrases (intI1) and ISCR transposases such as ISCR2, ISCR5 and ISCR8 were common, whereas external environments harboured both greater diversity and relative abundances of MGEs. This was observed despite the fact that MGEs are studied at much greater depth in human pathogens, which in turn would be expected to bias estimates towards more MGEs in human-associated environments. Some of the integron-associated integrases and ISCR transposases found in environmental metagenomes are often also associated with ARGs in clinical isolates [65, 66], whereas others have, at least not yet, been associated with resistance. Nevertheless, the widespread distribution of MGEs across external environments suggests ample opportunities for external environments to contribute to the mobilization and further transmission of ARGs.

Across all metagenomes, less than 1.5 % of all detected ARGs were exclusively found in the human microbiome. On the contrary, 57.5 % of the ARGs were only detected in metagenomes from environmental samples. Even though the majority of the investigated ARGs have been initially found in pathogens, our analysis suggests that most of them are still relatively rare in the human microbiota. Environmental samples generally contained a wider distribution of resistance genes to a more diverse set of antibiotics classes. For example, the relative abundance of beta-lactam resistance genes was much larger in external environments than in human and animal microbiomes. This suggests that the external environment harbours many more varieties of resistance genes than the ones currently known from the clinic. Indeed, functional metagenomics has resulted in the discovery of many novel ARGs in external environments [12, 55, 67, 68]. This all fits well with an overall much higher taxonomic diversity of environmental microbial communities. In terms of consequences associated with the potential transfer of ARGs to human pathogens, we argue that unknown resistance genes are of greater concern than those already known to circulate among human-associated bacteria [22].