2
$\begingroup$

I am trying EnrichKEGG on a few gene samples of genes to check it works before inputting the full genome:

This is my data input as test.csv

id,fc
AJAP_14870,-0.04
AJAP_14875,0.32
AJAP_14880,-0.06
AJAP_14885,0.15
AJAP_14890,-0.52
AJAP_14895,-0.39
AJAP_14900,0.16
geneList = test[,2]
names(geneList) = as.character(test[,1])
geneList = sort(geneList, decreasing = TRUE)

mygene <- names(geneList)[abs(geneList) > 2]

kk <- enrichKEGG(gene         = mygene,
                 organism     = 'aja',
                 pvalueCutoff = 0.05)

There are no spaces in the gene names, I tested via

print(head(test$ID), quote=TRUE)

But I get the error

--> No gene can be mapped....
--> Expected input gene ID:
--> return NULL...

I also tried installing through other means

getOption("clusterProfiler.download.method")
#[1] "libcurl"
install.packages("R.utils")
library(R.utils)
R.utils::setOption("clusterProfiler.download.method","auto")

but that gives me the same error when I run the code. Any ideas how to fix this?

Thanks

$\endgroup$
8
  • $\begingroup$ Your code produces no error on my machine, what is your clusterProfiler version ? $\endgroup$
    – Basti
    Oct 9, 2023 at 7:40
  • $\begingroup$ @Basti Thanks so much for getting back to me!! > packageVersion("clusterProfiler") [1] ‘4.2.2’ $\endgroup$
    – reltubycul
    Oct 9, 2023 at 7:42
  • $\begingroup$ Maybe you could try BiocManager::install("clusterProfiler", force = TRUE)as mine is ‘4.7.1’ and restart your R session $\endgroup$
    – Basti
    Oct 9, 2023 at 7:49
  • $\begingroup$ @Basti Thanks for this! I tried that but it still just says version 4.2.2?? $\endgroup$
    – reltubycul
    Oct 9, 2023 at 8:05
  • 1
    $\begingroup$ @Basti, would you mind converting your comments to an answer? It would be more visible. $\endgroup$
    – haci
    Oct 9, 2023 at 9:03

2 Answers 2

3
$\begingroup$

This issue may arise with earlier versions of clusterProfiler.

A solution is to re-install clusterProfiler : BiocManager::install("clusterProfiler", force = TRUE)

Pay attention that updating your R or Bioconductor (and restart your R session) version may be needed as noted in the comments

$\endgroup$
1
$\begingroup$

enrichKEGG() expects entrez gene IDs so you will need to convert your gene identifiers to entrez identifiers first.

EDIT: Please see the answer by @Basti.

$\endgroup$
1
  • $\begingroup$ I've used this code previously and it has only worked using the locus_tags as thats what is input into KEGG for aja as far as I'm aware? Really confused why its not working now? $\endgroup$
    – reltubycul
    Oct 9, 2023 at 7:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.