Git Product home page Git Product logo

ncov-clades-schema's Introduction

ncov-clade-schema

https://ncov-clades-schema.vercel.app/

Visualizes current tree of SARS-CoV-2 clades. Allows to generate an SVG image of this tree.

Tree of Nextstrain clades

Comes originally from these sandboxes:

Development

Clone the repository and go to its directory.

Develop locally

Have Node.js 12+ (latest LTS is recommended) and yarn 1.x installed. Run:

yarn install
yarn dev

Open browser at

http://localhost:3000

Develop in docker

Have Docker installed. Run

./docker/dev yarn install
./docker/dev yarn dev

Open browser at

http://localhost:3000

Updating with new clades

  1. Add new clade to src/clades.json structure, in the right place
  2. Run https://github.com/nextstrain/ncov-clades-schema/blob/master/src/replace_colors.py with the right parameters (old number of clades and new number of clades). Currently --prev-row should (probably) be 29 (or higher if more than 1 clade added). If a single clade is added, --future-row should be 32: python src/replace_colors.py --prev-row 31 --future-row 32
  3. Set the colors of new clades to the ones suggested by the script (written to stdout)
  4. Adjust the width of the svg as necessary in: src/components/NextstrainCladesSchema.tsx
  5. Check results using e.g. yarn dev (after dev setup)
  6. Commit, push
  7. Save produced svg and update clades.svg in this repo (this is where the README and potentially also Nextclade gets the svg from, so this needs to be updated for changes to take effect), see https://github.com/nextstrain/ncov-clades-schema/commit/738d42762aec411c5da6e78d32b1c235601b08a5

ncov-clades-schema's People

Contributors

corneliusroemer avatar dependabot[bot] avatar ivan-aksamentov avatar rneher avatar trvrb avatar tsibley avatar victorlin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ncov-clades-schema's Issues

Render SVG without browser

We may automate generation of SVG on clade.json updates, such that the changes automatically propagate to all projects using the schema.

This will require the code to run in Node.js.

There are also more hacky ways to automate it in a browser environment, like using puppeteer or Cypress.

22I ?

Hi. The current schema has "22I (BA.2.86)". Should this be "23I (BA.2.86)" instead?

Center graphics and determine bounds automatically

Right now the width of the graphic has to be set manually.

It would be great if the width was determined automatically.

Even if that's not possible, the graph should be centered. Right now it seems to be left aligned:
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.