Entering edit mode
5.6 years ago
hamindigoblue
•
0
I'm trying to use edgeR for rna-seq data in which we are looking to see DE genes at the factor level. For example, this is my targets file
age sex treat
sample1 10 m 1
sample2 10 m 1
sample3 11 f 1
sample4 11 f 1
sample5 12 m 2
sample6 12 m 2
sample7 13 f 2
sample8 13 f 2
And here's my code:
library(edgeR)
x <- read.delim("matrix.txt",row.names="name")
targets <- read.delim("targets.txt")
grouping <- factor(paste(targets$age,targets$sex,targets$treat,sep="."))
cbind(targets,Group=grouping)
design <- model.matrix(~0+grouping)
colnames(design) <- levels(grouping)
y <- DGEList(counts=x,group=grouping)
y <- calcNormFactors(y)
design <- model.matrix(~grouping)
y <- estimateDisp(y,design)
fit <- glmQLFit(y, design)
design <- model.matrix(~sex * treat, data=targets)
qlf <- glmQLFTest(fit, coef=2)
My question is:
1) Did I set up my targets file and code correctly 2) How do I find a list of genes that are affected by the factor of sex, by the factor of treat, and by the interaction between sex and treat.
Thank you very much!