Science Score: 54.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
10 of 48 committers (20.8%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.7%) to scientific vocabulary
Keywords from Contributors
Repository
The Nextstrain website
Basic Info
- Host: GitHub
- Owner: nextstrain
- License: agpl-3.0
- Language: JavaScript
- Default Branch: master
- Homepage: https://nextstrain.org
- Size: 68 MB
Statistics
- Stars: 96
- Watchers: 19
- Forks: 52
- Open Issues: 88
- Releases: 0
Metadata Files
README.md
Nextstrain.org
Nextstrain is an open-source project to harness the scientific and public health potential of pathogen genome data. We provide a continually-updated view of publicly available data alongside powerful analytic and visualization tools for use by the community. Our goal is to aid epidemiological understanding and improve outbreak response. If you have any questions, or simply want to say hi, please give us a shout at hello@nextstrain.org or introduce yourself at discussion.nextstrain.org. We welcome contributions to Nextstrain; see our contributing documentation to learn more.
This repo comprises:
1. A server (./server.js) which serves all the content on nextstrain.org, handles authentication and responds to API requests.
1. The frontend pages, located in the ./static-site directory.
1. Code to build a customised version of the Auspice client, which is located in the ./auspice-client directory.
This repository provides the tools you need to build nextstrain.org locally and deploy nextstrain.org.
Build nextstrain.org locally
1. Set up an environment with the correct version of Node.js/NPM
Check package.json for the supported versions, e.g.
json
"engines": {
"node": "^20",
"npm": "^10"
}
While other versions may build this project successfully, we recommend using the supported versions to align with the Heroku environments.
If you are using another version for other projects, you can switch between different versions using tools such as nvm or conda; an .nvmrc file targetting the supported Node version is present, so nvm install will ensure you're using the correct version.
2. Install prerequisites
Install the node dependencies by running
npm ci
from this directory (the "nextstrain.org" directory).
Using
npm ciinstead ofnpm installensures your dependency tree matches those inpackage-lock.json.
3. Build the site
npm run build runs ./build.sh to build both the static site & an Auspice client with customisations.
The following section details the different ways to serve these pages on a local server after building the site.
4. Run server
Run server mirroring the deployed (live) website
npm run server will start a local server, by default available at localhost:5000.
This should mirror exactly what you see when you visit nextstrain.org.
In order to replicate the live behavior, you will need the appropriate environment variables set (see below).
Run server in development mode
If you are developing on nextstrain.org there are a few recommended paths depending on your aim:
For most cases running npm run dev should do what you want.
It will both watch for any changes to the server code (./src) and restart the server when you update the code, and also watch for any changes to the next.js frontend code (./static-site) and use hot-reloading to update the site as you make changes.
If you are only making changes to the server code or want to test the compiled frontend site you can run npm run dev:ssg.
This will still restart the server if you modify server code but it will not update if you change any code in ./static-site.
This also allows testing the next.js frontend code as it would appear in the live site.
Environment variables
See docs/infrastructure.md for a description of the environment variables used by the server.
For running locally, you should ensure
- NODE_ENV is not set to "production", as authentication will not work on localhost.
- AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are a valid AWS IAM user, in order for the server to access S3 buckets.
Alternatively, these may be configured using ~/.aws/credentials.
If you add a new profile to ~/.aws/credentials, you can then tell the server to use it by setting AWS_PROFILE=....
If you have built the next.js part of the site (./static-site), via npx next build static-site or similar, then setting USE_PREBUILT_STATIC_SITE=1 will use these built assets rather than server-side compilation.
Use DEBUG to control debug-level logging output.
In particular, setting DEBUG=nextstrain:* is useful to see all output from our own codebase.
Frontend pages other than Auspice
All of the frontend (client) pages in nextstrain.org except for those using Auspice to visualise datasets are built using Next.JS and found in ./static-site/.
See static-site/README.md for instructions on how to add content. See above for how to run the server in development mode which will allow you to develop these pages.
In production, these are compiled (npm run build) and served via the nextstrain.org server (npm run server).
Documentation
Nextstrain documentation is hosted by Read The Docs at docs.nextstrain.org. Please see this GitHub repo for more details.
Note that the documentation used to be served from the server in this repo at URLs such as nextstrain.org/docs/... until November 2020. A number of redirects have been added to preserve old URLs.
Auspice client
We use Auspice to visualise & interact with phylogenomic data.
A customised version of the Auspice client
We build a customised version of the auspice client (e.g. the part you see in the browser) for nextstrain.org.
The auspice customisations specific to nextstrain.org are found in ./auspice-client/customisations/.
Please see the auspice documentation for more information on customising auspice.
Testing locally
Make sure you've installed dependencies with npm ci first (and activated your conda environment if using one).
If you have AWS credentials make sure they are set as environment variables (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY).
These are not necessary, but some functionality will be missing if these aren't available.
Then run:
bash
./build.sh auspice
npm run server
This will create the auspice-client/index.html and auspice-client/dist/* files which are gitignored.
Note that the favicon.png isn't needed for auspice, as the nextstrain.org server handles this.
You can also run Auspice's own development server (not the nextstrain.org server) to ease development of client customizations. This means that you will see a different splash page & the documentation will not work. It is not currently possible to run auspice in development mode & see the nextstrain.org splash page & docs. Read the section below on the nextstrain.org server for more context.
bash
cd auspice-client
npx auspice develop --verbose --extend ./customisations/config.json --handlers ../src/endpoints/charon/index.js
If you're not familiar with
npx, it's a command to easily run programs installed bynpm. Runningnpx auspiceabove is equivalent tonode_modules/.bin/auspice.
Using a different version of Auspice
Sometimes it is useful to change the version of Auspice that is used. Perhaps you're upgrading the version nextstrain.org uses or you want to test changes in a local copy of Auspice against nextstrain.org.
If you're upgrading the version of Auspice used, install the new version with:
bash
cd auspice-client
npm install auspice@...
Replace ... with the semantic version specifier you want.
This will change package.json and package-lock.json (in auspice-client/) to reflect the new version you installed.
When preparing to commit your Auspice version change, you'll want to include those changed files too.
Run npx auspice --version (in auspice-client/) to check that (a) it's installed correctly and (b) which version you have.
Then build and run the server from the repository root as above with either:
bash
./build.sh auspice
npm run server
or
bash
cd auspice-client
npx auspice develop --verbose --extend ./customisations/config.json --handlers ../src/endpoints/charon/index.js
If you're installing from a local development copy of Auspice's source, you can use npm link to use your local copy without the need to continually re-install it after every change:
bash
npm link <path to auspice repo>
npm link <path to auspice repo>/node_modules/react
This uses symlinks both globally and within the local node_modules/ directory to point the local Auspice dependency to your local Auspice source.
Using
npm install <path to auspice repo>will not work to use a local development copy, as dependencies are handled differently withnpm installvs.npm linkin this case.
Nextstrain.org server
npm run server runs ./server.js which serves all the content on nextstrain.org & handles authentication.
This server decides based on the path, whether to serve:
* the bundled auspice JavaScript file (i.e. the auspice client, built above via ./build.sh auspice) or
* the (pre-built) static splash & documentation pages
Aside: How do auspice (client) - server communications work?
Auspice is a flexible tool created for visualising phylogenomic data that are not specific to any domain.
It can make the following API requests to a server:
* /charon/getAvailable
* /charon/getNarrative
* /charon/getDataset
and as long as there is a server and the response is appropriate then the auspice client can visualise the data.
The nextstrain.org server (server.js) sets up GET request handlers for those three endpoints using code imported from ./src/endpoints/charon/index.js.
The code for these handlers, which is exposed by ./src/endpoints/charon/index.js, has been written in such a way that it can be imported by:
1. The nextstrain.org server: npm run server (see server.js)
2. The auspice server: cd auspice-client && npx auspice view --handlers ../src/endpoints/charon/index.js --verbose (rarely useful in this case, make sure you've run npm run build -- auspice first!)
3. The auspice development server: npx auspice develop --handlers ./src/endpoints/charon/index.js --verbose --extend ./auspice-client/customisations/config.json (useful for auspice development, note the client customisations applied here too!)
Note that 2 and 3 are running the auspice server locally but modifying it via functionality whereby the default request handlers (for
/charon/...GET requests) can be overwritten by command line arguments. In this case, they're overwriting them with the handlers used by the nextstrain.org server (seeserver.js) and thus the auspice server mimics the nextstrain.org server behavior (fetching datasets from S3, etc.). See the auspice API documentation for more info.
Deployments
See the infrastructure documentation for details.
Testing
Nextstrain.org currently uses limited automated testing defined in test/*.test.js files.
Run the tests with:
npm run test:ci
This will run a local server for the duration of the tests. Alternatively, you can run your own server in the background and run:
npm run test
instead.
To run a single test or small number of test files, run a local server and invoke Jest directly, for example:
NODE_OPTIONS='--experimental-vm-modules' npx jest --run-tests-by-path test/routing.test.js
Owner
- Name: Nextstrain
- Login: nextstrain
- Kind: organization
- Website: https://nextstrain.org
- Twitter: nextstrain
- Repositories: 84
- Profile: https://github.com/nextstrain
Real-time tracking of pathogen evolution
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
preferred-citation:
type: article
title: "Nextstrain: real-time tracking of pathogen evolution"
doi: "10.1093/bioinformatics/bty407"
journal: "Bioinformatics"
year: 2018
month: 5
volume: 34
issue: 23
start: 4121
end: 4123
authors:
- family-names: Hadfield
given-names: James
- family-names: Megill
given-names: Colin
- family-names: Bell
given-names: Sidney M.
- family-names: Huddleston
given-names: John
- family-names: Potter
given-names: Barney
- family-names: Callender
given-names: Charlton
- family-names: Sagulenko
given-names: Pavel
- family-names: Bedford
given-names: Trevor
- family-names: Neher
given-names: Richard A.
GitHub Events
Total
- Create event: 116
- Issues event: 90
- Watch event: 6
- Delete event: 101
- Member event: 1
- Issue comment event: 215
- Push event: 353
- Pull request event: 221
- Pull request review event: 385
- Pull request review comment event: 367
- Fork event: 4
Last Year
- Create event: 116
- Issues event: 90
- Watch event: 6
- Delete event: 101
- Member event: 1
- Issue comment event: 215
- Push event: 353
- Pull request event: 221
- Pull request review event: 385
- Pull request review comment event: 367
- Fork event: 4
Committers
Last synced: 11 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Thomas Sibley | t****y@f****g | 599 |
| james hadfield | j****2@s****k | 542 |
| Victor Lin | 1****n | 393 |
| eharkins | e****s@g****m | 181 |
| Trevor Bedford | t****r@b****o | 153 |
| Jover | j****1@g****m | 133 |
| cassiawag | 4****g | 132 |
| John SJ Anderson | j****4@f****g | 117 |
| Emma Hodcroft | e****t@g****m | 48 |
| dependabot[bot] | 4****] | 41 |
| Kairsten Fay | k****y@g****m | 36 |
| John Huddleston | h****j@g****m | 31 |
| Misja Ilcisin | m****n@f****g | 31 |
| Richard Neher | r****r@u****h | 18 |
| sidneymbell | s****b@u****u | 13 |
| Kim Andrews | 1****s | 11 |
| Miguel Paredes | p****m@u****u | 11 |
| j23414 | j****g@i****u | 9 |
| Jennifer Chang | j****m@g****m | 8 |
| BSPANGLER | b****1@a****u | 8 |
| Cornelius Roemer | c****r@g****m | 7 |
| ivan-aksamentov | i****v@g****m | 6 |
| Barney | b****4@g****m | 4 |
| Isabel Joia | i****a@s****h | 4 |
| Alli Black | b****i@g****m | 3 |
| lhmoncla | l****a@v****u | 3 |
| Peter Becich | p****h@g****m | 2 |
| Ely P | 5****o | 2 |
| KelianP | 9****P | 2 |
| wlaurance | w****e@g****m | 1 |
| and 18 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 173
- Total pull requests: 433
- Average time to close issues: 11 months
- Average time to close pull requests: 12 days
- Total issue authors: 19
- Total pull request authors: 21
- Average comments per issue: 1.76
- Average comments per pull request: 1.02
- Merged pull requests: 293
- Bot issues: 0
- Bot pull requests: 35
Past Year
- Issues: 56
- Pull requests: 186
- Average time to close issues: 17 days
- Average time to close pull requests: 7 days
- Issue authors: 11
- Pull request authors: 14
- Average comments per issue: 0.71
- Average comments per pull request: 0.7
- Merged pull requests: 123
- Bot issues: 0
- Bot pull requests: 15
Top Authors
Issue Authors
- jameshadfield (43)
- genehack (40)
- victorlin (36)
- tsibley (14)
- joverlee521 (7)
- kairstenfay (7)
- trvrb (6)
- eharkins (4)
- rneher (2)
- sekhwal (2)
- AngieHinrichs (2)
- kiranpatil222 (2)
- huddlej (2)
- ikb6 (1)
- j23414 (1)
Pull Request Authors
- victorlin (109)
- jameshadfield (57)
- genehack (53)
- nextstrain-bot (49)
- dependabot[bot] (35)
- tsibley (34)
- trvrb (23)
- joverlee521 (19)
- j23414 (12)
- kimandrews (9)
- kairstenfay (9)
- rneher (6)
- lmoncla (3)
- miparedes (3)
- misjailcisin (3)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- actions/checkout v3 composite
- actions/setup-node v3 composite
- actions/upload-artifact v3 composite
- aws-actions/configure-aws-credentials v1 composite
- actions/cache v3 composite
- actions/checkout v3 composite
- actions/setup-node v3 composite
- actions/checkout v3 composite
- 1587 dependencies
- @babel/core ^7.19.0 development
- @babel/eslint-parser ^7.18.9 development
- @babel/plugin-proposal-class-properties ^7.18.6 development
- @jest/globals ^29.0.2 development
- babel-plugin-lodash ^3.2.11 development
- benchmark ^2.1.4 development
- eslint ^8.23.0 development
- eslint-config-airbnb ^19.0.4 development
- eslint-config-defaults ^9.0.0 development
- eslint-plugin-import ^2.26.0 development
- eslint-plugin-jest ^27.0.1 development
- eslint-plugin-jsx-a11y ^6.6.1 development
- eslint-plugin-react ^7.31.7 development
- eslint-plugin-react-hooks ^4.6.0 development
- http-proxy ^1.18.1 development
- http-proxy-middleware ^1.3.1 development
- jest ^27.5.1 development
- jest-extended ^1.1.0 development
- luxon ^3.0.4 development
- request ^2.88.2 development
- start-server-and-test ^1.11.4 development
- @aws-crypto/client-node ^3.1.1
- @aws-sdk/client-cognito-identity-provider ^3.53.0
- @aws-sdk/client-iam ^3.53.0
- @aws-sdk/client-s3 ^3.53.1
- argparse ^1.0.10
- auspice ^2.43.0
- aws-sdk ^2.908.0
- chalk ^2.4.1
- compression ^1.7.3
- connect-redis ^4.0.3
- content-type ^1.0.4
- cookie ^0.4.2
- cors ^2.8.5
- debug ^4.3.4
- express ^4.17.1
- express-naked-redirect ^0.1.2
- express-session ^1.16.2
- express-static-gzip ^0.2.2
- heroku-ssl-redirect 0.0.4
- http-errors ^1.8.0
- ioredis ^4.14.1
- iso-639-1 ^2.1.0
- jose npm:jose-node-cjs-runtime@^3.11.3
- js-yaml ^4.0.0
- jszip ^3.10.1
- lodash.partition ^4.6.0
- make-fetch-happen ^10.0.0
- marked ^0.7.0
- mime ^2.5.2
- negotiator ^0.6.2
- node-fetch ^2.6.0
- p-limit ^3.0.1
- passport ^0.4.0
- passport-oauth2 ^1.5.0
- passport-strategy ^1.0.0
- raw-body ^2.4.2
- react-icons ^3.11.0
- session-file-store ^1.3.1
- yaml-front-matter ^4.0.0
- sphinx-autobuild * development
- nextstrain-sphinx-theme >=2022.5
- recommonmark *
- sphinx *
- sphinx-markdown-tables *
- dependabot/fetch-metadata v1 composite
- 673 dependencies
- auspice ^2.48.0
- iso-639-1 ^2.1.15
- actions/checkout v3 composite
- actions/setup-node v3 composite
- aws-actions/configure-aws-credentials v4 composite