Chapter 1 Introduction

This webbook contains all the code used for data analysis in study on the recovery of metagenome‑assembled genomes and derived microbial communities from domestic and feral cat faecal samples collected in six countries.

1.1 Prepare the R environment

1.1.1 Environment

To reproduce all the analyses locally, clone this repository in your computer using:

RStudio > New Project > Version Control > Git

And indicating the following git repository:

https://github.com/alberdilab/domestic_feral_cat_metagenomics.git

Once the R project has been created, follow the instructions and code chunks shown in this webbook.

1.1.2 Libraries

The following R packages are required for the data analysis.

# Base
library(R.utils)
library(knitr)
library(tidyverse)
library(devtools)
library(tinytable)
library(broom)
library(broom.mixed)
library(rmarkdown)
library(janitor)

# For tree handling
library(ape)
library(phyloseq)
library(phytools)

# For plotting
library(ggplot2)
library(ggrepel)
library(ggpubr)
library(ggnewscale)
library(gridExtra)
library(ggtreeExtra)
library(ggtree)
library(ggh4x)
library(UpSetR)

# For statistics
library(spaa)
library(vegan)
library(Rtsne)
library(geiger)
library(ANCOMBC)
library(lme4)
library(Hmsc)
library(matrixStats)
library(MuMIn)
#library(MASS)
library(nlme)
library(emmeans)
library(hilldiv2)
library(distillR)
library(pairwiseAdonis)

  1. University of Copenhagen, ↩︎