Search
Question: Circos Tile colors
0
13 months ago by
Belgium

Hi!

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?

modified 13 months ago by bernatgel90 • written 13 months ago by Radek40
0
13 months ago by
bernatgel90
Spain
bernatgel90 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.

library(karyoploteR)

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")

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)

kpPlotRegions(kp, data=gains.samp1, col="#FF6666", r0=0, r1=0.5)
kpPlotRegions(kp, data=losses.samp1, col="#66FF66", r0=0, r1=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)

kpPlotCoverage(kp, data=c(losses.samp1, losses.samp2), col="#66FF66AA", data.panel = 2, r0=0.5, r1=0.9)