edgeR glmRT code error message
1
0
Entering edit mode
3.9 years ago

Hi everyone, I did edgeR to analyze no replicated sample with the following code. Unfortunately, I met some of the problems that I can't fix.

count <- read.table("D:/NDM-12-4/test/Vero.CH.CH-C100.normalisedReadCounts.txt", sep = "\t", header = T, row.names = 1)
view(count)
d1 <- estimateGLMCommonDisp(count, design=NULL, verbose=TRUE)
d2 <- estimateCommonDisp(count, verbose=TRUE)
fit <- glmFit(count,dispersion = 0.26664)
results <- glmLRT(fit, coef=2)

The result shows that

Error in glmLRT(fit, coef = 2) : 
Need at least two columns for design, usually the first is the intercept column

But actually, I put two samples inside the count file. So what does that mean??

R gmlRT edgeR • 1.4k views
ADD COMMENT
1
Entering edit mode
3.9 years ago
Mark ★ 1.6k

You need to create a design matrix. Why did you set it to NULL?

integer or character vector indicating which coefficients of the linear model are to be tested equal to zero. Values must be columns or column names of design

I highly suggest you read the edger manual it is fantastic.

ADD COMMENT
0
Entering edit mode

Oh, that's right. I missed that. THX

ADD REPLY
0
Entering edit mode

Dear Mark,

I have the same issue even providing the "designmatrix". I have only one sample for each condition and use the approach below:

designMat <- matrix(1,2,1)
dgList <- estimateGLMCommonDisp(dgList, design=designMat, method="deviance", robust = TRUE, subset=NULL)

fit <- glmFit(dgList)
lrt <- glmLRT(fit)

edgeR_result <- topTags(lrt, n=Inf)

I get "Need at least two columns for design, usually the first is the intercept column" error in lrt <- glmLRT(fit) step. I have tried a lot and do not know how to fix it - could you please help me with this? Thank you.

ADD REPLY
0
Entering edit mode

Like I said above please read the manual. It's impossible to do DE with 1 sample in each condition. You need at minimum 2 samples per condition.

Please read the manual.

ADD REPLY

Login before adding your answer.

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