I wanted to check the topology of my model using legotree.py, but the tool doesn't seem to work.
If I try to run it using the command from the manual, I get this:
$ python legofit-git/src/legotree.py --lgo m6.lgo
Only 1 input file is allowed
Usage: legotree.py [options] <input_file>
where options may include:
--log graph time on log scale
--nomixtimes don't print admixture times
--allmix draw arrows even if admixture is zero
--textsize <x> set text size to integer <x> points (def: 12)
--gentime <x> print time in years assuming <x> y/generation
--width <x> set width of tree branches (def: 27)
--nolegend suppress legend
--outfile <xxx.png> specify name of output file (def: screen)
-h or --help print this message
Note the first line saying Only 1 input file is allowed.
So since the help message actually doesn't mention the --lgo flag, I tried to run it without it, but it also failed:
$ python legofit-git/src/legotree.py m6.lgo
Traceback (most recent call last):
File "/home/jena/Dropbox/Science/human/legofit/scripts/legofit-git/src/legotree.py", line 305, in <module>
tree = lego_tree("tree",open(infile).readlines())
File "/home/jena/Dropbox/Science/human/legofit/scripts/legofit-git/src/legotree.py", line 159, in __init__
i.parents = [self.pieces[np.where(self.segs == j)[0][0]] for j in i.parents]
File "/home/jena/Dropbox/Science/human/legofit/scripts/legofit-git/src/legotree.py", line 159, in <listcomp>
i.parents = [self.pieces[np.where(self.segs == j)[0][0]] for j in i.parents]
IndexError: index 0 is out of bounds for axis 0 with size 0
One last note: The docs mention that the script only requires matplotlib and numpy, but I had to also install shapely and descartes. I think the docs should be updated to reflect this.
I wanted to check the topology of my model using
legotree.py
, but the tool doesn't seem to work.If I try to run it using the command from the manual, I get this:
Note the first line saying
Only 1 input file is allowed
.So since the help message actually doesn't mention the
--lgo
flag, I tried to run it without it, but it also failed:One last note: The docs mention that the script only requires
matplotlib
andnumpy
, but I had to also installshapely
anddescartes
. I think the docs should be updated to reflect this.