network {integrOmics} | R Documentation |
Display relevance associations network for (regularized) canonical correlation analysis and (sparse) PLS regression.
## S3 method for class 'rcc': network(object, ncomp, threshold = 0.5, X.names = NULL, Y.names = NULL, color.node = c("white", "white"), shape.node = c("circle", "rectangle"), color.edge = c("blue", "red"), lty.edge = c("solid", "solid"), lwd.edge = c(1, 1), show.edge.labels = FALSE, interactive = FALSE, ...) ## S3 method for class 'spls': network(object, ncomp, threshold = 0.5, X.names = NULL, Y.names = NULL, keep.var = TRUE, color.node = c("white", "white"), shape.node = c("circle", "rectangle"), color.edge = c("blue", "red"), lty.edge = c("solid", "solid"), lwd.edge = c(1, 1), show.edge.labels = FALSE, interactive = FALSE, ...)
object |
object returned by rcc . |
ncomp |
the dimensionality to adequately account for the data association. |
threshold |
numeric value between 0 and 1 . The tuning
threshold for the relevant associations network (see Details). |
X.names, Y.names |
character vector containing the names of X- and Y-variables. |
keep.var |
boolean. If TRUE only the variables with loadings not zero are plotted
(as selected by spls ). Defaults to TRUE . |
color.node |
vector of length two, the colors of the X and Y nodes (see Details). |
shape.node |
character vector of length two, the shape of the X and Y nodes (see Details). |
color.edge |
vector of length two. The colors of the edges (see Details). |
lty.edge |
character vector of length two, the line type for the edges (see Details). |
lwd.edge |
vector of length two, the line width of the edges (see Details). |
show.edge.labels |
logical. If TRUE , plot association values as edge
labels (defaults to FALSE ). |
interactive |
logical. If TRUE , a scrollbar is created to change the
threshold value interactively (defaults to FALSE ). See Details. |
... |
not used currently. |
network
allows to infer large-scale association networks
between the X and Y datasets in rcc
or spls
. The output is a graph where
each X- and Y-variable corresponds to a node and the edges
included in the graph portray associations between them.
In rcc
, to identify X-Y pairs showing relevant associations, network
calculate a
similarity measure between X and Y variables in a pair-wise manner: the
scalar product value between every pairs of vectors in dimension dim
representing
the variables X and Y on the axis defined by (Z_1,... ,Z_{dim
}), where
Z_i, i=1, ... ,dim
, is the bisector vector between the i-th X and
Y canonical variate.
In spls
, the similarity measure between X and Y variables is given
by the scalar product value between every pairs of vectors in dimension dim
representing
the variables X and Y on the axis defined by (U_1,... ,U_dim
), where
U_i, i=1, ... ,dim
, is the i-th X variate.
Variable pairs with a high similarity measure (in absolute value) are considered as relevant. By changing the threshold, one can tune the relevance of the associations to include or exclude relationships in the network.
interactive=TRUE
open two device, one for association network, one for scrollbar,
and define an interactive process: by clicking either at each end
(`-' or `+') of the scrollbar or
at middle portion of this. The position of the slider indicate which is the `threshold' value
associated to the display network.
The interactive process is terminated by clicking the second button and selecting `Stop' from the menu, or from the `Stop' menu on the graphics window.
The color.node
and color.edge
are vectors of length two,
of any of the three kind of R
colors, i.e., either a color name
(an element of colors()
), a hexadecimal string of the form "#rrggbb"
,
or an integer i
meaning palette()[i]
.
color.node[1]
and
color.node[2]
give the color for filled nodes of the X- and Y-variables
respectively. Defaults to c("white", "white")
.
color.edge[1]
and color.egde[2]
give the color to
edges with positive and negative weight respectively. Defaults to c("blue", "red")
.
shape.node[1]
and shape.node[2]
provide the shape of the nodes associate
to X- and Y-variables respectively. Current acceptable values are
"circle"
and "rectangle"
. Defaults to c("circle", "rectangle")
.
lty.edge[1]
and lty.egde[2]
give the line type to edges with positive
and negative weight respectively. Can be one of "solid"
, "dashed"
,
"dotted"
, "dotdash"
, "longdash"
and "twodash"
. Defaults
to c("solid", "solid")
.
lwd.edge[1]
and lwd.edge[2]
provide the line width to edges with positive
and negative weight respectively. This attribute is of type double with
a default of c(1, 1)
.
network
return a graph
object (see the igraph R package).
If the number of variables is high, the generation of the network can take some seconds.
Sébastien Déjean, Ignacio González and Kim-Anh Lę Cao.
Butte, A. J., Tamayo, P., Slonim, D., Golub, T. R. and Kohane, I. S. (2000). Discovering functional relationships between RNA expression and chemotherapeutic susceptibility using relevance networks. Proceedings of the National Academy of Sciences of the USA 97, 12182-12186.
Moriyama, M., Hoshida, Y., Otsuka, M., Nishimura, S., Kato, N., Goto, T., Taniguchi, H., Shiratori, Y., Seki, N. and Omata, M. (2003). Relevance Network between Chemosensitivity and Transcriptome in Human Hepatoma Cells. Molecular Cancer Therapeutics 2, 199-205.
require(igraph) ## network representation for objects of class 'rcc' data(nutrimouse) X <- nutrimouse$lipid Y <- nutrimouse$gene nutri.res <- rcc(X, Y, lambda1 = 0.064, lambda2 = 0.008) network(nutri.res, ncomp = 3, threshold = 0.6) ## Changing the attributes of the network network(nutri.res, ncomp = 3, threshold = 0.6, color.node = c("mistyrose", "lightcyan"), shape.node = c("circle", "rectangle"), color.edge = c("blue", "red"), lty.edge = c("dashed", "solid"), lwd.edge = c(2, 2), show.edge.labels = TRUE) ## interactive 'threshold' ## Not run: network(nutri.res, ncomp = 3, threshold = 0.55, interactive = TRUE) ## select the 'threshold' and "see" the new network ## End(Not run) ## network representation for objects of class 'spls' data(liver.toxicity) X <- liver.toxicity$gene Y <- liver.toxicity$clinic toxicity.spls <- spls(X, Y, ncomp = 3, keepX = c(50, 50, 50), keepY = c(10, 10, 10)) network(toxicity.spls, ncomp = 3, threshold = 0.8, X.names = NULL, Y.names = NULL, keep.var = TRUE, color.node = c("mistyrose", "lightcyan"), shape.node = c("rectangle", "circle"), color.edge = c("blue", "red"), lty.edge = c("solid", "solid"), lwd.edge = c(1, 1), show.edge.labels = FALSE, interactive = FALSE)