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
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)
?
thank you!
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