Description Usage Arguments Author(s) References Examples
This is the main function of OmicCircos to draw circular plots.
1 2 3 4 |
mapping |
data frame or matrix containing mapping information and values. Column 1: the segment or chromosome ID; column 2: the position; column 3: the position label (optional) or the value and additional columns are the values. such as gene expression and copy number. Missing values are allowed and will be ignored. |
xc |
integer, the circle center x coordinate |
yc |
integer, the circle center y coordinate |
R |
integer, the circle radius |
W |
integer, the circle width |
cir |
genome reference name (hg19, mm10 ...) or data frame from segAnglePo function or data frame from user's mapping data |
.
type |
the type is one of
|
col.v |
column number. The column value will be displayed. If type=heatmap, the number is as the first column. |
B |
logical: draw background? |
print.chr.lab |
logical: draw chromosomes or segment labels? |
col.bar |
logical: draw col.bar? It is for type=heatmap. |
col.bar.po |
draw col.bar position, e.g. topleft, bottomright. |
cluster |
logical: cluster and draw Dendrogram at left coner? It is for type=heatmap only. |
order |
vector: chromosome or segment order |
scale |
logical: draw scale? |
cutoff |
numeric: for multiple samples |
zoom |
vector containing six values: start chromosome, end chromosome, start position, end position, start angle and end angle |
lwd |
numeric: line width |
cex |
numeric: fond or point sizes |
col |
character or vector: color names |
side |
character (in or out): for type=label(2) only |
... |
... |
Ying Hu <yhu@mail.nih.gov> Chunhua Yan <yanch@mail.nih.gov>
OmicCircos: an R package for simple and circular visualization of omics data. Cancer Inform. 2014 Jan 16;13:13-20. doi: 10.4137/CIN.S13495. eCollection 2014. PMID: 24526832 [PubMed] PMCID: PMC3921174
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | library(OmicCircos);
options(stringsAsFactors = FALSE);
set.seed(1234);
## initial values for simulation data
seg.num <- 10;
ind.num <- 20;
seg.po <- c(20:50);
link.num <- 10;
link.pg.num <- 4;
## output simulation data
sim.out <- sim.circos(seg=seg.num, po=seg.po, ind=ind.num, link=link.num,
link.pg=link.pg.num);
seg.f <- sim.out$seg.frame;
seg.v <- sim.out$seg.mapping;
link.v <- sim.out$seg.link
link.pg.v <- sim.out$seg.link.pg
seg.num <- length(unique(seg.f[,1]));
## select segments
seg.name <- paste("chr", 1:seg.num, sep="");
db <- segAnglePo(seg.f, seg=seg.name);
colors <- rainbow(seg.num, alpha=0.5);
pdffile <- "OmicCircos4vignette1.pdf";
pdf(pdffile, 8, 8);
par(mar=c(2, 2, 2, 2));
plot(c(1,800), c(1,800), type="n", axes=FALSE, xlab="", ylab="", main="");
circos(R=400, cir=db, type="chr", col=colors, print.chr.lab=TRUE, W=4, scale=TRUE);
circos(R=360, cir=db, W=40, mapping=seg.v, col.v=3, type="l", B=TRUE, col=colors[1], lwd=2, scale=TRUE);
circos(R=320, cir=db, W=40, mapping=seg.v, col.v=3, type="ls", B=FALSE, col=colors[9], lwd=2, scale=TRUE);
circos(R=280, cir=db, W=40, mapping=seg.v, col.v=3, type="lh", B=TRUE, col=colors[7], lwd=2, scale=TRUE);
circos(R=240, cir=db, W=40, mapping=seg.v, col.v=19, type="ml", B=FALSE, col=colors, lwd=2, scale=TRUE);
circos(R=200, cir=db, W=40, mapping=seg.v, col.v=19, type="ml2", B=TRUE, col=colors, lwd=2);
circos(R=160, cir=db, W=40, mapping=seg.v, col.v=19, type="ml3", B=FALSE, cutoff=5, lwd=2);
circos(R=150, cir=db, W=40, mapping=link.v, type="link", lwd=2, col=colors[c(1,7)]);
circos(R=150, cir=db, W=40, mapping=link.pg.v, type="link.pg", lwd=2, col=sample(colors,link.pg.num));
dev.off()
## Not run:
demo(OmicCircos4vignette1)
demo(OmicCircos4vignette2)
demo(OmicCircos4vignette3)
demo(OmicCircos4vignette4)
demo(OmicCircos4vignette5)
demo(OmicCircos4vignette6)
demo(OmicCircos4vignette7)
demo(OmicCircos4vignette8)
demo(OmicCircos4vignette9)
demo(OmicCircos4vignette10)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.