Giter Site home page Giter Site logo

Comments (7)

GuangchuangYu avatar GuangchuangYu commented on June 15, 2024 1

It's a good idea to enable ID conversion instead of just converting it to SYMBOL.

I will consider this in future release.

from reactomepa.

GuangchuangYu avatar GuangchuangYu commented on June 15, 2024

not an issue of clusterProfiler.

this is the issue of org.Sc.sgd.db which doesn't contains SYMBOL while the GENENAME (expected full name that is descriptive and verbose) is actually the SYMBOL.

I think you need to contact the maintainer of org.Sc.sgd.db to correct this.

from reactomepa.

malcook avatar malcook commented on June 15, 2024

+1 - I would greatly appreciate this too - in the mean time I seek other workaround:
https://support.bioconductor.org/p/118647/
@snystrom did you find a good workaround?

from reactomepa.

snystrom avatar snystrom commented on June 15, 2024

I use the following solution for GO terms. I take the gene symbol ids but tell clusterProfiler to use "GENENAME" in keytype. For OrgDb I go ahead and pass the actual db object.

gene_symbols <- c("YFG1", "YFG2", "YFG3")
res_GO <- clusterProfiler::enrichGO(gene_symbols, OrgDb = org.Sc.sgd.db::org.Sc.sgd.db,
                                                keytype = "GENENAME", ont = "BP")

I don't have a workaround for pathway enrichment. Seems the easiest solution is to just allow id conversion or just let the user say what column the values are from.

from reactomepa.

malcook avatar malcook commented on June 15, 2024

Hi @snystrom - this helps allot. I have tried something like this already but with your encouragment that it SHOULD work, have further characterize the underlying issue.

First, I should note that I am using later version of clusterProfiler than you are, one in which keytype (all lowercase) is deprecated in favor of keyType.

Still, with that change, your example fails in my hands as follows:

> gene_symbols <- c("YFG1", "YFG2", "YFG3")
> res_GO <- clusterProfiler::enrichGO(gene_symbols, OrgDb = org.Sc.sgd.db::org.Sc.sgd.db,
+                                                 keyType = "GENENAME", ont = "BP")
--> No gene can be mapped....
--> Expected input gene ID: MHF1,RMD1,MMS4,IMI1,SPS100,CST9
--> return NULL...

(edit: I know realize the "YFG" in your example stands for "Your favorite gene". Doh!)

However, I tried a different set of gene symbols taken from genes associated with GO term Observable: RNA modification and this approach does work:

> gene_symbols <- c("ABP140","ATS1","BUD32","CBF5")
> res_GO <- clusterProfiler::enrichGO(gene_symbols, OrgDb = org.Sc.sgd.db::org.Sc.sgd.db,  keyType = "GENENAME", ont = "BP")
> res_GO
#
# over-representation test
etc...

However, in my case, I did not have GENENAME but rather ORF.

So, let me try your approach using keyType="ORF" (which is what I did try in the first place)...

First, I find that I can use bitr to translate those gene_symbols to ORF identifiers

> orf<-bitr(gene_symbols,'GENENAME','ORF',"org.Sc.sgd.db")$ORF
'select()' returned 1:1 mapping between keys and columns
> orf
[1] "YOR239W" "YAL020C" "YGR262C" "YLR175W"

But using them with enrichGO fails:

> res_GO <- clusterProfiler::enrichGO(orf, OrgDb = org.Sc.sgd.db::org.Sc.sgd.db,  keyType = "ORF", ont = "BP")

No gene set have size > 10 ...
--> return NULL...

So... I do have a workaround, which is to translate my ORFs to GENENAME (using bitr) and use them.

However, I would have expected the last example to work, and think this is still a BUG.

@GuangchuangYu - do you see my point?

Thanks!

from reactomepa.

snystrom avatar snystrom commented on June 15, 2024

Just tracked down the root of this issue and it's that DOSE::enricher_internal requires EntrezID. Looks like the real fix will either have to come from modification of DOSE, or modify the internal codebase of this package to allow keytype conversion to ENTREZID so it's compatible with DOSE::enricher_internal. I'll leave it to @GuangchuangYu to decide on that design decision.

from reactomepa.

sagarutturkar avatar sagarutturkar commented on June 15, 2024

Hello, I am facing the similar issue. Perhaps someone has found a workaround for this? Any pointers are appreciated.

from reactomepa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.