Networks

Networks can be displayed to represent the relevant associations between X and Y variables, they are inferred using a pairwise association score between X and Y variables. The user can set a threshold to represent only the variables X and Y with an association score greater than the threshold. By changing this threshold, the user can choose to include or exclude relationships in the relevance network. 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.

Usage in mixOmics

Networks graphs can be obtained in mixOmics via the function network as displayed below:

## Will work with sPLS result
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))

## 'threshold' is the limit to consider a link between to variable.
## Is directly changeable with interactive = TRUE
network(toxicity.spls, comp = 1:3, threshold = 0.65,
    X.names = NULL, Y.names = NULL, keep.var = TRUE,
    color.node = c("mistyrose", "lightcyan"),
    shape.node = c("rectangle", "circle"),
    color.edge = c("red", "blue"),
    lty.edge = c("solid", "solid"), lwd.edge = c(1, 1),
    show.edge.labels = FALSE, interactive = TRUE)

script 

You should get two windows like these ones, one with the graph and an interactive one to customize the threshold:

  

We can export the graph to Cytoscape file format:

net.result <- network(toxicity.spls, comp = 1:3, threshold = 0.6,
                      color.edge = c("darkgreen", "red"),
                      shape.node = c("rectangle", "circle"),
                      show.color.key = FALSE)

write.graph(net.result$gR, file = "network.gml", format = "gml")

References

  • González I., Lê Cao K.-A., Davis M.D. and Déjean S. (2011) Insightful graphical outputs to explore relationships between two ‘omics’ data sets. Submitted.