ggbio circular plot
2
0
Entering edit mode
@marcin-grzybowski-8436
Last seen 8.5 years ago
Poland

I have GRanges object with SNP. I would like to mark it on chromosome using circular plot from ggbio by colour scale - so more SNP in particular region deeper color. Is it any simple way to do it?

Thank you very much for any advice.

Marcin

ggbio SNP granges • 2.6k views
ADD COMMENT
1
Entering edit mode
@michael-lawrence-3846
Last seen 3.0 years ago
United States

First need to decide how to summarize the SNP density. Perhaps something like a runsum() on the coverage of SNPs? Then it should be relatively straightforward to plot the Rle in a circular area plot, mapping the value to color.

ADD COMMENT
0
Entering edit mode

Thank you for advice. I run:

runsum(coverage(GRanges List), k=50000)

and i got Simple Rle List. I can make nice bar with it, however when i try:

ggplot() + layout_circle(GRanges object, geom="ideo", radius=30, trackWidth=2, fill=SimpleRleList)

it doesn't change my colors. What should i do to change it?

ADD REPLY
1
Entering edit mode
@michael-lawrence-3846
Last seen 3.0 years ago
United States

Not an expert, but perhaps you could coerce that RleList to a GRanges and then generate the circle:

gr <- as(runsum, "GRanges")
ggplot() + layout_circle(gr, geom = "bar", aes(fill = score))
ADD COMMENT

Login before adding your answer.

Traffic: 915 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6