Closed kzhang529 closed 6 years ago
please use the cyrest module and check out the advanced-cancer-networks-and-data notebook
for eg.:
defaults_dic={"NODE_SHAPE":"ellipse",\
"NODE_SIZE":"60",\
"NODE_FILL_COLOR":"#AAAAAA",\
"EDGE_TRANSPARENCY":"120"}
defaults_list=cytoscape.vizmap.simple_defaults(defaults_dic)
NODE_LABEL=cytoscape.vizmap.mapVisualProperty(visualProperty="NODE_LABEL",mappingType="passthrough",mappingColumn="display name")
cytoscape.vizmap.create_style(title="dataStyle",defaults=defaults_list,mappings=[NODE_LABEL])
sleep(2)
cytoscape.vizmap.apply(styles="dataStyle")
Thanks for your reply, I’ll try that.
Best, Ke
On Aug 7, 2018, at 4:01 PM, Jorge Boucas notifications@github.com wrote:
please use the cyrest module and check out the advanced-cancer-networks-and-data notebook https://github.com/cytoscape/cytoscape-automation/blob/master/for-scripters/Python/advanced-cancer-networks-and-data.ipynb for eg.:
defaults_dic={"NODE_SHAPE":"ellipse",\ "NODE_SIZE":"60",\ "NODE_FILL_COLOR":"#AAAAAA",\ "EDGE_TRANSPARENCY":"120"} defaults_list=cytoscape.vizmap.simple_defaults(defaults_dic)
NODE_LABEL=cytoscape.vizmap.mapVisualProperty(visualProperty="NODE_LABEL",mappingType="passthrough",mappingColumn="display name")
cytoscape.vizmap.create_style(title="dataStyle",defaults=defaults_list,mappings=[NODE_LABEL]) sleep(2) cytoscape.vizmap.apply(styles="dataStyle") — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cytoscape/py2cytoscape/issues/69#issuecomment-411183267, or mute the thread https://github.com/notifications/unsubscribe-auth/Am5Ore70JYJ83_tP3VmblUoytkzOOkWEks5uOfIzgaJpZM4VDC2N.
deprecated
I'm trying to use py2cytoscape to create network on Cytoscape. However, "lock width and height" is always applied on Cytoscape network Node-Style after I run the program, I tried to add some statements like " 'NODE_LOCK_NODE_WIDTH_AND_HEIGHT': False " or "'NODE_VISUAL_PROPERTY_DEPENDENCY': False" to basic_settings dict to avoid locking, but all of them don't work. Could someone tell me how to update default setting to make height and width unlocked?
In addition, it seems that py2cytoscape is still python2 incompatible when I install it by command "pip install py2cytoscape"(Issue #63 has talked about this). I was wondering when will it be updated in master branch.
Cytoscape:
CyRest:
Java:
Code:
error: