nextstrain / auspice

Web app for visualizing pathogen evolution
https://docs.nextstrain.org/projects/auspice/
GNU Affero General Public License v3.0
290 stars 159 forks source link

Add external links #1763

Closed jameshadfield closed 2 months ago

jameshadfield commented 2 months ago

Adds Taxonium & MicrobeTrace link-outs to Auspice. Each of those sites allows accessing Nextstrain datasets by using a GET call to the path provided to them with with an {accept: "application/json"} header. As such some datasets don't work (if we don't support that route), and private datasets don't work for obvious reasons. But most datasets do work for Taxonium, which is cool! MicrobeTrace seems to only load with trees of 500 tips or less and a warning is added if you have more than this, but this functionality closes https://github.com/nextstrain/private/issues/106.

See commit messages for implementation details.

@theosanderson you may be interested in the taxonium link-out, especially the query params I'm using which I've mainly figured out by playing around in Taxonium. And are you OK with us including this on nextstrain.org?!

Testing Taxonium

is a little hard because the site running Auspice must support the appropriate GET request and build Auspice with customisations enabling this functionality. The review app from https://github.com/nextstrain/nextstrain.org/pull/816 works nicely. E.g.

Testing MicrobeTrace

is even harder because (I'm guessing) the url query is checked and so only "nextstrain.org" or "next.nextstrain.org" will work, despite the review app site supporting the relevant GET route. Not a big problem if it doesn't work on review apps tho. To test you can do the following (and kind of trust me that it'll work like this when we've merged the PRs):

E.g. for MicrobeTrace:


theosanderson commented 2 months ago

Just so say this is super cool! Thanks for taking the time to make sense of Taxonium's query parameters. These bidirectional integrations are really great. There's definitely a lot I can improve on the Taxonium side, e.g. with surfacing 404s as seen here - and my parsing of your JSONs could still be more complete! - I hope to make more progress there. This is a great motivation!

ikb6 commented 2 months ago

@jameshadfield , I am on the MicrobeTrace team at the CDC. Sorry, but herokuapp gave me an error when I tried clicking on the measles genome to test the option to view on MicrobeTrace. It says there was no content there. Could you see what the issue is? Thanks!

jameshadfield commented 2 months ago

Sorry, but herokuapp gave me an error when I tried clicking on the measles genome to test the option to view on MicrobeTrace. It says there was no content there. Could you see what the issue is? Thanks!

The heroku review app no longer exists since this PR has been merged. The code will be included in the next Auspice release (possibly today) and then it should appear on nextstrain.org some time after that. (Note that the functionality in this PR is only enabled for Auspice running on nextstrain.org, as both Taxonum & Microbetrace get the JSON data via {GET + accept: application/json} requests, and these API routes are not part of Auspice.)

ikb6 commented 2 months ago

Sorry, but herokuapp gave me an error when I tried clicking on the measles genome to test the option to view on MicrobeTrace. It says there was no content there. Could you see what the issue is? Thanks!

The heroku review app no longer exists since this PR has been merged. The code will be included in the next Auspice release (possibly today) and then it should appear on nextstrain.org some time after that. (Note that the functionality in this PR is only enabled for Auspice running on nextstrain.org, as both Taxonum & Microbetrace get the JSON data via {GET + accept: application/json} requests, and these API routes are not part of Auspice.)

@jameshadfield , we are eager to try/test this feature. No rush, but just wanted to make sure I am not missing something. nextstrain.org is still showing the Feb version of Auspice. I presume we just wait for the new release? Thanks!

jameshadfield commented 2 months ago

@ikb6 this has been released as part of Auspice 2.53.0 and this should propagate through to the nextstrain.org server in the coming 24 hours