skip to main content

Title: specificity: an R package for analysis of feature specificity to environmental and higher dimensional variables, applied to microbiome species data
Abstract Background

Understanding the factors that influence microbes’ environmental distributions is important for determining drivers of microbial community composition. These include environmental variables like temperature and pH, and higher-dimensional variables like geographic distance and host species phylogeny. In microbial ecology, “specificity” is often described in the context of symbiotic or host parasitic interactions, but specificity can be more broadly used to describe the extent to which a species occupies a narrower range of an environmental variable than expected by chance. Using a standardization we describe here, Rao’s (Theor Popul Biol, 1982., Sankhya A, 2010. ) Quadratic Entropy can be conveniently applied to calculate specificity of a feature, such as a species, to many different environmental variables.


We present our R packagespecificityfor performing the above analyses, and apply it to four real-life microbial data sets to demonstrate its application. We found that many fungi within the leaves of native Hawaiian plants had strong specificity to rainfall and elevation, even though these variables showed minimal importance in a previous analysis of fungal beta-diversity. In Antarctic cryoconite holes, our tool revealed that many bacteria have specificity to co-occurring algal community composition. Similarly, in the human gut microbiome, many bacteria showed specificity to more » the composition of bile acids. Finally, our analysis of the Earth Microbiome Project data set showed that most bacteria show strong ontological specificity to sample type. Our software performed as expected on synthetic data as well.


specificityis well-suited to analysis of microbiome data, both in synthetic test cases, and across multiple environment types and experimental designs. The analysis and software we present here can reveal patterns in microbial taxa that may not be evident from a community-level perspective. These insights can also be visualized and interactively shared among researchers usingspecificity’s companion package,specificity.shiny.

