Hi,
I am using EdgeR for differential expression. The experiment includes five individuals who receive the vaccine in 4 different time points (pre, 2hour post, 24hour post, 14-day post). I want to find DE
genes
between pre
and post
samples, but unfortunately, i couldn't find a way to design my matrix in a way that i get results. i did PlotMD
as you saw in the image sample 5-8 show separate batch in contrast to others. I intend to make the identification of DE genes using a log2 fold change and likelihood ratios (LR) Test in edgeR and significantly expressed genes had an FDR adjusted P-value of < 5%. Here is the script i use for my analysis:
library(edgeR)
setwd("~/Desktop/counts/low")
x_low<-read.csv("counts.txt")
time<-factor(c("pre","2hr-post","24hr-post","14d-post",
"pre","2hr-post","24hr-post","14d-post",
"pre","2hr-post","24hr-post","14d-post",
"pre","2hr-post","24hr-post","14d-post",
"pre","2hr-post","24hr-post","14d-post"))
time <- relevel(time, ref="pre")
y_low<-DGEList(counts=x_low[,2:21], genes = x_low[,1], group = time) #read counts.csv and make table
keep <- filterByExpr(y_low)
y_low <-y_low[keep, keep.lib.sizes=FALSE]
y_low <- calcNormFactors(y_low)
plotMDS(y_low)
data.frame(sample=colnames(y_low),time) #data frame
sample time
1 Sample_1 pre
2 Sample_2 2hr-post
3 Sample_3 24hr-post
4 Sample_4 14d-post
5 Sample_5 pre
6 Sample_6 2hr-post
7 Sample_7 24hr-post
8 Sample_8 14d-post
9 Sample_9 pre
10 Sample_10 2hr-post
11 Sample_11 24hr-post
12 Sample_12 14d-post
13 Sample_13 pre
14 Sample_14 2hr-post
15 Sample_15 24hr-post
16 Sample_16 14d-post
17 Sample_17 pre
18 Sample_18 2hr-post
19 Sample_19 24hr-post
20 Sample_20 14d-post
design<-model.matrix(~time)
y_low<-estimateDisp(y_low,design)
fit<-glmFit(y_low,design)
lrt<-glmLRT(fit)
deg = topTags(lrt,p.value = 0.05)$table
Thanks in advance
I answered this question weeks ago on Biostars: https://www.biostars.org/p/410007
I already advised OP to treat each group of four samples as a batch, which one would do by
Dear Gordon, i know you already reply to my question on Biostars, but it wasn't adequately clear for me. That's why i try to seek more help here. I have nobody to help me, and i am on my own, so that's why i ask again here. Sincerely thanks