Skip to content
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

update #8

Merged
merged 12 commits into from
Jun 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
node-version: ${{ matrix.node }}
- run: npm ci
- run: npm run get-data
- run: npm run get-narratives
- run: npm run smoke-test:ci
lint:
runs-on: ubuntu-latest
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ big_flu
/static/
s3/
/local_narratives/
/narratives/
/datasets/
**/__diff_output__

Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@
title: Changelog
---

## version 2.17.0 - 2020/06/19


* You can now toggle whether the data in the frequencies panel is normalized.
See [PR 1158](https://github.com/nextstrain/auspice/pull/1158).
* You can now set the starting state of the transmissions-line toggle via the JSON or a URL query.
See [PR 1152](https://github.com/nextstrain/auspice/pull/1152) and [PR 1165](https://github.com/nextstrain/auspice/pull/1129).
* Improve the caching settings for the auspice server.
See [PR 1146](https://github.com/nextstrain/auspice/pull/1146).
* The performance of Auspice is improved when transmission lines are not rendered.
See [PR 1153](https://github.com/nextstrain/auspice/pull/1153).
* The "narratives" folder is now part of this repo and contains a number of test narratives.
See [PR 1170](https://github.com/nextstrain/auspice/pull/1170) for more details.
* A bug was fixed where narrative slides would sometimes fail to update the tree as expected.
See [PR 1169](https://github.com/nextstrain/auspice/pull/1169).
* A bug was fixed where loading a tree zoomed to a clade would prevent zooming out.
See [PR 1156](https://github.com/nextstrain/auspice/pull/1156).
* A bug was fixed where numeric branch labels couldn't be used as URL queries.
See [PR 1157](https://github.com/nextstrain/auspice/pull/1157).
* The list of allowed nodejs versions was expanded.
See [PR 1166](https://github.com/nextstrain/auspice/pull/1166).

## version 2.16.0 - 2020/05/29

#### Features
Expand Down
4 changes: 2 additions & 2 deletions DEV_DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Run `npm run lint`. If there are issues run `npm run lint:fix`.

> For integration tests to work, you'll need to have `git-lfs` installed (see below) as it stores the images that the snapshot tests will use.

1. Fetch the datasets with `npm run get-data` and `npm run get-narratives`.
1. Fetch the datasets with `npm run get-data`.
2. Ensure you are **not** currently running the site locally, then run `npm run integration-test:ci`.


Expand All @@ -60,7 +60,7 @@ Run `npm run lint`. If there are issues run `npm run lint:fix`.

#### For smoke tests

1. Fetch the datasets with `npm run get-data` and `npm run get-narratives`.
1. Fetch the datasets with `npm run get-data`.
2. Ensure you are **not** currently running the site locally, then run `npm run smoke-test:ci`.


Expand Down
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,16 @@ The following are helpful when beginning to use Auspice:
### Installation

Install auspice for use as a global command.
This requires nodejs 10+. We recommend using a conda environment, but this is not the only way.
This requires nodejs.
We recommend using a conda environment, but this is not the only way.
(See [here](https://nextstrain.github.io/auspice/introduction/install) for more installation methods & help).

#### Install with conda (Recommended)

Create and activate a [conda](https://docs.conda.io) environment:

```bash
conda create --name auspice nodejs=10
conda create --name auspice nodejs=12
conda activate auspice
```

Expand Down Expand Up @@ -77,9 +78,16 @@ If you've installed auspice from source, we have helper scripts to make all the
```bash
# from the auspice src directory
npm run get-data
npm run get-narratives
```

### Obtain narratives to view locally

This repository contains a number of "test narratives" which serve both to provide examples of the capability of narratives, as well as being used to test functionality and fix bugs.
These should work out of the box, assuming you have obtained the necessary datasets via the above script.

If you wish to view the [nextstrain-maintained narratives](https://nextstrain.org/docs/contributing/sharing-data), then this can be done by checking out the [nextstrain/narratives github repo](github.com/nextstrain/narratives) and telling `auspice` to look for narratives there via the `--narrativeDir` argument.


### Run auspice

```bash
Expand Down
8 changes: 4 additions & 4 deletions docs-src/docs/introduction/how-to-run.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ For narratives, please see [Writing a Narrative](narratives/how-to-write.md) for

## Obtaining a Set of Input Files

If you'd like to download the datasets and narratives on [nextstrain.org](https://nextstrain.org) then there are two scripts which allow you to do this:
If you'd like to download the dataset JSONs which are behind the core-datasets shown on [nextstrain.org](https://nextstrain.org), then you can run [this script](https://github.com/nextstrain/auspice/blob/master/scripts/get-data.sh) which will create a `./data` directory for you.

* You can download the dataset JSONs by running [this script](https://github.com/nextstrain/auspice/blob/master/scripts/get-data.sh) which will create a `./data` directory for you.
* You can download the narrative Markdown files by running [this script](https://github.com/nextstrain/auspice/blob/master/scripts/get-narratives.sh) which will create a `./narratives` directory for you.
The nextstrain-maintained narratives are stored in the [nextstrain/narratives github repo](github.com/nextstrain/narratives).
You can obtain these by cloning that repo.

You can then run `auspice view --datasetDir data --narrativeDir narratives` to visualise all of the [nextstrain.org](https://nextstrain.org) datasets locally.
You can then run `auspice view --datasetDir data --narrativeDir <path-to-narratives>` to visualise all of the [nextstrain.org](https://nextstrain.org) datasets locally.
7 changes: 3 additions & 4 deletions docs-src/docs/introduction/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Install Auspice

## Prerequisites
Auspice is a JavaScript program, and requires [Node.js](https://nodejs.org/) to be installed on your system.
For best results, please use Node.js version 10.
We've had success running a range of different node versions between 10.8 and 13.

We highly recommend using [Conda](https://conda.io/docs/) to manage environments, i.e. use Conda to create an environment with Node.js installed where you can use Auspice.
It's possible to use other methods, but this documentation presupposes that you have Conda installed.
Expand All @@ -16,7 +16,7 @@ You can also use the Windows Subsystem Linux for a fuller Linux environment.

## Create a Conda Environment
```bash
conda create --name auspice nodejs=10
conda create --name auspice nodejs=12
conda activate auspice
```

Expand Down Expand Up @@ -62,9 +62,8 @@ auspice build
auspice --version
auspice --help

# Obtain datasets & narratives to view locally (optional)
# Obtain nextstrain.org datasets to view locally (optional)
npm run get-data
npm run get-narratives
```

Updating Auspice should only require pulling the new version from GitHub -- it shouldn't require any `npm` commands.
Expand Down
2 changes: 1 addition & 1 deletion docs-src/docs/narratives/create-pdf.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ If you've followed the [auspice install instructions](../introduction/install) a
If not, you can create the necessary conda environment via:

```bash
conda create --name auspice nodejs=10
conda create --name auspice nodejs=12
```

Install Decktape via:
Expand Down
3 changes: 2 additions & 1 deletion docs/advanced-functionality/view-settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ <h2><a class="anchor" aria-hidden="true" id="dataset-json-configurable-defaults"
<tr><td><code>layout</code></td><td>Tree layout</td><td>&quot;rect&quot;, &quot;radial&quot;, &quot;clock&quot; or &quot;unrooted</td></tr>
<tr><td><code>branch_label</code></td><td>Which set of branch labels are to be displayed</td><td>&quot;aa&quot;, &quot;lineage&quot;</td></tr>
<tr><td><code>panels</code></td><td>List of panels which (if available) are to be displayed</td><td>[&quot;tree&quot;, &quot;map&quot;]</td></tr>
<tr><td><code>transmission_lines</code></td><td>Should transmission lines (if available) be rendered on the map?</td><td>Boolean</td></tr>
</tbody>
</table>
<p>Note that <code>meta.display_defaults.panels</code> (optional) differs from <code>meta.panels</code> (required), where the latter lists the possible panels that auspice may display for the dataset.
Expand Down Expand Up @@ -131,4 +132,4 @@ <h2><a class="anchor" aria-hidden="true" id="url-query-options"></a><a href="#ur
</table>
<p><strong>See this in action:</strong></p>
<p>For instance, go to <a href="https://nextstrain.org/flu/seasonal/h3n2/ha/2y?c=num_date&amp;d=tree,map&amp;m=div&amp;p=grid&amp;r=region">nextstrain.org/flu/seasonal/h3n2/ha/2y?c=num_date&amp;d=tree,map&amp;m=div&amp;r=region</a> and you'll see how we've changed the coloring to a temporal scale (<code>c=num_date</code>), we're only showing the tree &amp; map panels (<code>d=tree,map</code>), the tree x-axis is divergence (<code>m=div</code>) and the map resolution is region (<code>r=region</code>).</p>
</span></div></article></div><div class="docLastUpdate"><em>Last updated on 15/04/2020</em></div><div class="docs-prevnext"><a class="docs-prev button" href="/auspice/advanced-functionality/second-trees"><span class="arrow-prev">← </span><span>Displaying multiple trees</span></a><a class="docs-next button" href="/auspice/advanced-functionality/drag-drop-csv-tsv"><span>Adding extra metadata via CSV/TSV</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#auspice-hardcoded-defaults">Auspice (hardcoded) defaults</a></li><li><a href="#dataset-json-configurable-defaults">Dataset (JSON) configurable defaults</a></li><li><a href="#url-query-options">URL query options</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><div><a href="/auspice/"><img style="padding-left:20px" src="/auspice/img/logo-light.svg" alt="Auspice" width="66" height="58"/></a></div><div><h5>External Links</h5><a href="https://github.com/nextstrain/auspice">GitHub repo</a><a href="https://www.npmjs.com/package/auspice">NPM package</a><a href="https://nextstrain.org">Nextstrain</a></div><div><h5>Contact Us</h5><a href="mailto:hello@nextstrain.org">email</a><a href="https://twitter.com/hamesjadfield">twitter</a></div></section><section class="copyright">Website built by <a href="https://twitter.com/hamesjadfield">James Hadfield</a> using <a href="https://docusaurus.io">Docusaurus</a></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-2020 Richard Neher &amp; Trevor Bedford</section></footer></div></body></html>
</span></div></article></div><div class="docLastUpdate"><em>Last updated on 03/06/2020</em></div><div class="docs-prevnext"><a class="docs-prev button" href="/auspice/advanced-functionality/second-trees"><span class="arrow-prev">← </span><span>Displaying multiple trees</span></a><a class="docs-next button" href="/auspice/advanced-functionality/drag-drop-csv-tsv"><span>Adding extra metadata via CSV/TSV</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#auspice-hardcoded-defaults">Auspice (hardcoded) defaults</a></li><li><a href="#dataset-json-configurable-defaults">Dataset (JSON) configurable defaults</a></li><li><a href="#url-query-options">URL query options</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><div><a href="/auspice/"><img style="padding-left:20px" src="/auspice/img/logo-light.svg" alt="Auspice" width="66" height="58"/></a></div><div><h5>External Links</h5><a href="https://github.com/nextstrain/auspice">GitHub repo</a><a href="https://www.npmjs.com/package/auspice">NPM package</a><a href="https://nextstrain.org">Nextstrain</a></div><div><h5>Contact Us</h5><a href="mailto:hello@nextstrain.org">email</a><a href="https://twitter.com/hamesjadfield">twitter</a></div></section><section class="copyright">Website built by <a href="https://twitter.com/hamesjadfield">James Hadfield</a> using <a href="https://docusaurus.io">Docusaurus</a></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-2020 Richard Neher &amp; Trevor Bedford</section></footer></div></body></html>
3 changes: 2 additions & 1 deletion docs/advanced-functionality/view-settings/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ <h2><a class="anchor" aria-hidden="true" id="dataset-json-configurable-defaults"
<tr><td><code>layout</code></td><td>Tree layout</td><td>&quot;rect&quot;, &quot;radial&quot;, &quot;clock&quot; or &quot;unrooted</td></tr>
<tr><td><code>branch_label</code></td><td>Which set of branch labels are to be displayed</td><td>&quot;aa&quot;, &quot;lineage&quot;</td></tr>
<tr><td><code>panels</code></td><td>List of panels which (if available) are to be displayed</td><td>[&quot;tree&quot;, &quot;map&quot;]</td></tr>
<tr><td><code>transmission_lines</code></td><td>Should transmission lines (if available) be rendered on the map?</td><td>Boolean</td></tr>
</tbody>
</table>
<p>Note that <code>meta.display_defaults.panels</code> (optional) differs from <code>meta.panels</code> (required), where the latter lists the possible panels that auspice may display for the dataset.
Expand Down Expand Up @@ -131,4 +132,4 @@ <h2><a class="anchor" aria-hidden="true" id="url-query-options"></a><a href="#ur
</table>
<p><strong>See this in action:</strong></p>
<p>For instance, go to <a href="https://nextstrain.org/flu/seasonal/h3n2/ha/2y?c=num_date&amp;d=tree,map&amp;m=div&amp;p=grid&amp;r=region">nextstrain.org/flu/seasonal/h3n2/ha/2y?c=num_date&amp;d=tree,map&amp;m=div&amp;r=region</a> and you'll see how we've changed the coloring to a temporal scale (<code>c=num_date</code>), we're only showing the tree &amp; map panels (<code>d=tree,map</code>), the tree x-axis is divergence (<code>m=div</code>) and the map resolution is region (<code>r=region</code>).</p>
</span></div></article></div><div class="docLastUpdate"><em>Last updated on 15/04/2020</em></div><div class="docs-prevnext"><a class="docs-prev button" href="/auspice/advanced-functionality/second-trees"><span class="arrow-prev">← </span><span>Displaying multiple trees</span></a><a class="docs-next button" href="/auspice/advanced-functionality/drag-drop-csv-tsv"><span>Adding extra metadata via CSV/TSV</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#auspice-hardcoded-defaults">Auspice (hardcoded) defaults</a></li><li><a href="#dataset-json-configurable-defaults">Dataset (JSON) configurable defaults</a></li><li><a href="#url-query-options">URL query options</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><div><a href="/auspice/"><img style="padding-left:20px" src="/auspice/img/logo-light.svg" alt="Auspice" width="66" height="58"/></a></div><div><h5>External Links</h5><a href="https://github.com/nextstrain/auspice">GitHub repo</a><a href="https://www.npmjs.com/package/auspice">NPM package</a><a href="https://nextstrain.org">Nextstrain</a></div><div><h5>Contact Us</h5><a href="mailto:hello@nextstrain.org">email</a><a href="https://twitter.com/hamesjadfield">twitter</a></div></section><section class="copyright">Website built by <a href="https://twitter.com/hamesjadfield">James Hadfield</a> using <a href="https://docusaurus.io">Docusaurus</a></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-2020 Richard Neher &amp; Trevor Bedford</section></footer></div></body></html>
</span></div></article></div><div class="docLastUpdate"><em>Last updated on 03/06/2020</em></div><div class="docs-prevnext"><a class="docs-prev button" href="/auspice/advanced-functionality/second-trees"><span class="arrow-prev">← </span><span>Displaying multiple trees</span></a><a class="docs-next button" href="/auspice/advanced-functionality/drag-drop-csv-tsv"><span>Adding extra metadata via CSV/TSV</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#auspice-hardcoded-defaults">Auspice (hardcoded) defaults</a></li><li><a href="#dataset-json-configurable-defaults">Dataset (JSON) configurable defaults</a></li><li><a href="#url-query-options">URL query options</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><div><a href="/auspice/"><img style="padding-left:20px" src="/auspice/img/logo-light.svg" alt="Auspice" width="66" height="58"/></a></div><div><h5>External Links</h5><a href="https://github.com/nextstrain/auspice">GitHub repo</a><a href="https://www.npmjs.com/package/auspice">NPM package</a><a href="https://nextstrain.org">Nextstrain</a></div><div><h5>Contact Us</h5><a href="mailto:hello@nextstrain.org">email</a><a href="https://twitter.com/hamesjadfield">twitter</a></div></section><section class="copyright">Website built by <a href="https://twitter.com/hamesjadfield">James Hadfield</a> using <a href="https://docusaurus.io">Docusaurus</a></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-2020 Richard Neher &amp; Trevor Bedford</section></footer></div></body></html>
4 changes: 2 additions & 2 deletions docs/contributing/overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ <h4><a class="anchor" aria-hidden="true" id="for-integration-tests"></a><a href=
<p>For integration tests to work, you'll need to have <code>git-lfs</code> installed (see below) as it stores the images that the snapshot tests will use.</p>
</blockquote>
<ol>
<li>Fetch the datasets with <code>npm run get-data</code> and <code>npm run get-narratives</code>.</li>
<li>Fetch the datasets with <code>npm run get-data</code>.</li>
<li>Ensure you are <strong>not</strong> currently running the site locally, then run <code>npm run integration-test:ci</code>.</li>
</ol>
<h4><a class="anchor" aria-hidden="true" id="how-to-update-test-snapshots"></a><a href="#how-to-update-test-snapshots" 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>How to update test snapshots</h4>
Expand All @@ -96,7 +96,7 @@ <h4><a class="anchor" aria-hidden="true" id="how-to-update-test-snapshots"></a><
</ol>
<h4><a class="anchor" aria-hidden="true" id="for-smoke-tests"></a><a href="#for-smoke-tests" 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>For smoke tests</h4>
<ol>
<li>Fetch the datasets with <code>npm run get-data</code> and <code>npm run get-narratives</code>.</li>
<li>Fetch the datasets with <code>npm run get-data</code>.</li>
<li>Ensure you are <strong>not</strong> currently running the site locally, then run <code>npm run smoke-test:ci</code>.</li>
</ol>
<h4><a class="anchor" aria-hidden="true" id="test-tips"></a><a href="#test-tips" 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>Test Tips</h4>
Expand Down
Loading