[R] Circular plot

Bert Gunter bgunter.4567 at gmail.com
Mon Feb 13 18:53:18 CET 2017


If you don't get a reply here:

1. Search! (try rseek.org as an R search engine).

2. Try the Bioconductor list. As this appears to be closer to their
realm, they may have what you're looking for.


Cheers,
Bert
Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Mon, Feb 13, 2017 at 8:33 AM, swaraj basu <projectbasu at gmail.com> wrote:
> I want to plot segments deleted from mitochondrial DNA of patients with
> neuromuscular disorders. I generate the plot on a linear chromosome using a
> code similar to as shown below
>
> start<-c(1,5,600,820)
> end<-c(250,75,810,1200)
> score<-c(7,-1,4,-6.5)
> dat<-data.frame(start=start,end=end,score=score,col="blue",stringsAsFactors=F)
> dat[dat$score<0,]$col<-"red"
>
> plot(1:1500,rep(0,1500),type="p",ylim=c(-10,10),col="white",xlab="position",ylab="score")
> segments(dat$start, dat$score, dat$end, dat$score, col=dat$col, lwd=3)
>
>
> Since the human mitochondria is a circular genome, I would like to
> visualise the plot generated above as a circle where all segments with
> positive score lie inside the circle and those with negative score lie
> outside. Attached is a representation of my requirement, although here it
> is manually drawn. Can someone help me on this?
>
>
> --
> Swaraj Basu
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list