Question: How to create an anchor for OmicCircos
0
gravatar for Peter.Wood
4.4 years ago by
Peter.Wood0
Australia
Peter.Wood0 wrote:

Could someone please explain how to create an anchor in the OmicCircos package from a data frame. My previous attempts have failed with the OmicCircos package uploading the hg18/hg19 genome rather than my gene set.

Thanks.

ADD COMMENTlink modified 4.2 years ago by yhu50 • written 4.4 years ago by Peter.Wood0
3
gravatar for yhu
4.2 years ago by
yhu50
United States
yhu50 wrote:

You maybe wanted one gene on one segment. Please try the code as the following. 

The output file is at https://www.dropbox.com/s/pvudjol3s0wkde1/BioC_support01.pdf?dl=0

NOTE: Please use the updated version http://master.bioconductor.org/packages/3.1/bioc/html/OmicCircos.html

rm(list=ls());
library(OmicCircos);

gene.n  <- 200;
chr     <- paste0("Gene", 1:gene.n);
val     <- rnorm(gene.n);
seg.dat <- data.frame(chr=chr, start=rep(1, gene.n), end=rep(1,gene.n)+1, name=chr, value=val);
seg.c   <- segAnglePo(seg.dat, seg=chr);

cols    <- rainbow(10, alpha=0.8);

pdf("BioC_support01.pdf", 8,8);
par(mar=c(2, 2, 2, 2))
plot(c(1,800), c(1,800), type="n", axes=FALSE, xlab="", ylab="");

circos(R=350, type="chr", cir=seg.c, print.chr.lab=TRUE, W=8)
circos(R=270, cir=seg.c, W=80, mapping=seg.dat, type="s", col.v=5, col=cols, B=T, cex=abs(seg.dat[,5])*1.5);
circos(R=190, cir=seg.c, W=80, mapping=seg.dat, type="b", col.v=5, col=cols, B=F, lwd=abs(seg.dat[,5])*1.5);
circos(R=110, cir=seg.c, W=80, mapping=seg.dat, type="b2", col.v=5, col=cols[c(1,7)], cutoff=0, B=T, lwd=2);

dev.off();
ADD COMMENTlink modified 3.7 years ago by Sukhdeep Singh9.7k • written 4.2 years ago by yhu50

This was very helpful! Thank you. Very simple and elegant. I was able to customize my circos plot easily!

ADD REPLYlink written 3.0 years ago by tejaswi.iyyanki0

In this example, line tracks (e.g. if tracks using type "l", "lh", "ls", etc, are included) do not seem to function properly regardless of the lwd utilized.

ADD REPLYlink written 2.4 years ago by IV1.2k
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 2.3.0
Traffic: 1974 users visited in the last hour