HI,
I have 20 samples of leishmaniasis vaccine that all of them belong to a low dose, with four different time courses, which each has five replicate. i prepare a count table which contains gene names, and sample names with count numbers. 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%. Since i am new to EdgeR, i want to know if i am following the right path or not? because in the end number of the DE genes that i get is 10.
Thanks in advance
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
the result :
genes logFC logCPM LR PValue FDR
29374 ENSG00000227740 -20.78082 -0.06178923 1898.767 0 0
29967 ENSG00000228601 -20.70710 0.01400828 4597.612 0 0
3640 ENSG00000108924 -20.66524 0.04755844 3114.040 0 0
5382 ENSG00000123119 -20.65702 0.10512820 1486.161 0 0
2370 ENSG00000100600 -20.64387 0.21416278 1731.573 0 0
43848 ENSG00000252756 -20.62157 0.07501494 3396.423 0 0
29983 ENSG00000228624 -20.61890 0.10010055 1563.587 0 0
31399 ENSG00000230583 -20.61545 0.08888092 1783.825 0 0
52898 ENSG00000265784 -20.57370 0.24883706 17582.995 0 0
54539 ENSG00000267802 -20.53795 0.11711300 1954.292 0 0