Chapter 1 Introduction

The Earth Hologenome Initiative (EHI, www.earthhologenome.org) is a global collaborative endeavour aimed at promoting, facilitating, coordinating, and standardising hologenomic research on wild organisms worldwide. The EHI encompasses projects with diverse study designs and goals around standardised and open access sample collection and preservation, data generation and data management criteria.

One of the main objectives of the EHI is to facilitate analysis of animal genomic and microbial metagenomic data. Here, you will find resources to summarise, visualise and model data generated through the EHI pipeline.

1.1 Prepare the R environment

The first step is to prepare your R environment. You must ensure you are at the appropriate working directory, and all required libraries are installed and loaded.

setwd("path_to_your_working_directory") # Change this to your absolute working directory
dir_create("data") #Create the data folder to store EHI data files

The pipeline requires the following packages to be installed in your R environment.

# These packages can be installed from CRAN
install.packages("R.utils")
install.packages("knitr")
install.packages("tidyverse")
install.packages("ape")
install.packages("phytools")
install.packages("ggplot2")
install.packages("ggtree")
install.packages("ggrepel")
install.packages("ggpubr")
install.packages("ggnewscale")
install.packages("ggtreeExtra")
install.packages("gridExtra")
install.packages("spaa")
install.packages("vegan")
install.packages("Rtsne")
install.packages("devtools")

# This packages must be installed from Github using devtools
library(devtools)
install_github("anttonalberdi/hilldiv2")

All those packages then need to be loaded to your R environment.

suppressPackageStartupMessages(library(R.utils))
suppressPackageStartupMessages(library(knitr))
suppressPackageStartupMessages(library(tidyverse))
suppressPackageStartupMessages(library(ape))
suppressPackageStartupMessages(library(phytools))
suppressPackageStartupMessages(library(ggplot2))
suppressPackageStartupMessages(library(ggtree))
suppressPackageStartupMessages(library(ggrepel))
suppressPackageStartupMessages(library(ggpubr))
suppressPackageStartupMessages(library(ggnewscale))
suppressPackageStartupMessages(library(ggtreeExtra))
suppressPackageStartupMessages(library(gridExtra))
suppressPackageStartupMessages(library(hilldiv2))
suppressPackageStartupMessages(library(spaa))
suppressPackageStartupMessages(library(vegan))
suppressPackageStartupMessages(library(Rtsne))

1.2 Download mock data

If you want to reproduce the analyses shown in this website, you can download the mock data.

# Count table
download.file(
    "https://github.com/earthhologenome/EHI_analysis/raw/main/data/DMB0038_counts.tsv.gz",
    "data/DMB0038_counts.tsv.gz")

# Coverage table
download.file(
    "https://github.com/earthhologenome/EHI_analysis/raw/main/data/DMB0038_coverage.tsv.gz",
    "data/DMB0038_coverage.tsv.gz")

# MAG metadata table
download.file(
    "https://github.com/earthhologenome/EHI_analysis/raw/main/data/DMB0038_mag_info.tsv.gz",
    "data/DMB0038_mag_info.tsv.gz")

# Sample metadata table
download.file(
    "https://github.com/earthhologenome/EHI_analysis/raw/main/data/DMB0038_metadata.tsv.gz",
    "data/DMB0038_metadata.tsv.gz")

# MAG phylogenetic tree
download.file(
    "https://github.com/earthhologenome/EHI_analysis/raw/main/data/DMB0038.tree.gz",
    "data/DMB0038.tree.gz")

# MAG functional annotation table
download.file(
    "https://github.com/earthhologenome/EHI_analysis/raw/main/data/DMB0038_merged_kegg.tsv.gz",
    "data/DMB0038_merged_kegg.tsv.gz")

Now you are ready to begin your analysis.


  1. University of Copenhagen, ↩︎

  2. University of Copenhagen, ↩︎