Question: Plotting related genomic intervals
0
gravatar for yogacacarolom
4.7 years ago by
Brazil
yogacacarolom60 wrote:

Hello I´am trying to found some R package to plot my data properly. Basicaly, I have some genomic regions interacting. At first glance the Gviz and GenomeGraphs R packages fits to my propose. However, I do not found a way to plot what I want to expose, in this packages.

I produced one example of my data structure with the necessary data and one expected plot.

My data to first line == region:

   Rstart   Rend    type
    90       180    Neighborhood
    181      724     CNVR
    725      805    Neighborhood

My data to second line == probes:

   PPosition
    185       
    205
    285
    290
    305
    385
    410
    455
    505
    555
    595

My data to third line == states:

    Sstart  Send  type        tag
    185     285   Loss (1n)  tag_1
    385     455   Gain (3n)  tag_2
    505     595   Gain (3n)  tag_3

My data to fourth line == genes:

   Gstart   Gend    Gname
     225      390    KPN1
     440      495    KPN2
     630      740    KPN3

My data to relations between states versus genes:

    tag     gene
    tag_1   KPN1
    tag_2   KPN1
    tag_2   KNP3
    tag_3   KPN3


A expected plot to the example:

 

Any ideas or solutions will be very useful. Thank you very much. Cheers!

 

plot genomic R • 1.2k views
ADD COMMENTlink modified 4.7 years ago • written 4.7 years ago by yogacacarolom60

What have you tried? A lot of this can be drawn with R primitives (lines and text elements).

ADD REPLYlink written 4.7 years ago by Alex Reynolds28k

I just looked into options in Gviz and GenomeGraphs manuals. However, I do not found any funtion to fit my data.
I looking for some alternatives to produce some similiar plot to my example. I will be very grateful with some directions.

ADD REPLYlink modified 4.7 years ago • written 4.7 years ago by yogacacarolom60

Aside from the black lines between the "states" and genes, you can use Gviz to do that. It won't look exactly like that, of course. The top portion would be a genome axis track and the others data tracks.

ADD REPLYlink written 4.7 years ago by Devon Ryan89k

Thank you very much Devon Ryan. This black lines between states and genes are maybe the main problem. This is a very important feature to show in my data.

I don´t found some R funtion, in any package, to plot something similiar....

However, I am pretty sure that some package can do that.

ADD REPLYlink modified 4.7 years ago • written 4.7 years ago by yogacacarolom60

You can always code something yourself, likely using Gviz or something similar as the base package. You'll just need to grab the actual coordinates of the plotted features in question and then draw lines using base plotting methods as appropriate.

ADD REPLYlink written 4.7 years ago by Devon Ryan89k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 854 users visited in the last hour