Error in DESeqDataSet(se, design = design, ignoreRank) : all variables in design formula must be columns in colData
1
0
Entering edit mode
@4fedfa78
Last seen 2.0 years ago
Japan

Hello everyone, I use DEseq2 and Im working on R studio, I used the below commands for running the DEseq2:

library(DESeq2)
counts_data <- read.csv("/Users/maryam/Documents/comp1/allcountsss.csv") colData <- read.table("/Users/maryam/Documents/comp1/Book1.csv",header = TRUE,sep = ",")
head(colData)

colData2 <- cbind(colData,as.factor(colData$condition))[,-2]
cbind(colData,as.factor(colData$condition))[,-2]
summary(colData2)

dds <- DESeqDataSetFromMatrix(countData = counts_data[,2:5], colData = colData2, design = ~ condition)

but I am getting this error:
Error in DESeqDataSet(se, design = design, ignoreRank) :
all variables in design formula must be columns in colData

I checked my design formula it is like this:
ensgeneID as.factor(colData$condition)

  1. ESN0000.... control

    1. ENS0000... control
    2. ENS0000.... mix1
  2. ENS000..... mix2

I looked for solution on google but exactly can't find the problem, is there anyone to help me please?

DESE DESeq2 • 3.9k views
ADD COMMENT
0
Entering edit mode
Basti ▴ 780
@7d45153c
Last seen 3 minutes ago
France

Your colData2 object must contain a column condition

ADD COMMENT
0
Entering edit mode

thank you for reply. it contains but as.factor

ADD REPLY
0
Entering edit mode

Could you show the output of colnames(colData2) ?

ADD REPLY
0
Entering edit mode

ensgeneID as.factor(colData$condition) 1 ESN000000.. control 2 ESN000000... control

3 ESN00000... mix1

4 ESN00000... mix2

ADD REPLY
0
Entering edit mode

There is no variable named condition in this object, please check your code in order to provide a column `conditioning this data frame corresponding to your variable of interest

ADD REPLY

Login before adding your answer.

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