Question: Circos Tile colors
gravatar for Radek
8 days ago by
Radek40 wrote:


I would like to draw a circos plot representing the aneuploïdy of my samples. My goal is to plot each sample as a different radius of my circle with the color of the tiles representing the aneuploidy (2N, 4N, etc)

I started to do some tests using OmicCircos but so far could not find a way to do that. 

Does someone has a solution or advices to offer? 


Thanks in advance! 

ADD COMMENTlink modified 5 days ago by bernatgel60 • written 8 days ago by Radek40
gravatar for bernatgel
5 days ago by
bernatgel60 wrote:

I have successfully used Circos to plot copy number data, but I have no experience with OmicsCircos and similars.

If you can accept a "linear" plot instead of circular you could take a look to karyoploteR.

First create the sample data (with just two samples) and a few alterations.


gains.samp1 <- toGRanges(data.frame(chr=c("chr1", "chr2", "chr2"), start=c(1, 1, 140e6), end=c(40e6, 5e6, 180e6)))
losses.samp1 <- toGRanges(data.frame(chr=c("chr1", "chr3", "chr3"), start=c(140e6, 1, 20e6), end=c(200e6, 5e6, 45e6)))
gains.samp2 <- toGRanges(data.frame(chr=c("chr1", "chr2", "chr2"), start=c(1, 10e6, 160e6), end=c(20e6, 15e6, 210e6)))
losses.samp2 <- toGRanges(data.frame(chr=c("chr2", "chr2", "chr3"), start=c(1, 120e6, 1e6), end=c(9e6, 140e6, 50e6)))


Then use plotKaryotype to create the ideogram and kpPlotRegions to add the copynumber alterations

kp <- plotKaryotype(chromosomes=c("chr1", "chr2", "chr3"))

kpPlotRegions(kp, data=toGRanges(gains.samp1), col="red")
kpPlotRegions(kp, data=toGRanges(losses.samp1), col="green")

Exaple with 1 sample

Or you can plot the 2 samples in different "tracks" using r0 and r1 as in Circos and add a histogram like plot to show how frequent is the gain or loss of a certain region

kp <- plotKaryotype(chromosomes=c("chr1", "chr2", "chr3"), plot.type = 2)

kpAddLabels(kp, "Sample1", r0=0, r1=0.5, cex=0.5)
kpPlotRegions(kp, data=gains.samp1, col="#FF6666", r0=0, r1=0.5)
kpPlotRegions(kp, data=losses.samp1, col="#66FF66", r0=0, r1=0.5)

kpAddLabels(kp, "Sample2", r0=0.5, r1=1, cex=0.5)
kpPlotRegions(kp, data=gains.samp2, col="#FF6666", r0=0.5, r1=1)
kpPlotRegions(kp, data=losses.samp2, col="#66FF66", r0=0.5, r1=1)

kpAddLabels(kp, "All Samples", cex=0.5, data.panel=2)
kpPlotCoverage(kp, data=c(gains.samp1, gains.samp2), col="#FF6666AA", data.panel = 2, r1=0, r0=0.5)
kpPlotCoverage(kp, data=c(losses.samp1, losses.samp2), col="#66FF66AA", data.panel = 2, r0=0.5, r1=0.9)

Example with 2 samples

ADD COMMENTlink written 5 days ago by bernatgel60
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 123 users visited in the last hour