-
Notifications
You must be signed in to change notification settings - Fork 78
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
Pre-color nodes/branches possibilities #254
Comments
Dear @smoretti, Should definitely be possible. Can you paste in an example tree? Best, |
Here is an example file |
Dear @smoretti, Thanks! I will write a simple example for you on how to extract NHX style annotations in a bit. Which version of Best, |
I did some tests with the version available at |
Dear @smoretti, Take a look at https://github.com/veg/phylotree.js/tree/master/examples/nhx Best, |
Thanks it looks already nice and promising. Note also that I was not able to run locally your NHX example. |
I did not manage to run it as a local web server.
So I linked the phylotree.js file from http://phylotree.hyphy.org/phylotree.js to make it worked locally for the nhx/index.html file. Anyways we would prefer to include it in our existing web server, without an extra web server. Also our web site already loads bootstrap-4.5.2, jquery and fontawesome-5.14.0-all. Are they compatible with phylotree.js ? |
Dear @smoretti, You don't need to run a separate web-server; you can just include a What are you currently using for your web app stack? Best, |
Dear @smoretti, Thanks for your interest in phylotree. In case it's still of interest, Phylotree is available as an npm package. As such, its source can be found on unpkg; you may download JavaScript and CSS from these URLs, or use them as a CDN as you see fit. Or, if you are using an asset bundler like webpack, it is possible to import/require the necessary JavaScript and CSS as alluded to above. Version 0.x is slated for deprecation and relies on outdated versions of bootstrap and d3. Version 1.x-alpha supports Bootstrap 4, so I recommend using that. It is still in alpha/pre-release, but several examples have already been ported over. I will work on porting the above example to work on our 1.0.0-alpha branch. Please let me know you have any further questions, I am happy to help. Best, |
Thanks @spond. Currently we don't use any web app stack, we have our own deployment script. As phylotree.js and phylotree.css files are available on unpkg everything is fine for us. |
I have updated the link for jQuery and bootstrap to reach our local versions and examples/nhx/ from the master branch works with http://phylotree.hyphy.org/phylotree.js. When I switch to https://unpkg.com/[email protected]/dist/phylotree.min.js it does not work anymore.
|
Dear @smoretti, What version of Best, |
This is d3.v3.min.js |
Dear @smoretti, Version 1.0 α of You can also continue using Best, |
I tried with d3 v5 and v6 but got the same error:
|
Dear @smoretti, Sorry for the delay. I've tweaked our parser to automatically parse attributes from this format and add them to each node's While this has not been released to NPM/unpkg yet, the bundle can be sourced from here: The associated pull request is under review, and we should have a release soon. I do not anticipate that additional requests will require tweaks to the core library (but you never know). Please let me know if you need anything else, I am happy to continue working on this until we arrive at the desired use case. Best, |
Hi @stephenshank Maybe I found an issue: When you click on a node and select "All descendant branches" for example.
Don't know if this is important or not. Also I did some trials with various d3, jquery and bootstrap versions:
All the other css or js sources are the same than yours. I did those tests on Firefox 78.6 |
Hi
I wonder if this is possible to pre-color some nodes/branches at load time.
I use the NHX format for this, and to store other kind of information, but NHX tags look to be ignored by phylotree.js
The text was updated successfully, but these errors were encountered: