-
Notifications
You must be signed in to change notification settings - Fork 20
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
Branch thickness / colour controlled by numerical property #496
Comments
A related issue is that we don't currently parse branch / node annotations from Nexus files (#461). Nexus is a basic implementation that just reads the tree. But if one wanted to implement something like this without dealing with that yet, branch metadata can be provided in TSV format, including for internal nodes so you could have
This should end up with that property attached to the node as "node.meta_PlacementScore" (probably as a string) Theoretically it shouldn't be too hard to adapt the layers to use that metadata item, by changing e.g. getColor in
d.meta_PlacementScore . Then we'd need to implement this into the config so that one could specify whether to use this or not.
|
The initial Nexus thing is hopefully resolved |
Hey @theosanderson @NicolaDM, I've been working on a draft of some changes that I think are related to this discussion, specifically for analyzing nodes with placement ambiguity. Wanted to share it to hear both of your feedback/suggestions. It's pretty specific to this use case and could maybe be generalized for other metadata field types before adding to taxonium? I added some logic specifically when a field called "uncertainty" is present in a metadata file. The uncertainty field is expected to be a list of other potential placements of nodes, with a probability attached to each. E.g., "A:0.4,B:0.1". When color by uncertainty is selected, I highlight the alternate nodes for the currently selected node and the branches connecting them. Right now this adds a circle around each of the nodes with radius changing based on probability, but I think there may be a better way to display the probabilities. Example (with "USA/CA/CZB-3702/..." selected). The probabilities are all equal in this case. This uses these test Newick and metadata files (note the metadata is very incomplete as adding the ambiguities increases the file size a lot): The PR on my fork is here with a live demo here Let me know what you think! |
Hi @amkram, sorry have been on holiday and didn't spot this until reading through emails in detail today. Looking now. |
Thanks for this. I think @NicolaDM will definitely be interested! I think it looks really cool. When Nicola asked about similar stuff I demurred on the basis of trying to avodi the need to maintain a relatively niche feature into the future. This changes things in that (A) I don't have to do the initial implementation (B) there are at least 2 users. I'm still not 100% sure about that. At the moment, I got quite a few crashes in the demo with this output:
If we implemented this do you think it would work best stored in Taxonium JSONLs with a structure like |
@amkram thank you so much, this looks really cool! I just finished making MAPLE output tree and metadata conforming to the required format, and it seems to work without problems. I think the idea of highlighting the path connecting the different possible placement nodes is really great! I was wondering if you think it would be possible/worth something like making the thickness and/or color shade of different parts of the highlighte path proportional to the support value. Nicola |
hello, chiming in here to say that I would also be interested to use Taxonium to display phylogenetic placements, as branch thicknesses or symbols attached to branches |
Requested by @NicolaDM
The text was updated successfully, but these errors were encountered: