cytoscape / RCy3

New version of RCy3, redesigned and collaboratively maintained by Cytoscape developer community
MIT License
48 stars 20 forks source link

Incorrect return from createNetworkFromDataFrames #128

Closed bdemchak closed 3 years ago

bdemchak commented 3 years ago

It appears that this function (see line 956) intends to return an SUID but is instead returning a dictionary containing the SUID (e.g., {'networkSUID': 12345}).

If this is so, followon use of the SUID (e.g., in loadTableData calls) reverts to ignoring the dictionary and using "current" for the network instead. This may coincidentally work, but also ripples through to the return value of createNetworkFromIgraph.

Can you verify this, and if it's true and needs fixing, I can fix it in py4cytoscape, too.

AlexanderPico commented 3 years ago

As far as I can tell, this is working properly in R. The return from createNetworkFromDataFrames is of type numeric. More specifically, R allows for named numerics, so it's viewed as:

networkSUID 
       3169 

in the console, but is handled as a numeric when passed around to other functions.

I did a quick test where I used the returned value in a subsequent function and it was used regardless of the "current" network.