Entering edit mode
Hi all,
After googling and ask chatGPT, I don't know how to fix this error. Would you please have a suggestion? Thank you so much!
gene_sets_dir <- "gene_sets"
c2_gmt_url <- "https://data.broadinstitute.org/gsea-msigdb/msigdb/release/2023.2.Hs/c2.all.v2023.2.Hs.entrez.gmt"
c2_gmt_file <- file.path(
gene_sets_dir,
"c2.all.v2023.2.Hs.entrez.gmt"
c2_list <- qusage::read.gmt(c2_gmt_file) # geneSets <- getGmt(c2_gmt_file) also get the same error. GeneSets is large genesetcollection.
w <- arrayWeights(numeric_matrix, design)
fit <- lmFit(numeric_matrix, design, weights=w)
cameraRes <- camera(fit, c2_list, inter.gene.cor=0.01) # fit is large MArrayLM, c2_list is large list.
Error in getEAWP(y) : data object isn't of a recognized data class
I guess the c2_list or geneSets is not in the correct format.
Thanks James! That is a great tip.
Now I guess the error is because
geneSets
is not in the correct format but I don't know how to fix.Again, this is where you need to read the help page and try to diagnose. It says
And if you do
?read.gmt
it says the output is a list, with each item representing a gene set. Most likely the gene sets are just gene symbols. Unless therow.names
of your 'y' object are the same thing as the values in yourgeneSets
list,y[index]
isn't going to select the rows corresponding to the gene set, right?Thanks James! I fixed the error. I try gene symbol instead of entrez and it worked.