Closed hpages closed 11 months ago
@lawremi @sanchit-saini
Looks like #93 somehow addresses this, with the following gotcha:
library(rtracklayer)
session <- browserSession()
genome(session) <- "hs1"
genome(session)
# [1] "hub_3671779_hs1"
So this sets the precedent that the genome()
getter doesn't bring back the genome supplied by the user.
That would be ok if the mysterious genome name was considered valid by the setter, but that doesn't seem to be the case. In particular, there's the strong expectation that something like genome(session) <- genome(session)
will always work and be a no-op:
genome(session) <- genome(session)
# Error in `genome<-`(`*tmp*`, value = "hub_3671779_hs1") :
# Failed to set session genome to 'hub_3671779_hs1'
Would you guys consider having the getter also pass the internal genome name thru sub(".*_", "", genome)
before returning it to the user?
Thanks!
Actually, I think just making the genome(x)
return value match the user's input is sufficient, but I haven't done much testing. Will push that now.
Also note that something strange happened to
session
:sessionInfo():