Closed:edgeR Factorial DE Design
0
0
Entering edit mode
5.6 years ago

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!

edgeR differential expression factorial • 150 views
ADD COMMENT
This thread is not open. No new answers may be added
Traffic: 2932 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6