|
|
## DADA2
|
|
|
### 3.1 Getting things installed
|
|
|
There's a lot of software we'll be using this week that isn't available on the servers already. In general, we've found the easiest way to install software that's not already available is to use the conda package manager. This is because you can't install software directly on the servers by yourself, and so with conda, you can install your own local versions of software. Another useful feature of conda is that you can create separate environments, which helps to avoid compatibility and dependency problems. We'll make use of these later in the week.
|
|
|
|
|
|
To install conda, first change to your /home/ directory:
|
|
|
DADA2 is an R package, and it's proved very difficult to install! So instead of using our normal R, we're going to use a version where we have DADA2 preinstalled. You'll find it in the course folder you downloaded earlier:
|
|
|
|
|
|
$ cd ~
|
|
|
$ /bioinf/home/your_username/marmic_NGS2020/software/R/bin/R
|
|
|
|
|
|
Then download the Miniconda installer script:
|
|
|
|
|
|
$ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
|
|
|
|
|
|
Then run the installer:
|
|
|
|
|
|
$ bash Miniconda3-latest-Linux-x86_64.sh
|
|
|
|
|
|
You will be asked a couple of questions, and you should say yes to them.
|
|
|
By default conda activates the (base) environment. Right now we'll stick to that. To use DADA2, we first need to install a fresh version of R (since the one on the servers is a bit old).
|
|
|
|
|
|
$ conda install -c r r
|
|
|
|
|
|
Now, just to check which R we'll be using, run:
|
|
|
|
|
|
$ which R
|
|
|
|
|
|
You should see that the path is to the new R in your miniconda directory.
|
|
|
Now it's time to download DADA2. This we'll do by downloading it from github:
|
|
|
|
|
|
$ git clone https://github.com/benjjneb/dada2.git
|
|
|
|
|
|
Now start up R, and we'll install the new packages:
|
|
|
|
|
|
$ R
|
|
|
> install.packages("devtools")
|
|
|
> library("devtools")
|
|
|
> devtools::install_github("benjjneb/dada2", ref="v1.14")
|
|
|
# this step will take a while
|
|
|
> install.packages("dada2",
|
|
|
repos = NULL,
|
|
|
type = "source",
|
|
|
dependencies = c("Depends", "Suggests", "Imports"))
|
|
|
|
|
|
### 3.2 Processing our data with DADA2
|
|
|
### 3.1 Processing our data with DADA2
|
|
|
First let's go back to our data directory
|
|
|
|
|
|
> setwd("/bioinf/home/your_username/day_1/16S_amplicons/demultiplexed")
|
... | ... | |