[R] Circular plot

swaraj basu projectbasu at gmail.com
Mon Feb 13 17:33:31 CET 2017


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example.pdf
Type: application/pdf
Size: 32195 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20170213/fc5df8cb/attachment.pdf>


More information about the R-help mailing list