Hi, I am using edgerR 3.14.0, I have the following script, but estimateDisp failed. However, when I run on an earlier version of edgeR, it works fine. Please see whether you can help to debug this.
> library(edgeR)
> #load(count_mat)
> #16 samples two variations
> #$ genotype: Factor w/2 levles: WT, KO
> #$ Stimulation Factor w/4 levels 0, 2, 4, 16
> Genotype<- c("WT", "WT","WT","WT","WT", "WT","WT","WT","KO","KO","KO","KO","KO","KO","KO","KO")
> LPS<- c("0h", "16h", "2h","4h","0h", "16h", "2h","4h","0h", "16h", "2h","4h","0h", "16h", "2h","4h")
> targets<- data.frame(Genotype, LPS, row.names=samples)
> #targ#setting up groups by combine the two experimental factors into one combine factor
> Group<-factor(paste(targets$Genotype, targets$LPS, sep="_"))
> cbind(targets, Group=Group)
Genotype LPS Group
RWTA0 WT 0h WT_0h
RWTA16h WT 16h WT_16h
RWTA2h WT 2h WT_2h
RWTA4h WT 4h WT_4h
RWTB0 WT 0h WT_0h
RWTB16h WT 16h WT_16h
RWTB2h WT 2h WT_2h
RWTB4h WT 4h WT_4h
Rpggt1bA0 KO 0h KO_0h
Rpggt1bA16h KO 16h KO_16h
Rpggt1bA2h KO 2h KO_2h
Rpggt1bA4h KO 4h KO_4h
Rpggt1bB0 KO 0h KO_0h
Rpggt1bB16h KO 16h KO_16h
Rpggt1bB2h KO 2h KO_2h
Rpggt1bB4h KO 4h KO_4h
> y<-DGEList(count_mat)
> #keep<-rowSums(cpm(y)>1) >= 2
> #y<-y[keep,]
> #head(y,6)
> y<- calcNormFactors(y)
> design.matrix<-model.matrix(~0+Group)
> colnames(design)<-levels(Group)
> y<-estimateDisp(y,design=design.matrix)
Error in mglmOneGroup(y[, j, drop = FALSE], dispersion = dispersion[, :
object '.cR_one_group' not found