Question: ggbio circular plot
0
gravatar for Marcin Grzybowski
4.0 years ago by
Poland
Marcin Grzybowski0 wrote:

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

snp ggbio granges • 1.4k views
ADD COMMENTlink modified 4.0 years ago by Michael Lawrence11k • written 4.0 years ago by Marcin Grzybowski0
Answer: ggbio circular plot
1
gravatar for Michael Lawrence
4.0 years ago by
United States
Michael Lawrence11k wrote:

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 COMMENTlink written 4.0 years ago by Michael Lawrence11k

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 REPLYlink written 4.0 years ago by Marcin Grzybowski0
Answer: ggbio circular plot
1
gravatar for Michael Lawrence
4.0 years ago by
United States
Michael Lawrence11k wrote:

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 COMMENTlink written 4.0 years ago by Michael Lawrence11k
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 16.09
Traffic: 156 users visited in the last hour