Entering edit mode
I am currently trying to conduct KEGG enrichment analysis using the Pathview package in R. However, R always responds with the following warning:
Warning: None of the genes or compounds mapped to the pathway! Argument gene.idtype or cpd.idtype may be wrong. 'select()' returned 1:1 mapping between keys and columns
Can you help me solve this problem?
#unlisting gene id and log fold change
Control_entrez_unlist_gene <-unlist(Control_entrez$NCBI.gene..formerly.Entrezgene..ID)
Control_entrez_unlist_fold = unlist(Control_entrez$Log.fold.change)
pathview_Control<- data.frame(matrix(ncol = 2, nrow = length(Control_entrez_unlist_gene)))
pathview_Control[1] = as.character(Control_entrez_unlist_gene)
pathview_Control[2] = Control_entrez_unlist_fold
pathview(gene.data = pathview_upregulated_PvsJControl, species = "dre", pathway.id = "dre04672", limit = list(gene=2, cpd=1))
Thank you for the reply.
I already conducted the KEGG enrichment analysis and I got the pathway ID.
So there is no doubt it cannot be mapped.
Also, the reason why I have so many NA values is that I converted the Ensembl ID to Entrez ID.
Will removing the NA values help solve the problem?
Did you try?
And, FWIW, in the cases I had ensembl-based RNA-seq datasets I removed all genes that had no corresponding entrezid before doing enrichment analysis. For that I used the ensembl-based annoation libraries (
EnsDb
), and not theOrgDb
.