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.

Location

https://schemas.wur.nl/betula/core/location/0.6.0/schema.json

A 1-based inclusive interval on a named reference sequence (GFF3 convention). Not yet consumed by another betula schema: annotation keeps seqid/start/end/strand flat to match picea’s and react-bio-viz’s current wire shape rather than nesting them under this. This exists as the reusable primitive for when a genomic-interval-only shape is needed, e.g. a future schema for react-bio-viz’s GenomeBrowser feature tracks.

Field

Type

Required

Description

seqid

Identifier

required

start

integer (≥ 1)

required

end

integer (≥ 1)

required

strand

one of "+", "-", "."

required

No properties beyond those listed are allowed.

Valid examples

simple.json
{
  "seqid": "chr1",
  "start": 1,
  "end": 100,
  "strand": "+"
}

Invalid examples

missing-strand.json
{
  "seqid": "chr1",
  "start": 1,
  "end": 100
}
Schema source
location.schema.json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://schemas.wur.nl/betula/core/location/0.6.0/schema.json",
  "title": "Location",
  "description": "A 1-based inclusive interval on a named reference sequence (GFF3 convention). Not yet consumed by another betula schema: annotation keeps seqid/start/end/strand flat to match picea's and react-bio-viz's current wire shape rather than nesting them under this. This exists as the reusable primitive for when a genomic-interval-only shape is needed, e.g. a future schema for react-bio-viz's GenomeBrowser feature tracks.",
  "type": "object",
  "properties": {
    "seqid": { "$ref": "https://schemas.wur.nl/betula/core/identifier/0.6.0/schema.json" },
    "start": { "type": "integer", "minimum": 1 },
    "end": { "type": "integer", "minimum": 1 },
    "strand": { "type": "string", "enum": ["+", "-", "."] }
  },
  "required": ["seqid", "start", "end", "strand"],
  "additionalProperties": false
}

Usage

Read a JSON document and parse it as a Location. CI runs this exact code against the first valid example above; see Getting started to install the bindings.

Python
TypeScript
Rust
location.py
from betula_schema import Location, parse_json

with open("location.json") as f:
    location = parse_json(Location, f.read())
print(location)