-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement deleteDuplicateEdges with ignoreDirection #130
Comments
deleteDuplicateEdges is not working. Probably because the change of .edgeNameToEdgeSUID in RCy3.util.R. |
Fixed with 3348c65 |
Added internal function first. Still working on this function. |
Fixed. |
Still not working. |
@yihangx Still open or fixed? |
This is still open. In py4cytoscape, it uses list comprehension there: https://github.com/cytoscape/py4cytoscape/blob/ad4ac43919d34c955d88ce07d5fc540a693b6700/py4cytoscape/network_selection.py#L788-L791 |
List comprehensions can be complex, but they still map to a simpler construct. For example:
maps to
Likewise:
maps to
Note that in this case, all_edges ends up as a list of tuples: [(node1,node2), (node1,node3), (node2,node3)] ... for example. A more complicated example:
maps to:
Comprehensions in Python are pretty convenient and concise. I don't know whether R has a similar construct. |
py4cytoscape now has an extra parameter on delete_duplicate_edges ... it allows edge direction to be ignored.
The overall flow of the function was maintained, but important changes were made to allow different definitions of edge equivalence, and performance was improved considerably. (On my PC, executing the old structure on 3000 edges took about 11 minutes.)
I recommend that the same changes be made to the RCy3 version.
The text was updated successfully, but these errors were encountered: