-
Notifications
You must be signed in to change notification settings - Fork 31
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
Root lengths in the unrooted layout? #374
Comments
The edge associated with a node in the BP or |
Cool, thanks. It sounds like just setting the root length to |
* ENH: Show node lengths in selection menu #179 Also computes min/max/avg node lengths; gotta show that somewhere... * DOC: note abt root len * STY: prettify * ENH: show tree stats! Closes #179. * STY: prettify * DOC: clarify & upd8 bptree stat code * TST: unbreak tests * ENH: hide the root node's "length" in the menu since it's not even validated * DOC: buff disclaimer * DOC: separate stats disclaimers splits up ugly paragraph, and allows us to selectively hide part of it if tree-plot done * DOC: simplify tree stats header txt * BUG: Ignore root len in unrooted layout: fix #374 * TST: hide stats table in test html * TST/BUG/MNT: Make getLengthStats own func&fix/test (Found a bug where the min was getting set to 0 even if real min was > 0; due to setting min to 0 by default. Now it's +inf and max starts as -inf, so we should be solid * STY/TST: test error len stats case; prettify * TST: test Empress.getNodeLength * TST/MNT: mv code to spanel;refact/tst getTreeStats * DOC: clarify ambiguous language in ignore len secn * MNT: rename a few things from tree props->settings * MNT: rm extraneous unrooted layout op * ENH: round node length stats to 4 decimal pts addresses @ElDeveloper comment * PERF: only compute tree stats when requested addresses @ElDeveloper comment * PERF: only compute tree stats once * STY: tidy some old html
Following up on a point raised in #363.
There is some code in the unrooted layout that accesses the length of the root node:
empress/empress/support_files/js/layouts-util.js
Lines 470 to 478 in 5d19f0d
As far as I can tell, the root node's length is actually used in the layout: if you replace
tree.length(n)
with1000
on this line for the moving pictures dataset, the unrooted layout looks like:We currently do not do any sort of validation (in
validate_tree()
) that the root node's length is valid (e.g. the length is specified and is a nonnegative number). Even in the moving pictures dataset, the root length is unspecified, so it looks like it defaults to 0:I think it would be best to just ignore the root branch length in the unrooted layout (and maybe just set it to 0 or something), but I am not sure what you all think.
One of the reasons for bringing this up is that as of last week Empress' UI says the following:
...so we should try to be precise about when / if the root length is used :)
The text was updated successfully, but these errors were encountered: