View source: R/func__networkAnalyser__compileGraphs.R
compileGraphs | R Documentation |
This function pools graphs in a Graph object into a single network while keeping individual graphs separated. It is particularly useful when a user wants to display cliques or other kinds of clusters in a single view (such as in Cytoscape). The Graph object is produced by the function extractSubgraphs.
This function does not behave like the Cytoscape utility "merge networks". Specifically, it keeps the separation between graphs through appending a cluster ID to each node name so that the node shared by different graphs become distinguishable. It adds a label column to save the node names. In Cytoscape, for example, the user can choose this label column as node labels. Notice the first two columns, namely, node1 and node2, correspond to allele names in the third and fourth columns, respectively. Therefore, to make a directed network in Cytoscape, the source and target columns are specified based on the third and fourth columns.
compileGraphs(graphs, edge.attr = NULL, node.attr = NULL, id = "")
graphs |
A Graph object created using the function extractSubgraphs. |
edge.attr |
A character vector of column names for edge attributes. |
node.attr |
A character vector of column names for node attributes. |
id |
A name (character) for the output network object (default: ""). |
Yu Wan (wanyuac@126.com)
g <- compileGraphs(graphs = clusters, edge.attr = c("beta", "score"), node.attr = c("n", "class"), id = "cliques")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.