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

reverse_trans() for y-axis has odd side-effects #55

Closed
thackl opened this issue Feb 22, 2021 · 1 comment
Closed

reverse_trans() for y-axis has odd side-effects #55

thackl opened this issue Feb 22, 2021 · 1 comment
Labels
improvement Improve API/behavior/implementation of an existing feature

Comments

@thackl
Copy link
Owner

thackl commented Feb 22, 2021

Currently I use reverse_trans on the y-axis to get an intuitive order of genomes with the first at the top. This, however, has odd side-effects on y-based operations. For example, one need to use negative values to move thing upward, or use y-limits vom bigger to smaller to keep the reversed scale.

I think I do definitely want to keep the order of the bins with the first bin at the top, so just doing bin1: y=1, ... isn't an option. It might, however, work if I do an inverse mapping: bin_n: y=1, bin_n-1: y=2, bin_1: y=n. It's easy to change in the layout. Seems to mostly work. It does, however, break wrapping (which I would just have to reimplement for handed inverted coords).

This change, would, however, also introduce another inconsistency: currently pick(1) can be read as pick the first bin or the bin at y=1. If I do an inverted mapping, pick(1) should probably still reference the first bin, but it would then no longer match y...

@thackl thackl added the improvement Improve API/behavior/implementation of an existing feature label Feb 22, 2021
@thackl
Copy link
Owner Author

thackl commented Feb 22, 2021

This probably also would affect the alignment of genomes with a ggtree, i.e. pick_by_tree.

@thackl thackl closed this as completed in a32a2a5 Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improve API/behavior/implementation of an existing feature
Projects
None yet
Development

No branches or pull requests

1 participant