jn-goe / gruffi

Granular Functional Filtering (Gruffi) to isolate stressed cells
GNU General Public License v3.0
11 stars 6 forks source link

clusterprofiler / ensembl / AnnotationDbi #17

Closed vertesy closed 8 months ago

vertesy commented 8 months ago

Investigate if this is correctly adressed:

i saw that u are using AnnotationDbi anyways- i would strongly be in favor for the clusterprofiler::bitr part be replaced with a simple AnnotationDbi::select(org.Hs.eg.db::org.Hs.eg.db, "GO:0006096", c("SYMBOL"), "GO")$SYMBOL

intersect(biomaRt::getBM(attributes = c('hgnc_symbol'),filters = "go_parent_term", uniqueRows = TRUE,values = "GO:0006096", mart = ensembl)[,1],AnnotationDbi::select(org.Hs.eg.db::org.Hs.eg.db, "GO:0006096", c("SYMBOL"), "GOALL")$SYMBOL %>% unique())

AnnotationDbi::select(org.Hs.eg.db::org.Hs.eg.db, "GO:0006096", c("SYMBOL"), "GOALL")$SYMBOL %>% unique()

# so please instead of

genes <- clusterProfiler::bitr("GO:0006096",fromType="GO",toType="SYMBOL",OrgDb = org.Hs.eg.db::org.Hs.eg.db)$SYMBOL

genes <- AnnotationDbi::select(org.Hs.eg.db::org.Hs.eg.db, GO, c("SYMBOL"), "GOALL")$SYMBOL %>% unique()

# GOALL is for using the equivalent of go_parent_term
vertesy commented 8 months ago

Originally was posted in https://github.com/vertesy/Seurat.utils/issues/50 and was resolved back then.

As of 2024.02 / gruffi v1.2.8 this will have a clearer indication

instead of the argument use.ensemble = TRUE in GetGOTerms() and its dependent PlotGoTermScores(), it will now be defined in the argument data.base.access = c("biomaRt", "AnnotationDbi")[1],.

The default is the same, using biomaRt / ensembl.