JSON Schemas

Each of the json files that comprise a SpaceTx image fileset can be validated against one of several jsonschemas (Draft 4).

Schema location

Description

codebook/codebook.json

maps patterns of intensity in the channels and rounds of a field of view to target molecules

codebook/codeword.json

describes the individiual codes contained in a codebook

experiment.json

top-level object mapping manifests and codebook together

extras.json

extension point used in multiple schemas for storing key/value pairs

field_of_view/tiles/indices.json

describes the categorical indices (channel, round, and z-section) of a tile

field_of_view/tiles/coordinates.json

physical coordinates of a tile

field_of_view/tiles/tiles.json

specification of a 2-D image tile

field_of_view/field_of_view.json

5-D image consisting of multiple 2-D image tiles

fov_manifest.json

manifest listing one or more json files that each describe a field of view

version.json

general purpose version specification used in multiple schemas

See the API and Usage documentation for how to validate your documents against the jsonschema from your code or the command-line, respectively.

Validation

The starfish validate command provides a way to check that a fileset based on the SpaceTx Image Format Specification is valid.

Usage

starfish validate –help will provide instructions on how to use the tool:

         _              __ _     _
        | |            / _(_)   | |
     ___| |_ __ _ _ __| |_ _ ___| |__
    / __| __/ _` | '__|  _| / __| '_  `
    \__ \ || (_| | |  | | | \__ \ | | |
    |___/\__\__,_|_|  |_| |_|___/_| |_|

    
Usage: starfish validate [OPTIONS] COMMAND [ARGS]...

Options:
  --experiment-json JSON_FILE_OR_URL
  --fuzz
  --help                          Show this message and exit.

Commands:
  codebook    validate codebook against the jsonschemas
  experiment  validate experiment against the jsonschemas
  fov         validate field-of-view against the jsonschemas
  manifest    validate manifest against the jsonschemas
  xarray

Examples

starfish validate experiment tmp/experiment.json > /dev/null && echo ok

Validating the experiment, validates all of the included files. These files can also be individually validated:

$ starfish validate experiment tmp/codebook.json