ReactomePA icon indicating copy to clipboard operation
ReactomePA copied to clipboard

gsePathway giving "Error in check_gene_id(geneList, geneSets)"

Open pschumann4 opened this issue 5 months ago • 0 comments

Hello,

I have tried looking through previous issue reports and have not found this issue addressed, yet.

I am using enrichPathway and gsePathway in a custom loop to analyze a large dataset. Typically, when an enrichment (ORA/GSEA) result yields a NULL value, the loop will simply check for the NULL and skip to the next iteration. However, when I run gsePathway on these genes: 100101640 and 321166, instead of simply returning a NULL, gsePathway interrupts the loop entirely, preventing further iteration. That is, even when I assign the results of gsePathway to a variable, that variable is not created at all due this error.

Here is a basic version of the code:

genes <- c("100101640", "321166") geneList <- c(0.6, -0.5) names(geneList) <- genes

reac_gse <- gsePathway(geneList, organism = "zebrafish", eps = 1e-300, pvalueCutoff = 0.05)

This is the error:

--> Expected input gene ID: 565971,565155,100317496,550134,447850,100334231 Error in check_gene_id(geneList, geneSets) : --> No gene can be mapped....

If I run these two genes using enrichPathway in the same manner as:

reac_ora <- enrichPathway(gene = genes, organism = "zebrafish", pvalueCutoff = 0.05)

"reac_ora" will be a NULL value, which is good because my loop is not interrupted by this, and this is somewhat expected given that there are only 2 genes, here.

Can you please suggest a solution to this? I haven't checked the source code for this function, but it seems like a NULL should be returned in this case.

Additionally, (this is just a curiosity) could you explain why the error lists the "expected" genes?

Thank you for your time, Peter

pschumann4 avatar Jan 29 '24 20:01 pschumann4