Cytoscape: Export all subnetworks to excel seperately
Dear all
I have a networks of 3038 nodes and 6192 edges. I have imported it into the cytoscape and have created subnetworks using Tools->network analyzer -> subnetwork creation. i have got more than 200 subnetworks and I cant export each subnetwork individually. Is there any shortcut to get the interactions in subnetworks seperately in excel or text file? I am looking for some thing like this:
subnet1
geneX geneY
geneX genez
geneY geneV
subnet2
genea geneb
genec genea
geneb genec
• 4,513 views
•
link
1 answer
I have also posted the same question in cytoscape discussions forum and fortunately got the response. I am putting it here if in case any body gets same kind of problem...
we can use the built-in Commands for Cytoscape to make a very basic script, like this:
network get network=subnet1
edge list network=subnet1
network get network=subnet2
edge list network=subnet2
This will produce output like this:
subnet1
source: Node suid: 77 target: Node suid: 189 directed: true [geneX (pp) geneY]
source: Node suid: 76 target: Node suid: 190 directed: true [geneX (pp) geneZ]
source: Node suid: 76 target: Node suid: 77 directed: true [geneY (pp) geneV]
...
subnet2
source: Node suid: 300 target: Node suid: 299 directed: true [geneA (pp) geneB]
source: Node suid: 299 target: Node suid: 215 directed: true [geneC (pd) geneA]
source: Node suid: 298 target: Node suid: 301 directed: true [geneB (pp) geneC]
...
• 0 views
•
link
Log in to answer this question.
How can we get this to a file(txt or excel)? I run this code and it just show the result on the screen.