-
Notifications
You must be signed in to change notification settings - Fork 2
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
Problems to execute python script create_random_networks_for_netzcore.py #1
Comments
Hi Jordi, Unfortunately, this script is in Python2 and has not been ported to Python3. Though it would be relatively straightforward to adapt using 2to3 tool, you might need to adjust some functions in relation to NetworkX in addition. If you dont provide -x, GUILD will use the default value for the number of random graphs, which is 0 (see nSampled in main.cpp) and thus, the results wont make much sense. Let me know if you need further help with the code. Also if you happen to port this code into Python3, let me know and I can include it in the repo. Best wishes, Emre |
Hi Emre, Is true I solved it when I executed the script with python version 2.7. But now I find a new problem... with the same script: When I execute it I obtain this error: python src/create_random_networks_for_netzcore.py data/test_interactions.txt 100 Traceback (most recent call last): I dont know where is this fourth argument.... I tried to modify the script but the error persist... Thanks for your help and time |
Hi Jordi, This is because the add_edge function definition had been updated a while ago in NetworkX. A quick work around could be replacing Hope it helps, Emre |
Hi Emre, it seems that we are close to get it. Now the script breaks with this error... Traceback (most recent call last): Thanks for your help |
Hi Emre, Following your advice, I installed an old version of Networx version (1.10) and the script works! Thanks for your help! But let me ask you a question... This script "src/create_random_networks_for_netzcore.py" repeated the same scores of edges every time? Because I obtained the same results every time, without any modification. Thanks! |
You can modify the code |
Hi Jordi, Glad that you made it work. The script preserves the edge scores that were given in the input file. It simply shuffles nodes with the same (or similar / equivalent) degrees to create new networks with exactly the same topology. Accordingly, the networks will be different from each other as different nodes will be connected with each other in each of them (and thus it is not the same as copying the same file 100 times). Hope this helps, Emre |
Dear all,
My name is Jordi Valls, and I'm trying to execute the python script create_random_networks_for_netzcore.py from NetZcore module of GUILD.
I try to execute GUILD following the tutorial of README:
python3 src/create_random_networks_for_netzcore.py data/test_interactions.txt 100
Unfortunately it breaks giving me the following error:
File "src/create_random_networks_for_netzcore.py", line 32
g_sampled = randomize_graph(graph=g, randomization_type="preserve_topology_and_node_degree")
^
TabError: inconsistent use of tabs and spaces in indentation
Could you help me to fix this error?? In addition, when I execute Guild with -s z, without -x value it works....
So could you tell me the importance of X parameter??
Thanks for your help!
Jordi
The text was updated successfully, but these errors were encountered: