all variables in design formula must be columns in colData (Deseq2) error
1
0
Entering edit mode
Galina • 0
@91fadf4e
Last seen 3 months ago
Slovakia

Good day,

Please help with batch option in Deseq2, I have the error below and can't understand the problem as for me my METADATA_RAT has nessesary columns

txi.salmon_rat ENSRNOG00000000070 1.276541e+02 1.296898e+02 1.332189e+02 1.133108e+02 1.110791e+02 1.381127e+02 ENSRNOG00000000073 3.887378e+01 4.370201e+01 4.711458e+01 3.889587e+01 3.678910e+01 4.497496e+01 ENSRNOG00000000075 7.934947e+01 6.401462e+01 6.494397e+01 8.041880e+01 7.816325e+01 7.012191e+01....

coldata_rat <- data.frame(batch = as.factor(METADATA_RAT$batch)) METADATA_RAT$batch [1] "PRJNA953086" "PRJNA953086" "PRJNA953086" "PRJNA953086" "PRJNA953086" "PRJNA953086" "PRJNA953086" [8] "PRJNA953086" "PRJNA953086" "PRJNA953086" "PRJNA953086" "PRJNA953086" "PRJNA953086" .....

dds_rat_with_batch <- DESeqDataSetFromTximport(txi.salmon_rat, colData = coldata_rat, design = ~ batch + condition) Error in DESeqDataSet(se, design = design, ignoreRank) : all variables in design formula must be columns in colData

Could you please help with it,

Galina

BatchQC batchinDeseq2. columnsincolData. • 733 views
ADD COMMENT
0
Entering edit mode
ATpoint ★ 4.5k
@atpoint-13662
Last seen 1 day ago
Germany

Your code is poorly readable. Suggest you select and then highlight with markdown using the 10101 button.

Generally, colData(dds) must have all the columns you reference in design. Here, it is only batch. condition is missing.

ADD COMMENT
0
Entering edit mode

Thank you for advice, you mean I need to add:

countdata_rat <- data.frame(condition = as.factor(METADATA_RAT$treatment))

and total:

dds_rat_with_batch <- DESeqDataSetFromTximport(txi.salmon_rat, colData = coldata_rat, countData = countdata_rat, design = ~ batch + condition)

?

ADD REPLY
0
Entering edit mode
coldata_rat <- data.frame(conditions=..., batch=...)
ADD REPLY
0
Entering edit mode

thank you!

ADD REPLY
0
Entering edit mode

Good day ATpoint,

Could you pls advise also ehy this error could happened

design contains one or more variables with all samples having the same value, remove these variables from the design

ADD REPLY

Login before adding your answer.

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