Renders and SVG schema of SARS-CoV-2 clade as defined by Neststrain

Overview

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
Comments
  • update/clades svg to 2021 12 21

    update/clades svg to 2021 12 21

    • fix: increase width to encompass new wider tree
    • feat: update clades to 2021-12-21
    • feat: add py script to auto generate clade.json from clades_hierarchy.tsv
    • feat: add clade creation github action
    • fix: upgrade pip, use correct script path
    • feat: update clades.svg to 2021-12-21
    opened by corneliusroemer 2
  • Why pin hierarchy?

    Why pin hierarchy?

    doesn't this pin require manual updates of the code whenever we add a new clade? @corneliusroemer

    https://github.com/nextstrain/ncov-clades-schema/blob/master/src/generate_clades_json.py#L10

    bug 
    opened by rneher 1
  • feat/add clade creation action

    feat/add clade creation action

    • fix: increase width to encompass new wider tree
    • feat: update clades to 2021-12-21
    • feat: add py script to auto generate clade.json from clades_hierarchy.tsv
    • feat: add clade creation github action
    opened by corneliusroemer 1
  • feat/add autocreate py script

    feat/add autocreate py script

    • fix: increase width to encompass new wider tree
    • feat: update clades to 2021-12-21
    • feat: add py script to auto generate clade.json from clades_hierarchy.tsv
    opened by corneliusroemer 1
  • Reimplement clade graph rendering

    Reimplement clade graph rendering

    This aims to reimplement rendering logic of the schema without using D3.js, such that we have more control on the schema layout.

    • [x] remove d3.js DOM functions, use React instead
    • [x] convert clades.json to a new format that can support clades
    • [ ] reimplement graph construction (calculate node and edge positions), without using d3.js hierarchy functions: in particular allowing multiple parents (to show recombination relationships), and perhaps arbitrary graphs in general
    • [ ] render various attributes of nodes and edges (to be discussed) - using text, tooltips, graphics, color, animation etc
    • [ ] size nodes according to some metric (e.g. total number of observed sequences)
    • [ ] render the graph into an SVG file, for static usage
    • [ ] package the interactive React components into an NPM package, to be used in React apps where we currently use the static SVG (Nextclade, CoVariants, perhaps on Nextstrain.org somewhere as well)
    • [ ] CI: automatically release SVGs to GitHub Releases
    • [ ] CI: automatically release NPM package
    opened by ivan-aksamentov 1
  • Headless SVG generation

    Headless SVG generation

    Description of proposed changes

    This PR does several things:

    • it simplifies the code and removes many dependencies; much of this is not needed if the desired output is only a static SVG file
    • it enables headless creation of SVGs, without needing a browser (Issue #1 )
    • it determines bounds automatically (Issue #8), without the need to manually adjust size parameters when the tree grows

    Related issue(s)

    This addresses Issues #1 and #8.

    Testing

    Pull the code, install the dependencies, and run node src/createCladesSchema.js.

    This will generate an SVG like:

    clades

    Opening the file in a web browser, and using the developer tools to set the SVG's width to a fixed value (e.g. 500px), and border to solid shows that it looks centered:

    clades

    I haven't tested this in Docker

    opened by jamesscottbrown 4
  • Center graphics and determine bounds automatically

    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

    enhancement 
    opened by corneliusroemer 1
  • feat: render svg without a browser [wip]

    feat: render svg without a browser [wip]

    Attempts to resolve #1

    These are my messy attempts to render the d3 schema into svg without running it in the browsers, i.e. under Node.js.

    Neither JSDOM nor SVGDOM worked due to some of the SVG-related DOM functions used in D3 not being implemented in these environments.

    Perhaps someone else could give it a try?

    opened by ivan-aksamentov 1
  • Render SVG without browser

    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.

    enhancement 
    opened by ivan-aksamentov 0
Owner
Nextstrain
Real-time tracking of pathogen evolution
Nextstrain
A simple CLI to generate a starter schema for keystone-6 from a pre-existing prisma schema.

Prisma2Keystone A tool for converting prisma schema to keystone schema typescript This is a proof of concept. More work is needed Usage npx prisma2key

Brook Mezgebu 17 Dec 17, 2022
A Cloudflare Workers service that fetches and renders Notion pages as HTML, Markdown, or JSON.

notion-fetch A Cloudflare Workers service that fetches and renders Notion pages as HTML, Markdown, or JSON. Powered by Durable Objects and R2. Usage P

Heyang Zhou 7 Jan 6, 2023
A lightweight JavaScript library that renders text in a brilliant style by displaying strings of random characters before the actual text.

cryptoWriter.js A lightweight javascript library which creates brilliant text animation by rendering strings of random characters before the actual te

Keshav Bajaj 2 Sep 13, 2022
This repo renders contribution data.

This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev # or yarn dev Open http://

OpenSauced 4 Sep 17, 2022
🍎Transform an SVG icon into multiple themes, and generate React icons,Vue icons,svg icons

IconPark English | 简体中文 Introduction IconPark gives access to more than 2000 high-quality icons, and introduces an interface for customizing your icon

Bytedance Inc. 6.8k Jan 5, 2023
A Javascript library to export svg charts from the DOM and download them as an SVG file, PDF, or raster image (JPEG, PNG) format. Can be done all in client-side.

svg-exportJS An easy-to-use client-side Javascript library to export SVG graphics from web pages and download them as an SVG file, PDF, or raster imag

null 23 Oct 5, 2022
Invadium runs exploit playbooks against vulnerable target applications in an intuitive, reproducible, and well-defined manner.

Invadium Invadium runs exploits against one or more target applications in an intuitive, reproducable, and well-defined manner. It focuses on bridging

Dynatrace Open Source 10 Nov 6, 2022
jQuery plugin to show a tabs bar for navigation. The tabs can be defined once, and shared across multiple HTML pages.

jquery.simpletabs v1.2.3 The jquery.simpletabs plugin shows a tabs bar for navigation. The tabs can be defined once, and shared across multiple HTML p

Peter Thoeny 1 Feb 23, 2022
Improve the security of your API by detecting common vulnerabilities as defined by OWASP and enforced with Spectral.

Spectral OWASP API Security Scan an OpenAPI document to detect security issues. As OpenAPI is only describing the surface level of the API it cannot s

Stoplight 23 Dec 8, 2022
Sample AWS microservices app with service discovery defined using the CDK. Uses Docker + Fargate & ELB.

AWS Microservices Demo with CDK and Fargate About Simple AWS microservice-based app. Consists of two Spring Boot based services: Name Service GET /nam

Nick Klaene 7 Nov 23, 2022
Calculates maximum composite SLA for a list of sequentially provided cloud services or your custom-defined services.

SlaMax Calculates maximum composite SLA for a list of sequentially provided cloud services or your custom-defined services. Here are a few use-cases y

Mikael Vesavuori 4 Sep 19, 2022
A Node.js client & server implementation of the WAMP-like RPC-over-websocket system defined in the OCPP-J protcols.

OCPP-RPC A client & server implementation of the WAMP-like RPC-over-websocket system defined in the OCPP-J protcols (e.g. OCPP1.6J and OCPP2.0.1J). Re

Mikuso 14 Dec 30, 2022
A lightweight jQuery custom scrollbar plugin, that triggers event when reached the defined point.

Scrollbox A lightweight jQuery custom scrollbar plugin, that triggers event when reached the defined point. Demo Page Table of contents Browser compat

null 15 Jul 22, 2022
CSS-based animations triggered by JS, defined in your stylesheet

Anim-x CSS-based animations triggered by JS, defined in your stylesheet. $ npm i https://github.com/LTBL-Studio/anim-x.git Quick start An animation is

LTBL 2 Sep 29, 2021
Tampermonkey script which adds the ability to add a user-defined label/tag/flair on a user, shown throughout Hacker News.

Hacker News User Tags Hacker News User Tags is a Tampermonkey userscript which allows the user to associate a custom coloured label/tag on usernames t

Lachlan McDonald 2 Oct 7, 2022
Validate directory structure and file contents with an extension of JSON schema.

directory-schema-validator Description Validate directory structure and file contents with an extension of JSON schema. Install Install using NPM or s

Justin Poehnelt 5 Nov 1, 2022
A movie schema sandbox for playing with EdgeDB and the EdgeQL query builder, pre-loaded with MCU data

The EdgeDB MCU sandbox ?? This is a sandbox for playing with EdgeDB and the EdgeQL query builder. It includes a simple movie database schema (dbschema

EdgeDB 13 Nov 9, 2022
Build Schema.org graphs for JavaScript Runtimes (Browser, Node, etc). Improve your sites SEO with quick and easy Rich Results.

schema-org-graph-js The quickest and easiest way to build Schema.org graphs for JavaScript Runtimes (Browser, Node, etc). Status: ?? In Development Pl

Harlan Wilton 17 Dec 21, 2022
Hadmean is an internal tool generator. It is language agnostic, schema driven, extremely customizable, featured packed, user-friendly and has just one installation step.

Hadmean Report a Bug · Request a Feature · Ask a Question Table of Contents About Quick Demo Motivation Why you should try Hadmean Getting Started Pre

Hadmean 344 Dec 29, 2022