Closed tangmaomao16 closed 4 years ago
Good news: I just recently added the analyzeNetwork
function to RCy3, so we should be all set. However, there are a couple issues I'm not sure about:
analyzeNetwork
will dump all the stats into the Node and Edge tables. So, it is easy to make styles from the results using RCy3.The new analyzeNetwork
function can be used in Cytoscape 3.8 (released today!) and the dev version of RCy3 (form bioconductor or github). The official bioconductor release will occur in a couple weeks, so it's not there yet.
Thank you for your work! Below are Cytoscape-3.7.2 on Windows 10 64bit system screenshot.
Cytoscape-3.7.2-Analyze_Subset_of_Nodes [
](url)
Cytoscape-3.7.2-Generate_Style_from_Statistics [
](url)
Thanks! Huh, never used those. The style feature is simply an older, more limited version of the Style Panel
So, you can Ananlyze Subset using these RCy3 functions:
createSubnetwork()
analyzeNetwork()
(again, you'll need the dev version of RCy3 and the latest Cytoscape v3.8 to get the new analyzeNetwork() function)
And you can set those four styles based on analysis results using these:
setNodeSizeMapping()
setNodeColorMapping()
setEdgeLineWidthMapping()
setEdgeColorMapping()
Good news: You can set any of many dozens of node and edge style properties based on analysis results, so you are longer limited to just these four.
If you need help with updating your script, please provide what you have so far and sample files.
Dear friend,when I use the RCy3,I have another problem. The nodes in the plotting figure could be overlapped! So I need to manually use my computer mouse to drag those nodes so that display them not too close. My question is whether there are some codes in CRy3 to set the nodes display not too close.
---Original--- From: "Alexander Pico"<notifications@github.com> Date: Sun, Apr 19, 2020 01:55 AM To: "cytoscape/cytoscape-automation"<cytoscape-automation@noreply.github.com>; Cc: "Author"<author@noreply.github.com>;"tangmaomao16"<419242057@qq.com>; Subject: Re: [cytoscape/cytoscape-automation] want RCy3 code to do "Analyze Subset of Nodes" and "Generate Style from Statistics" (#53)
Thanks! Huh, never used those. The style feature is simply an older, more limited version of the Style Panel
So, you can Ananlyze Subset using these RCy3 functions:
createSubnetwork() analyzeNetwork()
(again, you'll need the dev version of RCy3 and the latest Cytoscape v3.8 to get the new analyzeNetwork() function)
And you can set those four styles based on analysis results using these:
setNodeSizeMapping() setNodeColorMapping() setEdgeLineWidthMapping() setEdgeColorMapping()
Good news: You can set any of many dozens of node and edge style properties based on analysis results, so you are longer limited to just these four.
If you need help with updating your script, please provide what you have so far and sample files.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Cytoscape layouts have parameters you can tune to automatically get more spacing, etc:
layoutNetwork('force-directed defaultSpringCoefficient=.00006 defaultSpringLength=80')
Play with the layout parameters in the GUI first to settle on values that you think will work well with the networks you plan to run in your script: Layouts > Layout Settings
You can also interrogate node positions and calculate overlaps if really want to. X and Y positions are just node properties like anything else. You can then programmatically change positions to resolve overlaps. This is a bit extreme, imo. But it is possible. I'd try tuning layouts first :)
I used to use the graphic interface of Cytoscape software. And I use the "Analyze Subset of Nodes" and "Generate Style from Statistics". But now I need to do a lot of such work. So I set up RCy3 environment on Ubuntu 1804 system. But I cannot find the codes of "Analyze Subset of Nodes" and "Generate Style from Statistics". Please tell me how can I get the codes or achieve such effect.
I want to display the correlation between genus and environment_parameter.
My network file is a tsv file with content like this: genus environment_parameter r_value r_label Russula pH 0.71 pos Mortierella pH 0.75 pos
My node data is a tsv file with content like this: var group Mortierella genus pH environoment_parameter