-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path03_setup.Rmd
More file actions
88 lines (67 loc) · 3.69 KB
/
03_setup.Rmd
File metadata and controls
88 lines (67 loc) · 3.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
---
title: "BIO514"
description: |
Bioinformatics - set up
site:
distill::distill_article:
toc: yes
toc_depth: 2
---
```{r, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## Software
**REQUIRED** - We will be using RStudio to analyse the data set. It is recommend you have the following installed: [*RStudio version 1.4*](https://rstudio.com/products/rstudio/download/) or later and [*R version 4.0*](https://www.r-project.org/) or later. Further details on getting started in RStudio [here](http://siobhonlegan.com/research_site/rstudio/).
**Optional** (*not needed for today's workshop*) - We will not be doing the sequence pre-processing steps today but if you did want to do this you will need to download [conda](https://conda.io/projects/conda/en/latest/user-guide/install/index.html) and [QIIME2](https://qiime2.org/).
## Download data
1. **Raw Sequence** (*optional*)
Raw amplicon 16S sequence data from West et al. (2020) *Gut* 69, 1452-1459. doi: [10.1136/gutjnl-2019-319620](http://dx.doi.org/10.1136/gutjnl-2019-319620). Download raw data from NCBI Sequence Read Archive. Project number `PRJNA493625` from <https://sra-explorer.info/>.
Rename so `fastq.gz` files in format `SAMPLEID_L001_R1_001.fastq.gz` (forward) or `SAMPLEID_L001_R2_001.fastq.gz` (reverse).
You will not be required to download this for today's tutorial but if you wanted you could use this data and follow the [sequence processing](04_sequence_processing.html) page.
Pre-processed QIIME2 sequence data as outlined in [sequence processing](04_sequence_processing.html) is available for download on [FigShare link](https://figshare.com/s/0c459524e59953bf2585). Download files and you can view them using [QIIME2 view](https://view.qiime2.org/).
2. **RData** (*REQUIRED*)
The easiest way to follow along with this tutorial is to download this GitHub repository using either option **1** or **2** below:
1. Go to <https://github.com/siobhon-egan/BIO514-microbiome> and click on the green **Code** button. Select **Download ZIP**, open/unzip the file. Open the `.Rmd` files in RStudio you will be able to follow along for the data analysis.
2. Use terminal and clone the GitHub repo.
```
git clone https://github.com/siobhon-egan/BIO514-microbiome.git
```
## Install R packages
You should only need to do this once to install required libraries.
I recommend you run this bit of code line by line. I.e. copy and paste one line of code directly in to the console and press enter.
For some reason running the whole script at once doesn't seem to be working.
Also the order of installing the packages is important, please sick to this order.
Remember it assumes you have R version 4.0 and RStudio version 1.4.
```r
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
# Phyloseq
BiocManager::install("phyloseq")
# Tidyverse
install.packages("tidyverse")
# Install microbiome
BiocManager::install("microbiome")
# Install microbiome utilities
install.packages("devtools")
devtools::install_github("microsud/microbiomeutilities")
# Install DirichletMultinomial
BiocManager::install("DirichletMultinomial")
# Install MicrobiotaProcess
BiocManager::install("MicrobiotaProcess")
# Install ampvis2
install.packages("remotes")
remotes::install_github("MadsAlbertsen/ampvis2")
# Install vegan
install.packages("vegan")
# Install tidyverse
install.packages("tidyverse")
# Install ggpubr
install.packages("ggpubr")
# R color brewer
install.packages("RColorBrewer")
# Install reshape2
install.packages("reshape2")
# Install plotly
install.packages("plotly")
```
Note I have not included packages that relating to "knitting" the document here. Everything should be executable within the R markdown files by running the code chunks.