Closed plger closed 2 years ago
Thanks for reporting! I'll have a look into it later today (sorry for the delay)!
There seem to be no transcripts within the provided range. This was not handled properly within the function causing thus an error. I will fix that by returning in such cases a GRanges
with the input coords, but no additional features.
With the fix in the devel and BioC3.14 release version you'll get the following (instead of an error):
> library(AnnotationHub)
> library(ensembldb)
> ah <- AnnotationHub()
snapshotDate(): 2022-02-22
> ensdb <- ah[["AH95713"]] # Drosophila EnsDb
loading from cache
> test <- getGeneRegionTrackForGviz(
+ ensdb, chromosome="2R", start=15000, end=200000)
> test
GRanges object with 1 range and 0 metadata columns:
seqnames ranges strand
<Rle> <IRanges> <Rle>
[1] 2R 15000-200000 *
-------
seqinfo: 1 sequence from an unspecified genome; no seqlengths
Hope that's acceptable @plger
Hi! Thanks for the fix.
I'm not sure I understand the choice to return this instead of an empty GRanges
, is the idea to ensure that the right region is nevertheless plotted in GViz
even if it's the only specification of the region?
But either way is fine by me, so long as it doesn't break ;)
yes, exactly - I thought it might be better to return the input range instead of an empty one - but if you think it might be better to return an empty one I could return that instead.
I might not be representative of all use cases, but I would personally return an empty one. I normally just include the gene track systematically when plotting whatever in Gviz, whether there's something or not, for instance to know what's around a peak. If it returns the region it will plot the bar and give the misleading impression that there's a gene in the region... Instead, the only argument against an empty GRanges is that if there's no other element specifying the region, it will give the error "Unable to automatically determine plotting ranges from the supplied track(s)." But that seems to me a decent behavior...
OK, then I'll revert to return an empty GRanges
instead.
thanks again for developing (and maintaining!) this awesome package, and was great to see you in Heidelberg ;)
Yes, was fun meeting you in person! And thanks for reporting bugs - makes it easier to maintain :)
I'm experiencing a weird error in very specific settings:
I get:
The traceback shows:
However if I extend a bit the region, I don't have the error:
but only the warning that no CDS is found...
I'm admittedly not on the latest Bioc, but I've updated ensembldb to 2.19.8 and haven't seen a difference...