schlegelp / tanglegram

Plot tanglegrams from two dendrograms
GNU General Public License v3.0
19 stars 4 forks source link

NameError: name 'invert' is not defined #11

Closed bjtully closed 2 years ago

bjtully commented 2 years ago

Hi!

I recently updated tanglegram to utilize the changes in code made available through the 'master' install - I am particularly increased in the options for untangling the output figures. I ran into this issue:

When running tg.plot(..., sort=False) there are no issues, but using any argument that tries to sort the results (i.e., sort = True, sort = 'step1side', etc.) results in the error: NameError: name 'invert' is not defined

Tracking to the line of offending code (Ln 753), all of the sort functions go through the function leaf_order(), where 'invert' is undefined. Have you run into that issue and any suggestions on satisfying it?

Thanks!

schlegelp commented 2 years ago

Hi. Sorry, apparently I forgot to push a local change. Should be fixed with 983851d39a12d2ee278c09d64a16a3c5443e82b9. Please re-install and try again.

bjtully commented 2 years ago

That worked! Thanks for the update! Small additional note: Your install from master works great with dependencies, but currently doesn't include tqdm - might want to add it as a second line for the master install instructions.

Cheers!