Question: Import New Edges into Pre-Existing Network in Cytoscape
gravatar for thorerges
5.8 years ago by
United States
thorerges70 wrote:

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 fileI 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 themIs there a way to do this?


cytoscape network • 3.5k views
ADD COMMENTlink modified 5.8 years ago by cyril-cros910 • written 5.8 years ago by thorerges70
gravatar for cyril-cros
5.8 years ago by
cyril-cros910 wrote:

Since you did not get any answer: read

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 COMMENTlink modified 5.8 years ago • written 5.8 years ago by cyril-cros910
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2234 users visited in the last hour