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

generate_network.py error #33

Open
agcmartins opened this issue Oct 5, 2018 · 2 comments
Open

generate_network.py error #33

agcmartins opened this issue Oct 5, 2018 · 2 comments

Comments

@agcmartins
Copy link

Hi,
I'm using the follow command but it didn't working

:$ /home/user/programs/kinfin/scripts/generate_network.py -m -m kinfin_results/TAXON/TAXON.cluster_summary.txt -c config.txt

[+] Parsing SpeciesClassification file: config.simple.txt ...
[+] Parsing kinfin_results/TAXON/TAXON.cluster_summary.txt ...
[+] Max edge weight is 26312, ...
[+] Building graphs
Traceback (most recent call last):
File "/home/user/programs/kinfin/scripts/generate_network.py", line 189, in
construct_graphs(weighted_edges, proteomeObj_by_proteome_id, attributes)
File "/home/user/programs/kinfin/scripts/generate_network.py", line 111, in construct_graphs
G.add_node(proteomeObj.proteome_id, {k :v for k, v in proteomeObj.level_by_attribute.items()})
TypeError: add_node() takes exactly 2 arguments (3 ###given)

@clydeandforth
Copy link

Hi André,

I had the same problem with this script. It requires an older version of the python networkx module.

You can check what verison of the module you have:
pip freeze | grep networkx
networkx==2.2

I know it works with networkx 1.11 so I installed that:
pip install --force-reinstall networkx==1.11

and then ran the script:

generate_network.py -c config_VFDB.txt -m TAXON/TAXON.cluster_summary.txt
[+] Parsing SpeciesClassification file: config_VFDB.txt ...
[+] Parsing JD_kinfin_Oct_revised.kinfin_results/TAXON/TAXON.cluster_summary.txt ...
[+] Max edge weight is 3423, ...
[+] Building graphs
Name: Graph
Type: Graph
Number of nodes: 29
Number of edges: 406
Average degree: 28.0000
[+] Saving network graph.graphml
[+] Saving network graph.gexf

Cheers,

James

@Yixiangzhang1996
Copy link

Hi,
I'm using the follow command but it didn't working
(python27) [zyx@node01 TAXON]$ python ~/my_kinfin/kinfin-1.0.3/scripts/generate_network.py -m TAXON.cluster_summary.txt -c config.txt [+] Parsing SpeciesClassification file: config.txt ... [+] Parsing TAXON.cluster_summary.txt ... [+] Max edge weight is 9918, ... [+] Building graphs Traceback (most recent call last): File "/home1/zyx/my_kinfin/kinfin-1.0.3/scripts/generate_network.py", line 190, in <module> construct_graphs(weighted_edges, proteomeObj_by_proteome_id, attributes) File "/home1/zyx/my_kinfin/kinfin-1.0.3/scripts/generate_network.py", line 111, in construct_graphs G.add_node(proteomeObj.proteome_id, {k :v for k, v in proteomeObj.level_by_attribute.items()}) TypeError: add_node() takes exactly 2 arguments (3 given)

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

3 participants