[BioC] how to design a model matrix
wang peter
wng.peter at gmail.com
Tue May 22 04:56:11 CEST 2012
how to design a model matrix
my data is composed of 35 samples, have two factor
time and treatment
i want to find DE genes cross the time, considering control
so do you think my model matrix is right?
and how to do the test?can i only do pairewised test?
what is glmLRT for?
this is my code
rm(list=ls())
library(edgeR)
library(limma)
raw.data <- read.table("expression-table.txt",row.names=1)#
d <- raw.data[, 1:12]#
dge<- DGEList(d)
treatment=factor(c(rep('treated',24),rep('control',11)))
time=factor( c('oh','oh','oh','6h','6h','6h','6h','12h',
'12h','12h','12h','18h','18h','18h','18h','24h','24h','24h','36h','36h','36h','48h','48h','48h','oh',
'oh','oh','6h','12h','18h','24h','36h','48h'))
design <- model.matrix(~treatment+time)
dge <- estimateGLMCommonDisp(dge, design)
dge <- estimateGLMTagwiseDisp(dge, design)
glmfit.dge <- glmFit(dge, design,dispersion=dge$common.dispersion)
lrt.dge <- glmLRT(dge, glmfit.dge, coef=2)
how to design a model matrix
my data is composed of 35 samples, have two factor
time and treatment
i want to find DE genes cross the time, considering control
so do you think my model matrix is right?
and how to do the test?can i only do pairewised test?
what is glmLRT for?
--
shan gao
Room 231(Dr.Fei lab)
Boyce Thompson Institute
Cornell University
Tower Road, Ithaca, NY 14853-1801
Office phone: 1-607-254-1267(day)
Official email:sg839 at cornell.edu
Facebook:http://www.facebook.com/profile.php?id=100001986532253
More information about the Bioconductor
mailing list