This function exports a network in edge and node list files in a format suitable for importing to Cytoscape.
exportNetworkToCytoscape(
adjMat,
edgeFile = NULL,
nodeFile = NULL,
weighted = TRUE,
threshold = 0.5,
nodeNames = NULL,
altNodeNames = NULL,
nodeAttr = NULL,
includeColNames = TRUE)
adjacency matrix giving connection strengths among the nodes in the network.
file name of the file to contain the edge information.
file name of the file to contain the node information.
logical: should the exported network be weighted?
adjacency threshold for including edges in the output.
names of the nodes. If not given, dimnames
of adjMat
will be used.
optional alternate names for the nodes, for example gene names if nodes are labeled by probe IDs.
optional node attribute, for example module color. Can be a vector or a data frame.
logical: should column names be included in the output files? Note that Cytoscape can read files both with and without column names.
A list with the following componens:
a data frame containing the edge data, with one row per edge
a data frame containing the node data, with one row per node
If the corresponding file names are supplied, the edge and node data is written to the appropriate files. The edge and node data is also returned as return value (see below).