cytoscape / py2cytoscape

Python utilities for Cytoscape and Cytoscape.js
https://py2cytoscape.readthedocs.io
MIT License
178 stars 45 forks source link

Cytoscape add_edge returns invalid call. Seems typo in api call? #70

Closed andorsk closed 6 years ago

andorsk commented 6 years ago

cytoscapeVersion 3.6.1 apiVersion v1

networkname = 'SampleNetwork'
network = cy.network.create_empty(name=networkname)
cy.network.set_current(network=networkname)
for i in range(10):
    addNode('Node{}'.format(str(i)), attributes={'Index':i, 'SecondaryIndex': i+1} ,properties={'PIndex':i, 'PSecondaryIndex': i+1} ) #add node is a custom method adding nodes to a network

cy.network.add_edge(sourceName ="Node1",targetName="Node2")

logs when invoked show:

2018-08-29 16:13:04,938 [qtp581760066-71 - /v1/commands/network/add%20adge] ERROR org.cytoscape.application.userlog - Exception executing task: Failed to find command: 'add adge' (from namespace: network)

Seems like there's an issue with the api call and the client. Api direct call gives add edge (not adge) as an option.

curl http://localhost:1234/v1/commands/network/add%20edge fixes the issue if done from terminal returns

Available arguments for 'network add edge':
  isDirected
  name
  network
  sourceName
  targetName
________________
andorsk commented 6 years ago

sent in a pull request to fix this. please review pr: https://github.com/cytoscape/py2cytoscape/pull/71