STRING: retain style after merging two different STRING networks.

169 views
Skip to first unread message

Alaa Badredine

unread,
Jul 16, 2018, 7:52:48 PM7/16/18
to cytoscape-helpdesk
Hello,

I have generated two networks using STRING database in Cytoscape with the import function. I would like to merge both networks while retaining their styles. Did someone manage to figure out how can we achieve it ? 

Thanks in advance.
Alaa

Alex Pico

unread,
Jul 17, 2018, 7:49:59 PM7/17/18
to cytoscape-helpdesk
After merge you get a new network. Select that network as your "current" network and then choose the menu option: Apps > STRING > Set as STRING network.

 - Alex

Alaa Badredine

unread,
Jul 18, 2018, 5:22:30 AM7/18/18
to cytoscape-helpdesk
Thank you Alex for your reply. However, I could not get to keep the styles after following your indications. Perhaps I didn't explain myself clearly, sorry for that. I joined two screenshots to explain more what I meant. As you see in the screenshots, each style comes from each network accordingly (network 1 = style 1, network 2 = style 2). After merging, depending on which style I choose, the network will color the other nodes in white (either style 1 or style 2). Is there anyway to combine both styles 1 and 2 ?

Thanks in advance.

PS: in case you wonder why I don't query my genes in the same set, it's because you can query less than 2000 genes/query. 
Selection_040.png
Selection_041.png

Alex Pico

unread,
Jul 18, 2018, 2:21:07 PM7/18/18
to cytoscape...@googlegroups.com
Ah, I see now. Thanks for the screenshots. Ok, so all the attributes are merged (even in styles), EXCEPT for fill color. Looking in the style mapping for fill color it's apparent why: It is a discrete mapping for each of the styles that includes ONLY the nodes in each of the source networks.

Good news: That color is randomly assigned and completely meaningless. So, you can take either style A or B, expand Fill Color mapping, and then right-click on "Discrete Mapping" and choose a new Mapping Value Generator to set new colors for ALL your nodes.

 - Alex

Alaa Badredine

unread,
Jul 19, 2018, 5:20:52 AM7/19/18
to cytoscape-helpdesk
Hello Alex,

Thanks Alex and sorry for the late reply. Unfortunately, it is not that simple. these colors are not randomly assigned because STRING is a database of protein interactions where each color has a meaning. That's why when I wanted to combine both networks to preserve that information. Maybe I have to write a script to combine the styles ? I need to explore that a bit. But if you have other suggestions, please let me know.

Best regards,
Alaa

Scooter Morris

unread,
Jul 19, 2018, 10:28:36 AM7/19/18
to cytoscape-helpdesk
Hi Alaa,
   Couple of things here.  First, you can certainly query string with > 2000 genes (although will need the latest version of the StringApp), which may make the following discussion moot.  Second, Alex is right, the actual color of nodes is pretty much meaningless.  On the web site, they use a color gradient that roughly corresponds to the significance value, but the same color gradient includes your query proteins.  It's also important to note that the color gradient probably doesn't have much meaning after the first 10 or 12 proteins and certainly should have much meaning when you merge two datasets.  On the other hand, if you do merge two datasets, you can create a gradient your self using Cytoscape styles to color by the score.

-- scooter

Alaa Badredine

unread,
Jul 19, 2018, 12:15:53 PM7/19/18
to cytoscape...@googlegroups.com
Hello Scooter !

Happy to hear from you again ! :)) 

And thanks for your reply too. StringApp must have been updated very recently because just a couple of days back I couldn't query more than 2000 genes (unless I did something weird). I guess Alex was right, I though that String had a special legend for the colors of the nodes. I thank you both of your help on this topic.


Thanks guys!

--
You received this message because you are subscribed to a topic in the Google Groups "cytoscape-helpdesk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cytoscape-helpdesk/ybIINwLzM3U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cytoscape-helpd...@googlegroups.com.
To post to this group, send email to cytoscape...@googlegroups.com.
Visit this group at https://groups.google.com/group/cytoscape-helpdesk.
To view this discussion on the web visit https://groups.google.com/d/msgid/cytoscape-helpdesk/43ac6dad-d471-4f49-84eb-e86e5b63dcb2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Best regards,


Bioinformatician engineer, IGBMC

 




Reply all
Reply to author
Forward
0 new messages