convert2cytoscape | R Documentation |
Converts an adjacency matrix to Cytoscape's sparse matrix format
convert2cytoscape(A)
A |
Matrix or data frame. A cleaned, finalized response matrix ready to be visualized |
A sparse matrix formatted for Cytoscape
Alexander Christensen <alexpaulchristensen@gmail.com>
Shannon, P., Markiel, A., Ozier, O., Baliga, N. S., Wang, J. T., Ramage, D., ... & Ideker, T. (2003). Cytoscape: A software environment for integrated models of biomolecular interaction networks. Genome Research, 13, 2498-2504.
# Simulate Datasets
one <- sim.fluency(10)
two <- sim.fluency(10)
# Compute similarity matrix
cos1 <- similarity(one, method = "cosine")
cos2 <- similarity(two, method = "cosine")
# Compute networks
net1 <- TMFG(cos1)
net2 <- TMFG(cos2)
# Convert to Cytoscape format
cyto1 <- convert2cytoscape(net1)
cyto2 <- convert2cytoscape(net2)
# Write to .csv
write.csv(cyto1, file.path(tempdir(), "cyto1.csv"), row.names = FALSE)
write.csv(cyto2, file.path(tempdir(), "cyto2.csv"), row.names = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.