-
Notifications
You must be signed in to change notification settings - Fork 49
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
Add secondTreeOptions
for GroupSource
#1114
Comments
Ah, I see the core source depends on the hard-coded manifest.json to define |
Yeah. Elsewhere, @jameshadfield and I have previously discussed this too, though I can't remember where exactly. I think in GitHub issues/PRs; should dig. There are some options, and I think it's mostly a matter of prioritizing this feature. It's good to know that it was asked about! |
I think there's short answers and long answers. Short term we could use some heuristic to filter other datasets in that group down to a meaningful set (e.g. the options represent "other segments") and offer them as options. Or we could offer them all as potential second trees, and perhaps rejig the dropdown in auspice to allow typing to filter (like the "Filter Data" dropdown currently does). The longer answer is perhaps best summarised in this (internal) google doc which is talking about how to change the (main) dataset, but I think is also applicable to the second tree options. Concrete example where the current approach is limiting: in avian-flu/h5n1/ha/all-time the second tree options are the other 7 segments, but it's very useful to compare h5n1 vs h5nx, or perhaps all-time vs 2y, options which are only currently available by editing the URL. |
Context
A user of Nextstrain Groups asked in office hours if it there was a configuration to add the second tree drop-down in the sidebar of datasets.
For example, when viewing the core seasonal-flu/h3n2/ha/2y build, there is a "seasonal-flu/h3n2/na/2y" option available:
Based on Auspice docs, the
secondTreeOptions
should be returned by the/charon/getAvailable
endpoint. Thenextstrain.org/charon/getAvailable
endpoint does return thesecondTreeOptions
from the source. However, the GroupSource does not have asecondTreeOptions
method, so it will always return an empty array of the base Source class.From a high level, it seems feasible to add a
secondTreeOptions
method to theGroupSource
that parses the Group's available datasets and use generateSecondTreeOptions to return valid second tree options.The text was updated successfully, but these errors were encountered: