auspice
Version:
Web app for visualizing pathogen evolution
92 lines (85 loc) • 14.5 kB
HTML
<html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Installing auspice · Auspice</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<p>Auspice is written in Javascript and will require nodejs and npm (the node package manager) to install.</p>
"/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Installing auspice · Auspice"/><meta property="og:type" content="website"/><meta property="og:url" content="https://nextstrain.github.io/auspice/"/><meta property="og:description" content="<p>Auspice is written in Javascript and will require nodejs and npm (the node package manager) to install.</p>
"/><meta property="og:image" content="https://nextstrain.github.io/auspice/img/icon.svg"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://nextstrain.github.io/auspice/img/icon.svg"/><link rel="shortcut icon" href="/auspice/img/favicon.ico"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/solarized-dark.min.css"/><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><link rel="stylesheet" href="/auspice/css/main.css"/><script src="/auspice/js/codetabs.js"></script></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/auspice/"><img class="logo" src="/auspice/img/logo-light.svg" alt="Auspice"/><h2 class="headerTitleWithLogo">Auspice</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class="siteNavGroupActive"><a href="/auspice/overview" target="_self">Docs</a></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><i></i></div><h2><i>›</i><span>Introduction</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Introduction</h3><ul class=""><li class="navListItem"><a class="navItem" href="/auspice/overview">Overview</a></li><li class="navListItem navListItemActive"><a class="navItem" href="/auspice/installation">Installing auspice</a></li><li class="navListItem"><a class="navItem" href="/auspice/inputs">Input file formats</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Customisations</h3><ul class=""><li class="navListItem"><a class="navItem" href="/auspice/customisations/introduction">Extending Auspice</a></li><div class="navGroup subNavGroup"><h4 class="navGroupSubcategoryTitle">Customising the Client</h4><ul><li class="navListItem"><a class="navItem" href="/auspice/customisations/client/componentInterfaces">Injecting custom components</a></li><li class="navListItem"><a class="navItem" href="/auspice/customisations/client/sidebarTheme">Sidebar theming</a></li></ul></div><div class="navGroup subNavGroup"><h4 class="navGroupSubcategoryTitle">Customising the Server</h4><ul><li class="navListItem"><a class="navItem" href="/auspice/customisations/server/charonAPI">Auspice Server API</a></li><li class="navListItem"><a class="navItem" href="/auspice/customisations/server/serverless">Deploying auspice without a server</a></li></ul></div><li class="navListItem"><a class="navItem" href="/auspice/customisations/authentication">Authentication</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Tutorial</h3><ul class=""><li class="navListItem"><a class="navItem" href="/auspice/tutorial/overview">Auspice functionality</a></li></ul></div></div></section></div><script>
var coll = document.getElementsByClassName('collapsible');
var checkActiveCategory = true;
for (var i = 0; i < coll.length; i++) {
var links = coll[i].nextElementSibling.getElementsByTagName('*');
if (checkActiveCategory){
for (var j = 0; j < links.length; j++) {
if (links[j].classList.contains('navListItemActive')){
coll[i].nextElementSibling.classList.toggle('hide');
coll[i].childNodes[1].classList.toggle('rotate');
checkActiveCategory = false;
break;
}
}
}
coll[i].addEventListener('click', function() {
var arrow = this.childNodes[1];
arrow.classList.toggle('rotate');
var content = this.nextElementSibling;
content.classList.toggle('hide');
});
}
document.addEventListener('DOMContentLoaded', function() {
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
createToggler('#tocToggler', 'body', 'tocActive');
const headings = document.querySelector('.toc-headings');
headings && headings.addEventListener('click', function(event) {
if (event.target.tagName === 'A') {
document.body.classList.remove('tocActive');
}
}, false);
function createToggler(togglerSelector, targetSelector, className) {
var toggler = document.querySelector(togglerSelector);
var target = document.querySelector(targetSelector);
if (!toggler) {
return;
}
toggler.onclick = function(event) {
event.preventDefault();
target.classList.toggle(className);
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><h1 class="postHeaderTitle">Installing auspice</h1></header><article><div><span><p>Auspice is written in Javascript and will require nodejs and npm (the node package manager) to install.
If you are comfortable using <a href="https://conda.io/docs/">conda</a> these may be easily installed in your environment (<a href="https://anaconda.org/conda-forge/nodejs">see here</a>).
If you are on Linux or MacOS, you could also use nvm to insall these (<a href="https://nodesource.com/blog/installing-node-js-tutorial-using-nvm-on-mac-os-x-and-ubuntu/">see here</a>).</p>
<h2><a class="anchor" aria-hidden="true" id="global-npm-install"></a><a href="#global-npm-install" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Global NPM install</h2>
<p>Auspice is avaliable as a <a href="https://www.npmjs.com/package/auspice">npm package</a> and can be installed simply via:</p>
<pre><code class="hljs css language-bash">npm install --global auspice
</code></pre>
<p>Auspice is now available as a command-line program -- check by running <code>auspice -h</code>.
Documentation for how to run auspice locally is <a href="/auspice/overview#running-auspice-locally">available here</a>.</p>
<h2><a class="anchor" aria-hidden="true" id="installing-as-a-project-s-dependency"></a><a href="#installing-as-a-project-s-dependency" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Installing as a project's dependency</h2>
<p>If you are building a customised version of auspice, you may want to include it as a dependency of that project.
This allows you to pin the version, use continuous integration tooling and simplifies any code imports you may wish to use.</p>
<pre><code class="hljs css language-bash">npm install --save auspice
</code></pre>
<blockquote>
<p>Note that <code>auspice</code> is not available as a command line tool this way, but can be accessed from within the repo via <code>npx auspice</code>.
See <a href="/auspice/customisations/introduction">customising auspice</a> for more information.</p>
</blockquote>
<h2><a class="anchor" aria-hidden="true" id="installing-from-source"></a><a href="#installing-from-source" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Installing from source</h2>
<pre><code class="hljs css language-bash">git <span class="hljs-built_in">clone</span> git@github.com:nextstrain/auspice.git
<span class="hljs-built_in">cd</span> auspice
npm install <span class="hljs-comment"># install dependencies</span>
npm install -g . <span class="hljs-comment"># make "auspice" available globally</span>
</code></pre>
<p>Note that (at least on MacOS) this symlinks the source directory into the global <code>node_modules</code> folder so that changes to source code are automatically reflected in the globally available <code>auspice</code> command.
We have had good success using a conda environment for development.</p>
<h2><a class="anchor" aria-hidden="true" id="developing"></a><a href="#developing" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Developing</h2>
<p>Install auspice from source (see above).
Running auspice in development mode will automatically update as you change the source code:</p>
<pre><code class="hljs css language-bash">auspice develop --verbose
</code></pre>
<p>(See <code>auspice develop -h</code> for further options)</p>
<h2><a class="anchor" aria-hidden="true" id="building-auspice"></a><a href="#building-auspice" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Building auspice</h2>
<p>Install auspice from source (see above).</p>
<pre><code class="hljs css language-bash">auspice build --verbose
</code></pre>
<p>(See <code>auspice build -h</code> for further options)</p>
<h2><a class="anchor" aria-hidden="true" id="running-auspice"></a><a href="#running-auspice" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Running auspice</h2>
<p>See <a href="/auspice/overview#running-auspice-locally">running locally documentation</a>.</p>
</span></div></article></div><div class="docLastUpdate"><em>Last updated on 1/15/2019</em></div><div class="docs-prevnext"><a class="docs-prev button" href="/auspice/overview"><span class="arrow-prev">← </span><span>Overview</span></a><a class="docs-next button" href="/auspice/inputs"><span>Input file formats</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#global-npm-install">Global NPM install</a></li><li><a href="#installing-as-a-project-s-dependency">Installing as a project's dependency</a></li><li><a href="#installing-from-source">Installing from source</a></li><li><a href="#developing">Developing</a></li><li><a href="#building-auspice">Building auspice</a></li><li><a href="#running-auspice">Running auspice</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><div><img src="/auspice/img/logo-light.svg" alt="Auspice" width="66" height="58"/></div><div><h5>Docs</h5><a href="/auspice/">Splash Page</a><a href="/auspice/overview">Overview</a></div><div><h5>Links</h5><a href="https://github.com/nextstrain/auspice">GitHub</a><a href="https://www.npmjs.com/package/auspice">NPM</a><a href="https://nextstrain.org">Nextstrain</a></div><div><h5>Contact</h5><a href="mailto:hello@nextstrain.org">email</a><a href="https://twitter.com/hamesjadfield">twitter</a></div></section><section class="copyright">If you use auspice, please cite <a href="https://doi.org/10.1093/bioinformatics/bty407">Hadfield et al., 2018</a></section><section class="copyright">Copyright © 2014-2019 Richard Neher & Trevor Bedford</section></footer></div></body></html>