By Joseph Powell, Quan Nguyen and Anne Senabouth
- Before you begin, please download or clone this repository by pressing the "Clone or Download" button on the homepage. This zip file will contain the data you need to follow this workshop.
- Follow the instructions below to prepare your R environment.
- You can access the tutorial here.
Note: There may be issues for some users related to the R package "stringi". This package is a dependancy for some of the packages from Bioconductor. Try installing this package from this website https://cran.r-project.org/web/packages/stringi/index.html.
Feel free to skip some steps if you have already done those steps.
Please follow the R installation instructions here.
If you are a Windows user, make sure you install Rtools. Please note the ascend
package requires R version >= 3.4.3. The latest version of R version 3.5.1 is
best.
The workshop will be done in RStudio, but feel free to set up your own R workspace.
You will need to install the following packages to run the development version
of ascend
. Feel free to skip these steps if you already have these packages.
You can use the install.packages() to install the packages described in this section. The pcakages you require from this repository are as follows:
- devtools: This
package will be used to load the development version of
ascend
. - tidyverse: This is a series of R packages for data science and visualisation. This will install packages such as dplyr, ggplot2 and tidyr.
- data.table: Please follow the instructions on this page for your operating system.
Remaining packages can be installed as follows:
# List of packages to install
cran_packages <- c("reshape2", "fields", "ggbeeswarm", "gridExtra",
"dynamicTreeCut", "dendextend", "RColorBrewer",
"locfit", "KernSmooth")
# Easy command to install all at once
install.packages(cran_packages)
Bioconductor is a repository for R packages related to the analysis and comprehension of high-throughput genomic data. It uses a separate set of commands for the installation of packages.
Use the following code to retrieve the latest installer from Bioconductor.
## try http:// if https:// URLs are not supported
source("https://bioconductor.org/biocLite.R")
biocLite()
You can then install the Bioconductor packages using biocLite
.
bioconductor_packages <- c("Biobase", "BiocGenerics", "BiocParallel",
"SingleCellExperiment", "GenomeInfoDb", "GenomeInfoDbData")
biocLite(bioconductor_packages)
scater and scran are scRNA-seq analysis toolboxes that provide more in-depth methods for QC and filtering. You may choose to install these packages if you wish to take advantage of the wrappers provided for these packages.
ascend
provides wrappers for DESeq
and DESeq2,
so you may choose to add them to your installation. However, we will only be
using DESeq for the workshop as DESeq2 will require more time than allocated
for the workshop.
As ascend
is still under development, we will use devtools to install the
package.
# Load devtools package
library(devtools)
# Use devtools to install the package
install_github("IMB-Computational-Genomics-Lab/ascend", ref = "devel")
# Load the package in R
library(ascend)
This package makes extensive use of BiocParallel, enabling ascend
to make the most of your computer's hardware. As each system is different, BiocParallel needs to be configured by the user. Here are some example configurations.
library(BiocParallel)
ncores <- parallel::detectCores() - 1
register(MulticoreParam(workers = ncores, progressbar=TRUE), default = TRUE)
The following commands allows Windows to parallelise functions via BiocParallel. Unlike multicore processing in *nix systems, Snow creates additional R sessions to export tasks to. This requires additional computational resources to run and manage the tasks.
We recomend you bypass this step if your machine has lower specs.
library(BiocParallel)
workers <- 3 # Number of cores on your machine - 1
register(SnowParam(workers = workers,
type = "SOCK",
progressbar = TRUE), default = TRUE)