-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.Rmd
69 lines (46 loc) · 2.81 KB
/
index.Rmd
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
---
title: "Introduction"
output: html_document
---
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
```{r packages, , echo=TRUE,warning=FALSE,message=FALSE,error=FALSE, include=FALSE}
# Package names
packages <- c('pheatmap', 'dplyr', 'RColorBrewer', 'yaml', 'ggpubr', 'DT', 'msigdbr', 'kableExtra', 'stringr', 'dplyr', 'tidyverse')
# Install packages not yet installed
installed_packages <- packages %in% rownames(installed.packages())
if (any(installed_packages == FALSE)) {
install.packages(packages[!installed_packages])
}
# Install packages not yet installed
installed_packages <- packages %in% rownames(installed.packages())
if (any(installed_packages == FALSE)) {
install.packages(packages[!installed_packages])
}
bio_pkgs <- c("org.Hs.eg.db", "DESeq2", "rhdf5", "tximport",
"ensembldb", "EnsDb.Hsapiens.v86", "EnsDb.Mmusculus.v79", "Pi", "fgsea", "EGSEA")
# install:
installed_packages <- packages %in% rownames(installed.packages())
if (any(installed_packages == FALSE)){
BiocManager::install(bio_pkgs)
}
# load all at once
invisible(lapply(bio_pkgs, function(x) library(x, character.only=TRUE)))
# Packages loading
invisible(lapply(packages, library, character.only = TRUE))
```
# Running the report
This Rmarkdown report describes the output of bulk RNA-seq experiments.
Ths report requires a counts table (samples x genes) generated from running pseudoalignment (kallisto or salmon) or running mapping (hisat) followed by featurecounts.
## Before running the report
To generate the report clone the repository from github then:
* Rename the Rproj file
* add a meta data file following the naming convention design_<test>_<control>_<test>_<column>.csv
* a counts table called featurecounts.tsv.gz
### Setting up the design file
For each analysis a design file is written and needs to conform to the following naming convention for the file:
design_<test>_<control>_<test>_<column>.csv - please look at th example file in the repo for how to set up your analysis.
One column requires the title model and the first row contains the model that is to be used for the analysis. For lrt and additional column called reduced is needed and specifies the reduced model that is passed to DESeq2.
## Generate the report
Double click the Rproj file and Rstudio will open. Make sure rmarkdown is installed in your library and hit the build tab on the environment window and then click "Build Website". When the website has finished building a window will pop up with the rendered site. The final report is in the directory "Final_report" and can be accessed by opening the index.html file in a web browser.
## Useful links
* This is a very useful link to explain how to correctly set an LRT test in DESeq2 https://hbctraining.github.io/DGE_workshop/lessons/08_DGE_LRT.html