[BioC] Gviz - Plot genes and data from - strand (3'-5') in 5'-3' direction

Hahne, Florian florian.hahne at novartis.com
Fri Sep 13 15:11:25 CEST 2013


I think I get the point of what you are trying to do, but I am not quite
sure how exactly that translates to the way things are done in Gviz. If I
take your example, would you want to flip only the transcripts on the
minus strand? Or would you also want to flip the peaks on the minus
strand? Just flipping transcripts, or groups of elements in an
AnnotationTrack, is not hard. We have a somewhat natural inflection point
for each transcript to do that operation. However, the locations that you
are plotting in this case are no longer genomic locations. They are
artificial coordinates that just happen to overlap with the original gene
region.
The locations of the peaks that you are seeing in a second DataTrack are
still genomic locations, so you wouldn't actually get your peaks to align
if all you are flipping are the transcripts on the minus strand. Now how
would you go about flipping the data in the DataTrack? What are your
inflection points? The same ones that you used for the genes? In this case
we should need some cross-talk between several tracks, but the current
Gviz implementation is that tracks are separate from one another and can
be drawn without knowing about other tracks. Also how would you deal with
region between genes? If your data are continuos and not distinct peaks
that would look really weird...
Maybe I am getting you all wrong, and a simple graphical example could
help me show what exactly you want to archive.



On 9/13/13 9:51 AM, "Steve Lianoglou" <lianoglou.steve at gene.com> wrote:

>Hi,
>
>On Fri, Sep 13, 2013 at 12:39 AM, Hahne, Florian
><florian.hahne at novartis.com> wrote:
>> Since Gviz track objects are essentially GRanges, one could use the
>> reflect method to archive this.
>
>Indeed -- I felt like a few judicially placed reflect calls would do the
>trick.
>
>> Not quite sure why one would like to do this, because the resulting
>> coordinates are no longer genomic coordinates, but you guys may have a
>> convincing use case I am sure.
>
>Imagine you want to show several examples of binding of <whatever> to
>some landmark within the gene -- for instance, something binding close
>to the transcript start site.
>
>If I want to single out a few examples to show during a presentation
>on a slide and I have a mix of (+) and (-) strand genes, not only do I
>have to explain the main idea of the slide -- that there is some
>spatial preference for XXX -- but I also have to remind the audience
>that these genes are on the (+) and these are on the (-) "so filp the
>coords for examples 2, 5, and 7 in your head and imagine you see the
>spatial bias I am explaining because once flipped, the peaks will end
>up (pretty much) on top of each other ... trust me."
>
>There are times when the strand is irrelevant and what I really want
>to show is something as a function of the direction of transcription.
>
>Know what I mean?
>
>-steve
>
>-- 
>Steve Lianoglou
>Computational Biologist
>Bioinformatics and Computational Biology
>Genentech



More information about the Bioconductor mailing list