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

1770 support value fixes #1772

Merged
merged 20 commits into from
Aug 6, 2021
Merged

1770 support value fixes #1772

merged 20 commits into from
Aug 6, 2021

Conversation

matthewlawrenceklein
Copy link
Contributor

this PR addresses fixes/feature noted in issue #1770

fixes

  • support value symbols now render in the correct place when tree == phylogram (previously, they had shifted to the next node to the right)
  • for legibility, support value text is shifted 90deg when tree = phylogram
  • Display value range is now set with min/max val of 0.0 and 1.0, respectively

features

  • a new UI element, 'floating point precision' is available for users to set, with the corresponding value being implemented upon render
  • this value is hooked into the interactive interface state

@meren
Copy link
Member

meren commented Jul 22, 2021

Just git pulled, even though now symbols appear at the right place, I don't see any text :/

Display value range shows 0 to 100.

image

But when I change it to 80 to 100, all symbols disappear. They come back when I change the values to 0.8 and 1.0, but when I read the mouse panel, they are indeed 80, 90, 100, etc.

Perhaps "Floating Precision" should be under Text?

These are my settings and I'm visualizing example-newick-tree.txt under tests/sandbox:

image

When I click invert, this is what I see:

image

In either of the displays symbols do not seem to be properly scaled to max symbol size. I think we need a min symbol size parameter, too, to make this right. And when we have it, if the user says visualize branch support values between 0.8 and 1.0, 0.8 should be min symbol size, 1.0 should be max symbol size, and the symbol sizes of anything in between is scaled. Inverting it should only change the way they are shown (0.8 max, 1.0 min, and anything between is scaled).

We also need an input box for "Rotate" under text, which takes a value between 0 and 360 (deg) and the default is 90 for phylogram view.

Thank you :)

@matthewlawrenceklein
Copy link
Contributor Author

@meren - I think I may be misunderstanding bootstrap values - currently on render we're iterating each node p and displaying its associated p.branch_support . This is a number (in string form) between 0-100, which is why the initial Display Value Range was set to 0-100. I can see in the newick file itself that support values have 10 decimal places - are these values getting converted/rounded/truncated somewhere before getting passed to the frontend?

@meren
Copy link
Member

meren commented Jul 24, 2021

I think I may be misunderstanding bootstrap values - currently on render we're iterating each node p and displaying its associated p.branch_support

This could be the case for all of us :) somehow the interface must make sure it uses the right ranges / values for each tree individually. Whether those values are 0.0 to 1.0 or 1 to 100.

I can see in the newick file itself that support values have 10 decimal places - are these values getting converted/rounded/truncated somewhere before getting passed to the frontend?

It is likely the doing of the library we use to read newick files (ETE). Another library may cut them at the second digit, or leave them as is. Being flexible and wise (by anticipating future alternatives) is the best option, I think.

I am not sure if this helps, but I hope it does :)

@matthewlawrenceklein
Copy link
Contributor Author

matthewlawrenceklein commented Aug 6, 2021

@meren I think we're good to go here :) in summary -

  • by default, support values are displayed as whole numbers between the range of 0-100
  • support symbol relative sizing is based on percentile within any given selected display range, broken into thirds (low, med, high)
    • invert symbol flips the above logic
  • by default, support value text for phylograms is rotated -90 for legibility
  • A new parameter, text rotation, takes an input in range from -359 to 359, and will render text rotated accordingly
    • this parameter has been added to state

anyone can test!

git checkout 1770_support_value_fixes
from the root anvio directory, run
anvi-interactive -t anvio/tests/sandbox/example-newick-tree.txt --manual

@meren
Copy link
Member

meren commented Aug 6, 2021

Many things improved, but there is a selection issue due to symbols. Probably they need to be behind the tree?

selection

This is a minor thing, but it prevents from being able to read the support values of branches behind symbols.

But when you make a selection this is how it looks:

image

The selection pane should be behind the tree and symbols. I guess the best order from top to bottom is this: tree, symbols, selection pane.

@meren meren merged commit 90bdfe8 into master Aug 6, 2021
@matthewlawrenceklein matthewlawrenceklein deleted the 1770_support_value_fixes branch August 9, 2021 14:19
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.

2 participants