[Bioc-devel] Gviz doesn't provide enough horizontial space
Hahne, Florian
florian.hahne at novartis.com
Tue May 6 09:03:02 CEST 2014
Hi Renan,
this was more a conceptional choice. If you think about how IRanges and
GRanges are defined, a sequence letter should be placed in the middle in
between the start and the end position of a given base. Now the slightly
confusing thing is that a range from 1 to 2 actually has width 2, and not
1. So when you are asking for a stretch of sequence for the range
IRanges(1,2) you actually get two letters. My suspicion is that something
goes wrong on that level. I definitely want to keep the base labels in
between, so your suggested fix below is not quite what we want. I¹ll have
to take a closer look at the portion of the code that computes the xlims
to see what is going on. It looks like a bug, though.
Will get back to you once I find the time to look into the issue.
Florian
On 06/05/14 02:46, "Sauteraud, Renan P" <rsautera at fhcrc.org> wrote:
>Hi,
>
>In version 1.9.1 of Gviz
>Line 3590:3591 of Gviz-methods.R, in the drawGD method.
>The sequence is set to be maxBase -1 and the x position for the letters
>starts at 0.5 and increments by 1.
>
>Changing:
> sequence <- as.character(as(subseq(GdObject, start=minBase,
>end=maxBase-1), "Rle"))
> at <- seq((minBase+0.5), maxBase - 1 + 0.5, by=1)
>To:
> sequence <- as.character(as(subseq(GdObject, start=minBase,
>end=maxBase), "Rle"))
> at <- seq((minBase), maxBase , by=1)
>
>Will plot all letters as expected. A small issue being that the first and
>last letter may be half drawn (although still readable). Which I thought
>was the reason why letters are drawn between positions (between axis
>ticks). Maybe the viewport of the panel could be increased a little bit
>if background.title is "transparent" (default). There are probably use
>case I have not thought about and I have not done extensive testing,
>maybe Florian can explain why the letters are set this way.
>
>Best.
>Renan
>
>________________________________________
>From: Hahne, Florian [florian.hahne at novartis.com]
>Sent: Monday, May 05, 2014 8:29 AM
>To: Sebastian Gibb
>Cc: bioc-devel at r-project.org; Sauteraud, Renan P
>Subject: Re: Gviz doesn't provide enough horizontial space
>
>Hi Sebastian,
>This could be a rounding error. I will have to take a closer look at it
>and will get back to you asap.
>Thanks for reporting,
>Florian
>
>PS: Pviz looks nice. Already have a couple of use cases :-)
>
>
>On 02/05/14 21:52, "Sebastian Gibb" <sgibb.debian at gmail.com> wrote:
>
>>sTrack <- SequenceTrack(Hsapiens)
>>
More information about the Bioc-devel
mailing list