davidrmiller / biosim4

Biological evolution simulator
Other
3.1k stars 435 forks source link

Igraph ncol error #49

Closed Desch86 closed 2 years ago

Desch86 commented 2 years ago

Hi, I have a very silly problem... I have managed to get everything to work, except plotting with graph-nnet.py and igraph. I think the problem is the format of my net.txt file but I can't understand it.

For example, I have this outpot from a simulation:

"Individual ID 1 a17735f8 f672f545 ad21e321 76291949 N0 MvW -24201 Osc MvW -2446 Blr MvY -21215 Bfd MvS 30249"

I create a net.txt using gedit with "a17735f8 f672f545 ad21e321 76291949" in it but when I run the python script I get this error message:

"Traceback (most recent call last): File "/home/usr/Desktop/Biosim4/tools/graph-nnet.py", line 7, in g = igraph.Graph.Read_Ncol('net.txt', names=True, weights=True) igraph._igraph.InternalError: Error at src/io/ncol.c:150: Parse error in NCOL file, line 1 (syntax error, unexpected ALNUM, expecting NEWLINE). -- Parse error"

What info from the output should I have in the net.txt file for it to work?

Thanks!

davidrmiller commented 2 years ago

Hi @Desch86 , I apologize that the process is not very clear or well documented. In your net.txt file, skip the hex and just put only this part:

N0 MvW -24201
Osc MvW -2446
Blr MvY -21215
Bfd MvS 30249
Desch86 commented 2 years ago

Oh wow, I can't believe I didn't try that... Now it works, thanks for the very quick reply and no need to apologize!