Usage
node.color(plot.data = NULL, discrete=FALSE, limit, bins, both.dirs =
TRUE, low = "green", mid = "gray", high = "red", na.col = "transparent",
trans.fun = NULL)
col.key(discrete=FALSE, limit = 1, bins = 10, cols = NULL, both.dirs =
TRUE, low = "green", mid = "gray", high = "red", graph.size, node.size,
size.by.graph = TRUE, key.pos = "topright", off.sets = c(x = 0, y = 0),
align = "n", cex = 1, lwd = 1)
Arguments
plot.data
the result returned by node.map
function. It is a data.frame composed
of parsed KGML data and summary molecular data
for each mapped node. Rows are mapped nodes, and columns are
parsed or mapped node data. Check node.map
for details.
discrete
logical, whether to treat the molecular data or node summary data as discrete. d
discrete=FALSE, otherwise, mol.data will be a charactor vector of
molecular IDs.
limit
a list of two numeric elements with "gene" and "cpd" as the names. This
argument specifies the limit values for gene.data and cpd.data when converting
them to pseudo colors. Each element of the list could be of length 1 or
2. Length 1 suggests discrete data or 1 directional (positive-valued)
data, or the absolute limit for 2 directional data. Length 2 suggests 2
directional data. Default limit=list(gene=0.5, cpd=1).
bins
a list of two integer elements with "gene" and "cpd" as the names. This
argument specifies the number of levels or bins for gene.data and cpd.data when converting
them to pseudo colors. Default limit=list(gene=10, cpd=10).
both.dirs
a list of two logical elements with "gene" and "cpd" as the names. This
argument specifies whether gene.data and cpd.data are 1 directional or 2
directional data when converting them to pseudo colors. Default limit=list(gene=TRUE, cpd=TRUE).
trans.fun
a list of two function (not character) elements with "gene" and "cpd" as the names. This
argument specifies whether and how gene.data and cpd.data are
transformed. Examples are log
, abs
or users' own
functions. Default limit=list( gene=NULL, cpd=NULL).
low, mid, high
each is a list of two colors with "gene" and "cpd" as the names. This
argument specifies the color spectra to code gene.data and
cpd.data. When data are 1 directional (TRUE value in both.dirs), only
mid and high are used to specify the color spectra. Default spectra (low-mid-high)
"green"-"gray"-"red" and "blue"-"gray"-"yellow" are used for gene.data
and cpd.data respectively.
The values for 'low, mid, high' can be given as color names
('red'), plot color index (2=red), and HTML-style RGB,
("\#FF0000"=red).
na.col
color used for NA's or missing values in gene.data and cpd.data. d
na.col="transparent".
cols
character, specifying a discrete spectrum of colors to be plotted as
color key. Note this argument is usually NULL (default), otherwise, the
number of discrete colors has to match bins
.
graph.size
numeric vector of length 2, i.e. the sizes (width, height) of the
pathway graph panel. This is needed to determine the sizes and exact
location of the color key.
node.size
numeric vector of length 2, i.e. the sizes (width, height) of the
standard gene nodes (rectangles). This is needed to determine the sizes
and exact location of the color key when size.by.graph=FALSE.
size.by.graph
logical, whether to determine the sizes and exact location of the color
key with respect to the size of the whole graph panel or that of a
single node. Default size.by.graph=TRUE.
key.pos
character, controlling the position of color key(s). Potentail values
are "bottomleft", "bottomright", "topleft" and "topright". d
key.pos="topright".
off.sets
numeric vector of length 2, with "x" and "y" as the names. This argument
specifies the offset values in x and y axes when plotting a new color
key, as to avoid overlap with existing color keys or boundaries. Note
that the off.sets
value is reset and returned each time
col.key
function is called, as for the reference of plotting the
next color key. Default off.sets=c(0,0).
align
character, controlling how the color keys are aligned when
needed. Potential values are "x", aligned by x coordinates, and "y",
aligned by y coordinates. Default align="x".
cex
A numerical value giving the amount by which legend text
and symbols should be scaled relative to the default 1.
lwd
numeric, the line width, a _positive_ number, defaulting to '1'.