I 'm working on GSEA using clusterProfiler and came across two problems.
1. How should I prepare geneList?
2. What does TERM2GENE mean?
I've worked out the differentially expressed genes from mouse microarray data.
Then I tried the following script but failed to obtain the results.
geneList <- results$gene.id
geneList <- levels(geneList)
geneList = sort(geneList, decreasing = TRUE)
term <- rep("ischemia24h",length.out = 844)
TERM2GENE <- cbind(term, geneList)
exponent = 1,
nPerm = 1000,
minGSSize = 2,
maxGSSize = 5000,
pvalueCutoff = 0.05,
pAdjustMethod = "BH",
TERM2NAME = NA,
verbose = TRUE,
seed = FALSE,
by = "fgsea")
preparing geneSet collections... --> Expected input gene ID: 94094,223650,17926,12831,29875,68178 Error in check_gene_id(geneList, geneSets) : --> No gene can be mapped....