cytoscape / RCy3

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

small bug in hierarchy with createSubnetwork() when multiple networks of same name #43

Closed jooolia closed 5 years ago

jooolia commented 5 years ago

There is a small bug in createSubnetwork() when a subnetwork is requested from a network that does not have a unique name in the collection. This causes the new subnetwork to become a subnetwork of the network that occurs first with the network name, not the current or specified network.

This could be fixed at line 683 in Networks.R by specifying the SUID for source instead of just using the title.

A quick try of the following fixed the situation for using the current network that did not have a unique name. json_sub$source = paste0("SUID:",getNetworkSuid())

But this is not the solution that works appropriately for the function, but can be easily modified to work as expected.

I can submit a pull request for this in the coming days.

AlexanderPico commented 5 years ago

Thanks for tracking this down. I'll keep an eye out for your PR.