Data
library(DESeq2)
library(gplots)
library(RColorBrewer)
library(limma)
library(tidyverse)
Challenge 1
- Use the
DESeq2
function rlog
to transform the count data. This function also normalises for library size.
- Plot the count distribution boxplots with this data. How has this effected the count distributions?
rlogcounts <- rlog(countdata)
statusCol <- as.numeric(factor(sampleinfo$Status)) + 1
# Check distributions of samples using boxplots
boxplot(rlogcounts,
xlab="",
ylab="Log2(Counts)",
las=2,
col=statusCol)
# Let's add a blue horizontal line that corresponds to the median logCPM
abline(h=median(as.matrix(logcounts)), col="blue")