Description Usage Arguments Author(s) Examples
View source: R/idiogram-functions.R
Draw an idiogram for the specified chromosome.
1 2 3 4 5 6 | plotIdiogram(chromosome, build, cytoband, cytoband.ycoords, xlim, ylim=c(0, 2),
new=TRUE, label.cytoband=TRUE, label.y=NULL, srt, cex.axis=1,
outer=FALSE, taper=0.15, verbose=FALSE, unit=c("bp", "Mb"),
is.lattice=FALSE,...)
plotCytoband2(chromosome, build, cytoband, xlim, xaxs="r", new=TRUE,
label.cytoband=TRUE, cex.axis=1, outer=FALSE, verbose=TRUE, ...)
|
chromosome |
character string or integer: which chromosome to draw the cytoband |
build |
UCSC genome build. Supported builds are "hg18" and "hg19". |
cytoband |
data.frame containing cytoband information |
cytoband.ycoords |
numeric: y coordinates |
xlim |
x-axis limits |
xaxs |
numeric. See |
ylim |
y-axis limits |
new |
logical: new plotting device |
label.cytoband |
logical: if TRUE, labels the cytobands |
label.y |
numeric: height (y-coordinate) for cytoband label |
srt |
string rotation for cytoband labels. See |
cex.axis |
size of cytoband labels. See par |
outer |
logical: whether to draw the labels in the outer margins. See par |
taper |
tapering for the ends of the cytoband |
verbose |
Logical. If TRUE, displays human genome build used to annotated the cytoband coordinates. |
unit |
Character string indicating the unit for physical position on the x-axis. Available options are basepairs (bp) or Mb. |
is.lattice |
logical indicating whether your drawing the cytoband on a lattice graphic. |
... |
additional arguments to plot |
Robert Scharpf and Jason Ting
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 | plotIdiogram("1", "hg18")
plotIdiogram("1", "hg19")
plotIdiogram("1", build="hg19", cex=0.8, label.cytoband=FALSE)
## user-defined coordinates
plotIdiogram("1", build="hg19", cex=0.8, label.cytoband=FALSE,
ylim=c(0,1), cytoband.ycoords=c(0.1, 0.3))
library(oligoClasses)
sl <- getSequenceLengths("hg19")[c(paste("chr", 1:22, sep=""), "chrX", "chrY")]
ybottom <- seq(0, 1, length.out=length(sl)) - 0.01
ytop <- seq(0, 1, length.out=length(sl)) + 0.01
for(i in seq_along(sl)){
chr <- names(sl)[i]
if(i == 1){
plotIdiogram("1", build="hg19", cex=0.8, label.cytoband=FALSE, ylim=c(-0.05,1.05), cytoband.ycoords=c(ybottom[1], ytop[1]),
xlim=c(0, max(sl)))
}
if(i > 1){
plotIdiogram(names(sl)[i], build="hg19", cex=0.8, label.cytoband=FALSE, cytoband.ycoords=c(ybottom[i], ytop[i]), new=FALSE)
}
}
axis(1, at=pretty(c(0, max(sl)), n=10), labels=pretty(c(0, max(sl)), n=10)/1e6, cex.axis=0.8)
mtext("position (Mb)", 1, line=2)
par(las=1)
axis(2, at=ybottom+0.01, names(sl), cex.axis=0.6)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.