This is a test version of Biostars. For the public version, visit https://www.biostars.org.
fmath error in clusterProfiler package

I tried to do Gene set enrichment analysis but I encountered the following error message: library(clusterProfiler)

genelist <- read.table("Data/DE-geneSymbol.txt", header = TRUE, stringsAsFactors = FALSE)

head(genelist)

  KEGGGeneID GeneSymbol  NCBI

1   hsa:3831       KLC1  3831

2  hsa:11274      USP18 11274
3  hsa:81614      NIPA2 81614
4   hsa:5813       PURA  5813
5   hsa:1349      COX7B  1349
6   hsa:7155      TOP2B  7155

 genelist <- genelist[,3]

genelist = sort(genelist, decreasing = TRUE)

head(genelist)

[1] 729515 402055 285527 259197 254102 253980

keggGSEA <- gseKEGG(genelist,organism = "hsa", keyType = "kegg", 
                     exponent = 1, nPerm = 1000, minGSSize = 10, maxGSSize = 500, 
                     pvalueCutoff = 0.05, pAdjustMethod = "BH", verbose = TRUE, 
                    use_internal_data = FALSE, seed = FALSE)

preparing geneSet collections...

GSEA analysis...

**Error in fmatch(p, names(stats)) : attempt to set an attribute on NULL**

Could you please help me?

r enrichment analysis

I added code markup to your post for increased readability. You can do this by selecting the text and clicking the 101010 button. When you compose or edit a post that button is in your toolbar, see image below:

101010 Button

Dear WouterDeCoster; Thanks a lot!

1 answer

Dear all

I solved it. First I prepare my geneList by:

https://github.com/GuangchuangYu/DOSE/wiki/how-to-prepare-your-own-geneList

So the error removed!!

Log in to answer this question.