« less
; ; ; ;
Publication Date:
Journal Name:
Environmental Microbiome
Springer Science + Business Media
Sponsoring Org:
National Science Foundation
More Like this
  1. Abstract Background

    Stable isotope probing (SIP) approaches are a critical tool in microbiome research to determine associations between species and substrates, as well as the activity of species. The application of these approaches ranges from studying microbial communities important for global biogeochemical cycling to host-microbiota interactions in the intestinal tract. Current SIP approaches, such as DNA-SIP or nanoSIMS allow to analyze incorporation of stable isotopes with high coverage of taxa in a community and at the single cell level, respectively, however they are limited in terms of sensitivity, resolution or throughput.


    Here, we present an ultra-sensitive, high-throughput protein-based stable isotope probing approach (Protein-SIP), which cuts cost for labeled substrates by 50–99% as compared to other SIP and Protein-SIP approaches and thus enables isotope labeling experiments on much larger scales and with higher replication. The approach allows for the determination of isotope incorporation into microbiome members with species level resolution using standard metaproteomics liquid chromatography-tandem mass spectrometry (LC–MS/MS) measurements. At the core of the approach are new algorithms to analyze the data, which have been implemented in an open-source software ( We demonstrate sensitivity, precision and accuracy using bacterial cultures and mock communities with different labeling schemes. Furthermore, we benchmarkmore »our approach against two existing Protein-SIP approaches and show that in the low labeling range used our approach is the most sensitive and accurate. Finally, we measure translational activity using18O heavy water labeling in a 63-species community derived from human fecal samples grown on media simulating two different diets. Activity could be quantified on average for 27 species per sample, with 9 species showing significantly higher activity on a high protein diet, as compared to a high fiber diet. Surprisingly, among the species with increased activity on high protein were severalBacteroidesspecies known as fiber consumers. Apparently, protein supply is a critical consideration when assessing growth of intestinal microbes on fiber, including fiber-based prebiotics.


    We demonstrate that our Protein-SIP approach allows for the ultra-sensitive (0.01 to 10% label) detection of stable isotopes of elements found in proteins, using standard metaproteomics data.

    « less
  2. Abstract Background

    Microbiomes are now recognized as the main drivers of ecosystem function ranging from the oceans and soils to humans and bioreactors. However, a grand challenge in microbiome science is to characterize and quantify the chemical currencies of organic matter (i.e., metabolites) that microbes respond to and alter. Critical to this has been the development of Fourier transform ion cyclotron resonance mass spectrometry (FT-ICR MS), which has drastically increased molecular characterization of complex organic matter samples, but challenges users with hundreds of millions of data points where readily available, user-friendly, and customizable software tools are lacking.


    Here, we build on years of analytical experience with diverse sample types to develop MetaboDirect, an open-source, command-line-based pipeline for the analysis (e.g., chemodiversity analysis, multivariate statistics), visualization (e.g., Van Krevelen diagrams, elemental and molecular class composition plots), and presentation of direct injection high-resolution FT-ICR MS data sets after molecular formula assignment has been performed. When compared to other available FT-ICR MS software, MetaboDirect is superior in that it requires a single line of code to launch a fully automated framework for the generation and visualization of a wide range of plots, with minimal coding experience required. Among the tools evaluated, MetaboDirect is alsomore »uniquely able to automatically generate biochemical transformation networks (ab initio) based on mass differences (mass difference network-based approach) that provide an experimental assessment of metabolite connections within a given sample or a complex metabolic system, thereby providing important information about the nature of the samples and the set of microbial reactions or pathways that gave rise to them. Finally, for more experienced users, MetaboDirect allows users to customize plots, outputs, and analyses.


    Application of MetaboDirect to FT-ICR MS-based metabolomic data sets from a marine phage-bacterial infection experiment and aSphagnumleachate microbiome incubation experiment showcase the exploration capabilities of the pipeline that will enable the research community to evaluate and interpret their data in greater depth and in less time. It will further advance our knowledge of how microbial communities influence and are influenced by the chemical makeup of the surrounding system. The source code and User’s guide of MetaboDirect are freely available through ( and (, respectively.

    « less
  3. Abstract Background

    Empirical field studies allow us to view how ecological and environmental processes shape the biodiversity of our planet, but collecting samples in situ creates inherent challenges. The majority of empirical vertebrate gut microbiome research compares multiple host species against abiotic and biotic factors, increasing the potential for confounding environmental variables. To minimize these confounding factors, we focus on a single species of passerine bird found throughout the geologically complex island of Sulawesi, Indonesia. We assessed the effects of two environmental factors, geographic Areas of Endemism (AOEs) and elevation, as well as host sex on the gut microbiota assemblages of the Sulawesi Babbler,Pellorneum celebense,from three different mountains across the island. Using cloacal swabs, high-throughput-amplicon sequencing, and multiple statistical models, we identified the core microbiome and determined the signal of these three factors on microbial composition.


    The five most prevalent bacterial phyla within the gut microbiome ofP. celebensewereProteobacteria(32.6%),Actinobacteria(25.2%),Firmicutes(22.1%),Bacteroidetes(8.7%), andPlantomycetes(2.6%). These results are similar to those identified in prior studies of passeriform microbiomes. Overall, microbiota diversity decreased as elevation increased, irrespective of sex or AOE. A single ASV ofClostridiumwas enriched in higher elevation samples, while lower elevation samples were enriched with the generaPerlucidibaca(FamilyMoraxellaceae),Lachnoclostridium(FamilyLachnospiraceae), and an unidentified species in the FamilyPseudonocardiaceae.


    While themore »core microbiota families recovered here are consistent with other passerine studies, the decreases in diversity as elevation increases has only been seen in non-avian hosts. Additionally, the increased abundance ofClostridiumat high elevations suggests a potential microbial response to lower oxygen levels. This study emphasizes the importance of incorporating multiple statistical models and abiotic factors such as elevation in empirical microbiome research, and is the first to describe an avian gut microbiome from the island of Sulawesi.

    « less

    Host-associated microbial communities can influence physiological processes of macroorganisms, including contributing to infectious disease resistance. For instance, some bacteria that live on amphibian skin produce antifungal compounds that inhibit two lethal fungal pathogens, Batrachochytrium dendrobatidis (Bd) and Batrachochytrium salamandrivorans (Bsal). Therefore, differences in microbiome composition among host species or populations within a species can contribute to variation in susceptibility to Bd/Bsal. This study applies 16S rRNA sequencing to characterize the skin bacterial microbiomes of three widespread terrestrial salamander genera native to the western United States. Using a metacommunity structure analysis, we identified dispersal barriers for these influential bacteria between salamander families and localities. We also analysed the effects of habitat characteristics such as percent natural cover and temperature seasonality on the microbiome. We found that certain environmental variables may influence the skin microbial communities of some salamander genera more strongly than others. Each salamander family had a somewhat distinct community of putative anti-Bd skin bacteria, suggesting that salamanders may select for a functional assembly of cutaneous symbionts that could differ in its ability to protect these amphibians from disease. Our observations raise the need to consider host identity and environmental heterogeneity during the selection of probiotics to treat wildlifemore »diseases.

    « less
  5. Abstract Background

    Antibiotics alter the diversity, structure, and dynamics of host-associated microbial consortia, including via development of antibiotic resistance; however, patterns of recovery from microbial imbalances and methods to mitigate associated negative effects remain poorly understood, particularly outside of human-clinical and model-rodent studies that focus on outcome over process. To improve conceptual understanding of host-microbe symbiosis in more naturalistic contexts, we applied an ecological framework to a non-traditional, strepsirrhine primate model via long-term, multi-faceted study of microbial community structure before, during, and following two experimental manipulations. Specifically, we administered a broad-spectrum antibiotic, either alone or with subsequent fecal transfaunation, to healthy, male ring-tailed lemurs (Lemur catta), then used 16S rRNA and shotgun metagenomic sequencing to longitudinally track the diversity, composition, associations, and resistomes of their gut microbiota both within and across baseline, treatment, and recovery phases.


    Antibiotic treatment resulted in a drastic decline in microbial diversity and a dramatic alteration in community composition. Whereas microbial diversity recovered rapidly regardless of experimental group, patterns of microbial community composition reflected long-term instability following treatment with antibiotics alone, a pattern that was attenuated by fecal transfaunation. Covariation analysis revealed that certain taxa dominated bacterial associations, representing potential keystone species in lemur gut microbiota. Antibioticmore »resistance genes, which were universally present, including in lemurs that had never been administered antibiotics, varied across individuals and treatment groups.


    Long-term, integrated study post antibiotic-induced microbial imbalance revealed differential, metric-dependent evidence of recovery, with beneficial effects of fecal transfaunation on recovering community composition, and potentially negative consequences to lemur resistomes. Beyond providing new perspectives on the dynamics that govern host-associated communities, particularly in the Anthropocene era, our holistic study in an endangered species is a first step in addressing the recent, interdisciplinary calls for greater integration of microbiome science into animal care and conservation.

    « less