Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

betula

Biological Entity Typed Universal Language Architecture: JSON Schemas for common bioinformatics data (sequences, alignments, phylogenetic trees, gene annotations, distance matrices, and BLAST results), so tools written in different languages can read and write the same JSON.

Why

The projects below each defined these shapes on their own, and the definitions drifted. A sequence record is {header, sequence} in picea and react-bio-viz but {identifier, sequence} in acacia; tree support values are packed into node names in different encodings; BLAST hits nest multiple HSPs in blastserver but are flattened to one row in react-bio-viz. Nothing checked any of it.

betula fixes one definition per shape as a JSON Schema, the language-neutral source of truth, and derives everything else from it:

Schemas are versioned in their $id (e.g. .../sequence/0.6.0/schema.json) and released as git tags; see the changelog. The raw schemas and fixtures are also served from this site, under schema/ and examples/.

Implementations

All three are published as betula-schema, versioned in lockstep with the schemas. See Getting started to install them.

LanguagePackageSourceBuilt on
Pythonbetula-schema (PyPI)bindings/pythonPydantic v2, via datamodel-code-generator
TypeScriptbetula-schema (npm)bindings/typescriptjson-schema-to-typescript types, ajv
Rustbetula-schema (crates.io)bindings/rusttypify types, the jsonschema crate

Users

The schemas are derived from the JSON these projects produce and consume today. None of them depends on betula yet.

ProjectLanguageShapes
piceaPythontrees, sequences, alignments, gene annotations
react-bio-vizTypeScripttrees, alignments, gene models, distance matrices, BLAST hits
acaciaTypeScriptalignments, trees, distance matrices
blastserverTypeScriptBLAST results
iqtreeserverTypeScripttrees