Description Usage Arguments Details Author(s) See Also Examples
Function for plotting genomic data along with corresponding cytogenetic banding information
1 2 3 4 5 6 |
data |
a vector or matrix of numeric data to plot. The names/rownames attribute needs to contain corresponding gene identifiers |
genome |
a chromLocation object associated with the specified data set. See below for details. |
chr |
which chromosome to plot |
organism |
if NULL, determination of the host organism will be
retrieved from the |
method |
plotting method |
margin |
type of banding information to display in the plot margin |
grid.col |
a two element vector specifying the centromere and band grid colors. |
grid.lty |
a two element vector specifying the centromere and band grid line type. |
widths |
a two element vector specifying the relative width of the margin idiogram two the adjacent graph. This option is currently ignored. |
relative |
If |
dlim |
a two element vector specifying the minimum and maximum
values for |
main |
an overall title for the plot. Defaults to the chromosome name. |
xlab |
a title for the x axis. |
ylab |
a title for the y axis. |
cex.axis |
the magnification to be used for axis annotation relative to the current. |
na.color |
color to be used for NA values, defaults to: par("bg") |
cen.color |
color to be used for the centromere when margin="idiogram", defaults to: "red" |
mb |
if |
... |
additional graphical parameters can be given as arguments. |
This function displays cytogenetic banding information in the plot margin and calls a secondary plotting function to display associated data at the same relative position. Cytogenetic data for human, mouse, and rat genomes are currently included.
The data is arranged by associating gene identifiers to genomic
location using a chromLoc
annotation object built using the
buildChromLocatio
n function from the annotation package. As
such, a vector of data is to be plotted, the names
attribute of
the vector needs to contain the gene identifiers. Likewise if
a matrix of data is to be plotted, the rownames
attribute of the matrix needs to contain the gene identifiers.
To date, plot
can be called for vector data, while
matplot
and image
can be called for matrix
data. Most additional plotting arguments can be passed down via
.... However, the idiogram function plots the axis
independently. Currently, only the cex.axis
,col.axis
,
and font.axis
parameters are intercepted from ... and
redirected to the specialized axis
call. Other
parameters that effect the axis should be set via par
.
The function midiogram
is a simple wrapper around
idiogram
to plot all the chromosomes from a particular organism
using sensible default values. The "m"
refers to
plotting multiple idiograms.
Kyle Furge <kyle.furge@vai.org> and Karl Dykema <karl.dykema@vai.org>
buildChromLocation
,
Hs.cytoband
, idiograb
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 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | library(idiogram)
##
## NOTE:This requires an annotation package to work.
## In this example packages "hu6800.db" and "golubEsets" are used.
## They can be downloaded from http://www.bioconductor.org
## "hu6800.db" is under MetaData, "golubEsets" is under Experimental
## Data.
if(require(hu6800.db) && require(golubEsets)) {
library(golubEsets)
data(Golub_Train)
hu.chr <- buildChromLocation("hu6800")
ex <- assayData(Golub_Train)$exprs[,1]
## make sure the names() attribute is set correctly
gN <- names(ex)
gN[1:10]
idiogram(ex,hu.chr,chr="1")
colors <- rep("black",times=length(ex))
colors[ex > 10000] <- "red"
pts <- rep(1,times=length(ex))
pts[ex > 10000] <- 2
idiogram(ex,hu.chr,chr="1",col=colors,pch=pts,font.axis=2,cex.axis=1)
abline(v=0,col="darkgreen")
## An example of the dlim option. It is most useful for making
## consistant multi-panel plots
colors <- rep("black",times=length(ex))
colors[ex > 10000] <- "red"
colors[ex < 0] <- "blue"
idiogram(ex,hu.chr,chr="1",col=colors,xlim=c(-3000,21000))
idiogram(ex,hu.chr,chr="1",col=colors,dlim=c(-100,7500),xlim=c(-3000,21000))
idiogram(ex,hu.chr,chr="1",col=colors,dlim=c(-100,7500),xlim=c(-3000,10000))
## Using the identify function
ip <- idiogram(ex,hu.chr,chr="1",col=colors,pch=19)
#identify(ip$x,ip$y,labels=ip$labels)
} else print("This example requires the hu6800.db and golubEsets data packages.")
## The example data is BAC array CGH data from J. Fridlyand's
## aCGH package
data(idiogramExample)
idiogram(colo.eset[,1],ucsf.chr,chr="1")
idiogram(colo.eset,ucsf.chr,chr="1",method="image")
idiogram(colo.eset,ucsf.chr,chr="1",method="image",col=topo.colors(50),grid.lty=c(1,NA))
idiogram(colo.eset,ucsf.chr,chr="1",method="mat",type="l")
## for a consistant multi-panel plot it can be helpful to force the data
## range within each panel to a defined range using 'dlim'
## This is similar to calling the 'midiogram' function
op <- par(no.readonly=TRUE)
par(mai=par("mai")*c(0.1,0.5,0.5,0.5))
layout(rbind(c(1:8),c(0,9:14,0),c(15:22)))
for(i in c(1:22)) {
idiogram(colo.eset,ucsf.chr,chr=i,method="i",dlim=c(-1,1),margin="i",relative=TRUE)
}
par(op)
|
Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':
IQR, mad, sd, var, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, basename, cbind, colMeans, colSums, colnames,
dirname, do.call, duplicated, eval, evalq, get, grep, grepl,
intersect, is.unsorted, lapply, lengths, mapply, match, mget,
order, paste, pmax, pmax.int, pmin, pmin.int, rank, rbind,
rowMeans, rowSums, rownames, sapply, setdiff, sort, table, tapply,
union, unique, unsplit, which, which.max, which.min
Welcome to Bioconductor
Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.
Loading required package: annotate
Loading required package: AnnotationDbi
Loading required package: stats4
Loading required package: IRanges
Loading required package: S4Vectors
Attaching package: 'S4Vectors'
The following object is masked from 'package:base':
expand.grid
Loading required package: XML
Loading required package: plotrix
Loading required package: hu6800.db
[1] "This example requires the hu6800.db and golubEsets data packages."
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'hu6800.db'
Warning: zlim used is: -0.839888 0.787702 Please see 'dlim' to adjust.
Warning: zlim used is: -0.839888 0.787702 Please see 'dlim' to adjust.
There were 12 warnings (use warnings() to see them)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.