Skip to content
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

_pglasso.get_pathway_graph() error #3

Open
mspivakov opened this issue Jan 28, 2022 · 2 comments
Open

_pglasso.get_pathway_graph() error #3

mspivakov opened this issue Jan 28, 2022 · 2 comments

Comments

@mspivakov
Copy link

mspivakov commented Jan 28, 2022

Hello! I've installed pglasso with python 2.7 and networkx 2.2, and I'm getting the following error when trying to execute your example script:

T = pglasso.pglasso(AML1_S, pathways, 0.15)

TypeError Traceback (most recent call last)
in ()
----> 1 T = pglasso.pglasso(AML1_S, pathways, 0.15)

_pglasso.pyx in _pglasso.cpglasso_DC()

_pglasso.pyx in _pglasso.get_pathway_graph()

TypeError: add_edge() takes exactly 3 arguments (4 given)

Would really appreciate your help as pglasso seems like a really useful approach for our work. Many thanks!

@mspivakov
Copy link
Author

The problem is in the syntax of add_edge, which I suppose has changed:

It should be:

pathway_graph.add_edge(name1, name2, weight=-t)

Rather than:

pathway_graph.add_edge(name1, name2, {"weight": -t})

@mspivakov
Copy link
Author

I've patched the package source code accordingly and it works now. Perhaps you may want to update it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant