DOI: 10.5061/dryad.n2z34tn2w
title: Data from: Social behavior mediates the microbiome response to antibiotic treatment in a wild mammal

description: High levels of social connectivity among group-living animals have been
 hypothesized to benefit individuals by creating opportunities to rapidly
 reseed the microbiome and maintain stability against disruption. We tested
 this hypothesis by perturbing the microbiome of a wild population of
 Grant’s gazelles with an antibiotic and asking whether microbiome recovery
 differs between individuals with high versus low levels of social
 connectivity. We found that after treatment, individuals with high social
 connectivity experienced a faster increase in microbiome richness than
 less socially connected individuals. Unexpectedly, the rapid increase in
 microbiome richness of highly connected individuals that received
 treatment led to their microbiomes becoming more distinct relative to the
 background population. Our results suggest that the microbiome of
 individuals with high social connectivity can be rapidly recolonized after
 a perturbation event, but this leads to a more distinct, rather than
 similar, microbiome to the unperturbed state. This work provides new
 insight into the role of social interactions in shaping the microbiome.
description: To run code you must have the necessary software installed.
 Ensure you have R and any required packages and Qiime 2 associated plugins
 installed on your system. For reproducibility, ensure that you have the
 input data and maintain the directory structure and scripts as they
 are.
description: # Data from: Social behavior mediates the microbiome response to
 antibiotic treatment in a wild mammal Short title: Social microbiome
 response to antibiotic treatment Keywords: 16S rRNA, degree, social
 connectivity, gazelle \###Metadata File: metadata.csv The metadata file
 provides information about each sample, including individual sample IDs,
 animal IDs, feature counts, antibiotic treatment status, degree, alpha
 diverisity metric (Observed Richness, Shannon, Chao 1) and Time. The
 metadata file include the following: SampleID: Unique identifier for each
 sample, used to link samples to the raw data stored on Qiita. AnimalID: ID
 tag assigned to each individual, allowing for identification of the animal
 from which the sample was collected. Feature Count: Number of Amplicon
 Sequence Variants (ASVs) found in each sample. This provides information
 about the richness of microbial diversity in each sample. Time: The number
 of days after antibiotic administration when the microbiome sample was
 collected. This helps to assess the temporal effects of antibiotic
 treatment on the microbiome. Degree: The degree value calculated from the
 social network association matrix. We calculated the total number of edges
 connected to a node (weighted degree) as a measure of social connectivity
 using the R package sna. Alpha Diversity Metrics: Observed Richness,
 Shannon, Chao 1 \###Raw Microbiome Files Raw microbiome sequence files:
 2518_818_150219_gazelle_pool2_L001_R1.fastq.gz (raw forward sequences)
 2518_818_150217_gazelle_pool1_L001_R1.fastq.gz (raw forward sequences)
 2518_818_150217_gazelle_pool1_L001_R2.fastq.gz (raw reverse sequences)
 2518_818_150219_gazelle_pool2_L001_R2.fastq.gz (raw reverse sequences)
 *Files can also be downloaded from QIITA:
 [https://qiita.ucsd.edu/study/description/10323#](https://qiita.ucsd.edu/study/description/10323#)* Raw sequence data are available in the European Nucleotide Archive (Project: PRJEB14530) [https://www.ebi.ac.uk/ena/browser/view/PRJEB14530](https://www.ebi.ac.uk/ena/browser/view/PRJEB14530) \###Post-processed microbiome files 34677_reference-hit.biom: ASV table after running deblur after denoising with deblur 34677_reference-hit.seqs.fa: Representative seqeunces after denoising with deblur rarefied_table.qza: This is the final rarified ASV table with Mitochondria and Chloroplast sequences removed. Processed files are available in the Qiita repository [https://qiita.ucsd.edu/study/description/10323#](https://qiita.ucsd.edu/study/description/10323#) under study ID 10925 (file 105061) \###Code Code used to process microbiome data, calculate alpha and beta diveristy, and preparing the metadata and social network files for downstream analysis. Scripts and order to run: 0_qiime.py: This code performs preprocessing of microbiome data. This includes filtering low reads, rarefying, and calcualting beta and alpha diveristy. 1_socialnetwork.Rmd: This code performs merging of social data and sample metadata and creates Figure 1. 2_alphadiversity.Rmd: This code performs alpha diveristy statistical analyses and creates Figure 2. Statistical test includes linear mixed models and influential test.  3_betadiversity.Rmd: This code performs all beta diveristy statistical analyses and creates Figure 3 . Statistical test includes global adonis and pairwise adonis 4_diffabundanceanalysis.Rmd: This code performs statistical analyses on top 15 differentially abundant ASVs and creates Figure 4. Statistical test includes wilcoxon test 5_MCP.Rmd: This code performs minimum convex polygon and calculate group level distribution of individuals  and creates Figure S1.  Notes: This repository assumes you have the necessary software (Qiime2 and R) installed on your system. Ensure you have R and any required packages installed on your system. Make sure to have access to the input data and adjust file paths accordingly. For reproducibility, maintain the directory structure and scripts as they are. \###Social Network We construct a pairwise social association matrix for the entire 90-day study period following the ‘gambit of the group’ assumption, where any two individuals observed in the same group were considered to be associated. To quantify social network metric and produce figure see 1_socialnetwork.Rmd script Required Files association_matrix.csv: The association matrix to generate a social network using the *asnipe* package in R. degree.AnimalID.csv: Each animal ID with their degree value \###Alpha diversity Alpha diversity quantified by Observed, Shannon, and Chao 1 metrics. The alpha diversity metrics were calculated using both Qiime2 and Physoleq package in R. The code used to reproduce the output can be found in the qiime.py script. To perform statistical analysis on the alpha diversity results, refer to the 2_alphadiveristy.Rmd. Required Files metadata.csv: Contains metadata for each sample along with alpha diversity metrics.  \###Beta diveristy Four beta diversity metrics (Bray-Curtis Dissimilarity, Jaccard Index, unweighted UniFrac, and weighted UniFrac) calcualted for this study. The beta diversity metrics were calculated using the Qiime2 software package. Additionally, the code used to reproduce the output can be found in the qiime.py script. To perform statistical analysis on the beta diversity results, refer to the 3_betadiveristy.Rmd script. Required Files: metadata.csv bray_distance-matrix.csv: Contains the Bray-Curtis Dissimilarity values calculated for the samples. bray_curtis_pcoa_results.qza: Contains the Bray-Curtis Dissimilarity pcoa results. jaccard_distance-matrix.csv: Contains the Jaccard Index values calculated for the samples. jaccard_pcoa_results.qza: Contains the Jaccard pcoa results. unweighted_distance-matrix.csv: Contains the unweighted UniFrac values calculated for the samples. unweighted_unifrac_pcoa_results.qza: Contains the unweighted pcoa results. weighted_distance-matrix.csv: Contains the weighted UniFrac values calculated for the samples. weighted_unifrac_pcoa_results.qza: Contains the unweighted pcoa results. \###Differential Abundance Analysis We analyzed differential abundance using Songbird. Table output are stored here. To perform statistical analysis and make figures, refer to the 4_*differential*_abundance. Files: TableS3_differential.low.csv: Differentially abundant ASVs between low-treated and low-control social treatment categories as quantified by Songbird. The table includes amplicon sequence variants (ASV), intercepts, and fold change values for each ASV in pairwise comparisons. Negative values indicate ASVs enriched in low-treated individuals, while positive values indicate ASVs enriched in the other treatment groups. TableS4_differential.high.csv: Differentially abundant ASVs between high-treated and high-control social treatment categories as quantified by Songbird. The table includes amplicon sequence variants (ASV), intercepts, and fold change values for each ASV in pairwise comparisons. Negative values indicate ASVs enriched in high-treated individuals, while positive values indicate ASVs enriched in the other treatment groups.  \###Minimum convex polygon  Distribution of study individuals at the study site during the sampling period. To calculate minimum convex polygon and calculate basic statistics of social connectivity treatment category distribution refer to 05_MCP.Rmd Required Files: metadata.csv asc.matrix.mcp_map.csv: association matrix melted to accommodate mcp analysis