Making Schemas

Schema Template

The basic portion of a dynamic schema requires at a minimum:

  • an analysis_type
  • an experiment object
json
This template can be used to start your dynamic schema:
{
"name": "variant_calling_example",
"schema":{
"type": "object",
"required":[
"experiment"
],
"properties":{
"experiment":{}
}
}
}

Here are some resources to help with the creation of new schemas for your projects:

  • Understanding JSON Schema guide: This guide provides detailed information on JSON Schema formatting, offering a comprehensive resource for understanding and working with JSON schemas.
  • Example schema: If you're looking for a sample schema, you can refer to this example schema used for the CanCOGeN's VirusSeq Portal. It can serve as a reference or starting point for creating your own schemas.
  • Base schema reference: Song utilizes a base schema that is combined with all user schemas. When creating your schemas, it's important to reference the base schema to avoid specifying conflicting properties and ensure compatibility with Song's schema structure.

These resources aim to provide guidance and references for schema creation, ensuring the consistency and compatibility of your schemas within the Song metadata framework.

User Tip

There's no need to write your own JSON Schema by hand. There are many existing libraries to help you format your data. For basic schemas, a good resource is https://jsonschema.net or https://www.liquid-technologies.com/online-json-to-schema-converter, where you can convert JSON to JSON Schema.