I am trying to customize the layout of Auspice to have a university logo and color scheme but I am having some issues to have it show.
I am using the reference on Auspice customization and the example listed there as a basis and added the languageselector.js
and navbar.js
I ran auspice build --extend <JSON>
with the modified JSON and it ran without errors, but when I visualize the data through nextstrain view /home/evtlabuser/nextstrain/COVID/auspice/ --allow-remote-access --port 4000
it still shows the Auspice logo and color scheme.
I feel I am missing something, but I can’t figure out what I am doing wrong.
Hi Maarten. I think the issue here is around the difference between auspice
and nextstrain
(also known as the “nextstrain CLI”). The latter typically uses a docker container which comes configured with various tools, including auspice, so customizing your own local version of auspice probably isn’t having any effect on the version of auspice nextstrain
is using.
Try running auspice view --datasetDir /home/evtlabuser/nextstrain/COVID/auspice/
from the same directory you previously ran the auspice build ...
command from (see docs for more). If this works but you require the --allow-remote-access
functionality of the CLI, then you should be able to add --native
(see docs here) to have the CLI access your local environment, and therefore use your local customized auspice.
Good luck and let us know how you get on!
Hi James,
Thanks for the help. You were correct about the build not being in the same location as my customisations.
As a reference to others. I am using the native environment and when I ran nextstrain view
it said Serving built javascript from "/home/evtlabuser/miniconda3/envs/nextstrain/lib/node_modules/auspice"
To get the customisation working:
- I changed my location to this folder
- Put my customizations in a subfolder
customisations
- Ran
auspice build --extend ./customisations/config.json --verbose
Now when I run nextstrain view /home/evtlabuser/nextstrain/COVID/auspice/ --allow-remote-access --port 4000
it uses the customized Auspice version.
I was using the example that was linked from the documentation but didn’t have the react
and ISO-681-1' packages installed so I had to run
npm install reactand
$ npm install iso-639-1` to get the language selector to work