Import New Edges into Pre-Existing Network in Cytoscape
1
0
Entering edit mode
9.6 years ago
thorerges ▴ 70

I have a network consisting of about 500 nodes and a few thousand edges (a picture of this is attached) which I imported from a .CSV file. I have another table, containing some 200 more connections in the following format in a CSV file as well:

Gene        Connection      Gene
gene1       1               gene2
gene3       1               gene4
gene1       1               gene4

The 1's simply represent a connection in an unweighted graph between each gene pair. I would like to import these connections into Cytoscape, so each previously connected pair of nodes has 2 connections between them. Is there a way to do this?

Screenshot

network cytoscape • 4.8k views
ADD COMMENT
1
Entering edit mode
9.6 years ago
cyril-cros ▴ 950

Since you did not get any answer, read http://wiki.cytoscape.org/Cytoscape_User_Manual/Creating_Networks

You can import an excel/csv file to Cytoscape. The minimal configuration is two columns, source and target nodes. You can use some awk commands (or just copy paste in excel) - supposing the edges are oriented in Cytoscape, you want to create the reciprocal edge target -> source.

awk '{print $1, "\t",$3}'  yourFile.csv > file1.csv   # print the 1st and 3rd columns separated by a tabulation
​awk '{print $3,"\t",$1}'  yourFile.csv  > file2.csv   # do the reverse
cat file1.csv file2.csv > inputCytoscape.csv          # concatenate the files

You now have two different networks. Go to Cytoscape/Tools/Merge (and maybe Advanced Merge) to get a single network.

ADD COMMENT

Login before adding your answer.

Traffic: 1854 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6