Hi all,
I've used DESeq2 many times before, but for some reason, running into the below issue
Error in validObject(.Object) : invalid class “DESeqDataSet”
object: superclass "RectangularData" not defined in the environment of
the object's class
My code is as follows:
BiocManager::install("DESeq2")
library(DESeq2)
kegg_mg <- read.delim(here("kegg",
"aaron_metaG_KEGG_counts_merged.txt"),
header=TRUE) %>% as.matrix()
y_mg <- data.frame(row.names=c("GM1a", "GM1b", "GM1c", "GM4a", "GM4b",
"GM4c"),
condition=as.factor(c(rep("GM1",3), rep("GM4",3))))
ddsMat_mg <-DESeqDataSetFromMatrix(countData = kegg_mg, colData =
y_mg, design = ~ condition)
I've restarted Rstudio. Purged all the existing packages and did a clean re-install, and still the problem persists. My input file is a table with 6 columns and count values. Thank you for your help!
Hi Keven, I had the same problem. I checked my countData with" is.integer(countData) " and the output is True. I think my data meets all the requirements you listed above. Could you help me with this? Thank you!
the output of str(metadata)
Hello, how about running
class()
andtypeof()
on these objects?Can you also show the sequence of commands that you are running?
Hi Keven,
I tried to read my data from the CSV files again. Here are my code and the outs. code:
Then I got the error message again.
....
Do you have any suggestions? Thank you!
Li
Please see the suggestion by Michael below