Running a build¶
This tutorial uses the Nextstrain command-line interface (CLI) to help you get started running and viewing the pathogen builds you see on nextstrain.org. It assumes you are comfortable using the command line and installing software on your computer. If you need help when following this tutorial, please create a post at discussion.nextstrain.org.
When you’re done following this tutorial, you will have built a local version of our example Zika analysis and viewed the results on your computer. You’ll have a basic understanding of how to run builds for other pathogens and a foundation for understanding the Nextstrain ecosystem in more depth.
Table of Contents
Install Nextstrain including the Nextstrain CLI. These instructions will install all of the software you need to complete this tutorial and others.
If you’ve already installed Nextstrain, activate the Nextstrain environment.
conda activate nextstrain
We store our pathogen analyses in a version control repository, so we can easily track changes over time. Download the example Zika pathogen repository you’re going to build.
$ git clone https://github.com/nextstrain/zika-tutorial Cloning into 'zika-tutorial'... [...more output...]
When it’s done, you’ll have a new directory called
Nextstrain builds use the Augur bioinformatics toolkit to subsample data, align sequences, build a phylogeny, estimate phylogeographic patterns, and save the results in a format suitable for visualization with Auspice.
Run the build with the Nextstrain CLI.
$ nextstrain build --cpus 1 zika-tutorial/ Building DAG of jobs... [...a lot of output...]
This should take just a few minutes to complete. To save time, this tutorial build uses an example dataset which is much smaller than our live Zika analysis.
Output files will be in the directories
View the build results using Nextstrain’s visualizations.
$ nextstrain view zika-tutorial/auspice/ —————————————————————————————————————————————————————————————————————————————— The following datasets should be available in a moment: • http://127.0.0.1:4000/local/zika —————————————————————————————————————————————————————————————————————————————— [...more output...]
Open the link shown in your browser.
Learn more about the CLI by running
nextstrain <command> --help.
Explore the Nextstrain environment by running ad-hoc commands inside it using
nextstrain shell zika/.