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

Support rectangular (and arbitrarily configurable) layouts; minor typo fixes / detail additions in CLI #145

Merged
merged 90 commits into from
Apr 6, 2020

Conversation

fedarko
Copy link
Collaborator

@fedarko fedarko commented Mar 28, 2020

Screenshot on the tree (((a:1,e:2)f:1,b:2)g:1,(c:1,d:3)h:2)i:100;, where I configured things so that all tips belong to the same sample category:

image

There are a lot of changes in this PR (some of them are a lot simpler than they seem -- e.g. a bunch of JS files got slightly changed because the version of prettier Travis was using changed, and I had to rerun it on the JS files to get the builds to pass), so it might be easiest for us to walk through the PR together next week.

Thanks!

fedarko and others added 30 commits February 7, 2020 19:52
Also removed some unused code (the PARAMETERS stuff)
python side of things is mostly worked out, just need to adjust
igraph creation to use ints instead of node names then fix scaling
stuff and we should at least have the positions set out. from there
it's a matter of modifying js + tweaking things to work well
This was a problem due to trees with duplicate node names (apparently
the rooted tree you get from the Q2 moving pictures tutorial has a
bunch of duplicated names).

Adjusted tests accordingly -- also now the to_igraph() test is a lot
more elegant (much less hardcoded data), which is great.
Inspired by what TopiaryExplorer and iTOL do. Much simpler, though.
shouldn't actually make a difference in output visualization, since
everything is scaled by the tree height anyway
This has the added bonus of making the code cleaner, etc.

This makes the "igbug" and "tiny" test trees demonstrably work
as expected -- i'll try to convert those into actual tests soon
also use leafcount rather than calling .count(tips=True)
(Need to actually transmit multiple layouts' data to the JS, then
make the JS do something when you change the radio buttons...)
All that's left to get rectangular layouts done is just adding the
vertical bars when drawing the tree with that layout.

(... Also, adding tests and documentation. That will be important.)
preserves stuff like sample colors
NOTHING else in the Empress Python or JS code makes any assumptions
about the layout algorithms. this should make adding / removing
layouts pretty painless
to demonstrate the ease with which you can add new layouts to
Empress now :D
Still needs testing, double-checking, etc. but this is great

also this now centers nodes over children rather than tips
@fedarko
Copy link
Collaborator Author

fedarko commented Mar 30, 2020

OK, I think the requested changes so far should be mostly addressed. Please let me know if there's anything else you'd like me to change! Thanks guys!

@kwcantrell
Copy link
Collaborator

This looks good! I added a few comments but nothing major.

@ElDeveloper
Copy link
Member

@kwcantrell, if all looks good to you feel free to merge when your comments are addressed.

Co-Authored-By: Yoshiki Vázquez Baeza <[email protected]>
@fedarko
Copy link
Collaborator Author

fedarko commented Apr 3, 2020

I think I've addressed all of the comments by this point, but please either of you let me know if you'd like me to make any more changes :)

@ElDeveloper
Copy link
Member

@kwcantrell if all looks good to you feel free to merge this.

@kwcantrell
Copy link
Collaborator

Great work everyone!

@kwcantrell kwcantrell merged commit cb25912 into biocore:master Apr 6, 2020
@ElDeveloper
Copy link
Member

Thanks both!

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

Successfully merging this pull request may close these issues.

3 participants