Closed GabrielHoffman closed 4 years ago
Both is possible.
Caching of only one object type representing the gene sets of choice was based on my assumption that users would typically be interested in either working with gene set list
s or with GeneSetCollection
s. But apparently you have a use case where you want to be able to cache both representations?
Integrating obtaining gene sets with ID mapping is also possible, I'll add here an argument gene.id.type
to getGenesets
.
My issue is that I, as a developer, want to use GeneSetCollection
. But if I write a package that calls getGenesets
, and a user has already called this function and returned a list, then I can't get it to return the right type from cache.
Understand. The caching part (title of this issue) is resolved via b54da66 corresponding to EnrichmentBrowser v2.19.10. This should now distinguish by return.type
when obtaining from cache. You can install directly from github via BiocManager::install("lgeistlinger/EnrichmentBrowser")
.
I'll make a separate issue for the ID mapping part - that's some more restructuring.
I've been thinking about statistical methods for geneset analyses, and I've found your work really useful. I'm currently working on making a new method more accessible to users, and I'd be happy to share once I get a little further.
Many thanks for the kind feedback, and I am definitely interested once you'll have something that you would like to share.
Hi, Last bug report for the night, plus some ideas.
It seems that the caching stores the object returned by
getGenesets()
so if I call it first withreturn.type="list", any subsequent call will return a
listeven if
return.type='GeneSetCollection' is used. I can manually setcache=FALSE
to get the proper object. But I'd like to callgetGenesets()
in a package I distribute to others, and I can't take advantage of the great caching ability because it might return an object of the wrong type. See example at the bottom.While we're talking about caching...have you thought about caching the genesets after running
idMap
to convert the gene ids? I've found thatidMap
is very slow but I need to run it in every R session to convert to ENSEMBL ids:So it would be great if
idMap
could be called withingetGenesets
so the object with ENSEMBL names could be cached.I've been thinking about statistical methods for geneset analyses, and I've found your work really useful. I'm currently working on making a new method more accessible to users, and I'd be happy to share once I get a little further.
Cheers, Gabriel