what difference to use edgeR in two different mode?
1
0
Entering edit mode
wang peter ★ 2.0k
@wang-peter-4647
Last seen 9.6 years ago
dear ALL: i have 35 samples to find DE genes between "c0h" vs t0h", i can use such coding to reach the same aim, what is the difference? which one is better? raw.data <- read.table("expression- table.txt",row.names=1)#?1??????,??????????? lib_size <- read.table("lib_size.txt"); lib_size <- unlist(lib_size) #??????????? d <- raw.data[, 2:dim(raw.data)[2]]#?1?????????????????? length<-raw.data[, 1] method 1: group =factor(c('c0h','c0h','c0h','c24h','c24h','c24h','t0h','t0h','t0 h','t6h','t6h','t6h','t6h','t12h','t12h','t12h','t12h','t18h','t18h',' t18h','t18h', 't24h','t24h','t24h','t36h','t36h','t36h','t48h','t48h',' t48h','c6h','c12h','c18h','c36h','c48h')) d <- DGEList(counts = d, lib.size = lib_size, group = group) d <- calcNormFactors(d) #To estimate common dispersion: d <- estimateCommonDisp(d) #To estimate tagwise dispersions: d <- estimateTagwiseDisp(d) et <- exactTest(d, pair=c("c0h","t0h"), dispersion="tagwise") sig1<-summary(de <- decideTestsDGE(et, p=0.05, adjust="BH")) sig1<-as.vector(sig1) result <- topTags(et, n=dim(d)[1], adjust.method="BH", sort.by="p.value") write.table(result,file = "t0h_c0h",sep = "\t") method 2: #??DGEList?? d <- DGEList(counts = d, lib.size = lib_size) #normalization dge <- calcNormFactors(d) rm(d) fac=factor(c('c0h','c0h','c0h','c24h','c24h','c24h','t0h','t0h','t0h', 't6h','t6h','t6h','t6h','t12h','t12h','t12h','t12h','t18h','t18h','t18 h','t18h', 't24h','t24h','t24h','t36h','t36h','t36h','t48h','t48h',' t48h','c6h','c12h','c18h','c36h','c48h')) design = model.matrix(~fac) colnames(design) <- levels(fac) dge <- estimateGLMCommonDisp(dge, design) dge <- estimateGLMTagwiseDisp(dge, design) glmfit.dge <- glmFit(dge, design, dispersion=dge$tagwise.dispersion) t0_c0 = makeContrasts("t0h-c0h",levels=design) lrt.dge <- glmLRT(dge, glmfit.dge, contrast = t0_c0) result <- topTags(lrt.dge, n=dim(dge)[1], adjust.method="BH", sort.by="p.value") write.table(result,file = "t0_c0",sep = "\t") -- 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
• 941 views
ADD COMMENT
0
Entering edit mode
Dario Strbenac ★ 1.5k
@dario-strbenac-5916
Last seen 1 day ago
Australia
>dear ALL: > >i have 35 samples to find DE genes between "c0h" vs t0h", i can use >such coding to reach the same >aim, what is the difference? which one is better? The linear model is better than the exact test because you have a time course, which means the same biological organism measured repeatedly. You can't model organism-specific effects using the exact test.
ADD COMMENT
0
Entering edit mode
dear Dr.Strbenac: thank you for your help but i still donot know the difference technically shan
ADD REPLY

Login before adding your answer.

Traffic: 501 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