Question: Plotting segment of Granges intervals
0
5.7 years ago by
Hello I have a Granges object that is like this (used along with ggbio) : GRanges with 6 ranges and 6 metadata columns: seqnames ranges strand | score id highlight <rle> <iranges> <rle> | <numeric> <factor> <logical> [1] 1 [ 4793, 227744] * | -0.17 DAH115 FALSE [2] 1 [ 522302, 558478] * | -0.03 DAH115 FALSE [3] 1 [ 695745, 978366] * | -0.06 DAH115 FALSE [4] 1 [1055159, 1231946] * | 0.24 DAH115 FALSE [5] 1 [1239050, 1589751] * | -0.05 DAH115 FALSE [6] 1 [1593026, 1610764] * | 0.25 DAH115 FALSE I am basically plotting a bar plot with x : genome coordinates, and y : score I would like to know how can I add segments (Start and End) that map IRanges that correspond to a certain value of the object. Example : if values(myobject)$id = DAH115 plot the correspondant (horizontal line) segments (start - end) on top of the final histogram. I think we can use geom_segment but I am not sure how to extract the ranges, I extracted them into a dataframe but I am not sure what would be the method to append the plot Thanks Rad [[alternative HTML version deleted]] • 1.6k views ADD COMMENTlink modified 5.7 years ago by Tengfei Yin490 • written 5.7 years ago by Radhouane Aniba240 Answer: Plotting segment of Granges intervals 0 5.7 years ago by Tengfei Yin490 Tengfei Yin490 wrote: hi just FYI, to avoid duplicate discussion, this thread is continued here https://github.com/tengfei/ggbio/issues/51 basically 1. there is a workaround to add boundary between chromosome discussed in another thread, and 2. low level coord "genome" mapping (layer by layer, data by data) is not supported yet, but I am working on that right now. thanks Tengfei On Wed, Mar 26, 2014 at 6:02 PM, Radhouane Aniba <aradwen@gmail.com> wrote: > Hello > > I have a Granges object that is like this (used along with ggbio) : > > GRanges with 6 ranges and 6 metadata columns: > seqnames ranges strand | score id highlight > <rle> <iranges> <rle> | <numeric> <factor> <logical> > [1] 1 [ 4793, 227744] * | -0.17 DAH115 FALSE > [2] 1 [ 522302, 558478] * | -0.03 DAH115 FALSE > [3] 1 [ 695745, 978366] * | -0.06 DAH115 FALSE > [4] 1 [1055159, 1231946] * | 0.24 DAH115 FALSE > [5] 1 [1239050, 1589751] * | -0.05 DAH115 FALSE > [6] 1 [1593026, 1610764] * | 0.25 DAH115 FALSE > > I am basically plotting a bar plot with x : genome coordinates, and y : > score > > I would like to know how can I add segments (Start and End) that map > IRanges that correspond to a certain value of the object. > > Example : if values(myobject)$id = DAH115 plot the correspondant > (horizontal line) segments (start - end) on top of the final histogram. > > I think we can use geom_segment but I am not sure how to extract the > ranges, I extracted them into a dataframe but I am not sure what would be > the method to append the plot > > Thanks > > Rad > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor@r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > -- Tengfei Yin, PhD Seven Bridges Genomics sbgenomics.com 625 Mt. Auburn St. Suite #208 Cambridge, MA 02138 (617) 866-0446 [[alternative HTML version deleted]]