Entering edit mode
2.9 years ago
yang.zhizhang
▴
10
Hi
When I do my data's Gene Set Enrichment Analysis with ClusterProfiler using codes of Mohammed Khalfan from website, when I run the following code and got the error message.
gse <- gseGO(geneList=gene_list,
ont = "ALL",
keyType = "ENSEMBL",
nPerm = 10000,
minGSSize = 3,
maxGSSize = 800,
pvalueCutoff = 0.05,
verbose = TRUE,
OrgDb = organism,
pAdjustMethod = "none")
preparing geneSet collections...
--> Expected input gene ID: ENSG00000157404, ENSG00000185650, ENSG00000106410, ENSG00000143569, ENSG00000102904, ENSG00000125686
Error in check_gene_id(geneList, geneSets) :
--> No gene can be mapped....
My dataset 's gene id is ENSG... what would be wrong? I set organism code below:
organism = "org.Hs.eg.db"
BiocManager::install(organism, character.only = TRUE)
library(organism, character.only = TRUE)
I am new to R and really appreciate your help.
maybe double check that your gene ids don't have any trailing or leading whitespace?
one option would be
str_trim
fromstringr
https://stringr.tidyverse.org/reference/str_trim.htmlShow us the result of:
head(gene_list)
to see if your gene list is in the right format.that looks like an excel spreadsheet and not the actual
gene_list
object from your code which doesn't help troubleshootIt would help greatly if you showed the code you used to create
gene_list
the file shown in your screenshot.