{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "$id": "https://schema.humancellatlas.org/core/biomaterial/7.0.1/biomaterial_core",
  "description": "A biomaterial entity contains information about biological material that was generated/used in the project and includes everything from a whole organism down to subcellular components.",
  "additionalProperties": false,
  "required": [
    "biomaterial_id",
    "ncbi_taxon_id"
  ],
  "title": "biomaterial_core",
  "type": "object",
  "properties": {
    "describedBy": {
      "description": "The URL reference to the schema.",
      "type": "string",
      "pattern": "^(http|https)://schema.(.*?)humancellatlas.org/core/biomaterial/(([0-9]{1,}.[0-9]{1,}.[0-9]{1,})|([a-zA-Z]*?))/biomaterial_core"
    },
    "schema_version": {
      "description": "The version number of the schema in major.minor.patch format.",
      "type": "string",
      "pattern": "^[0-9]{1,}.[0-9]{1,}.[0-9]{1,}$",
      "example": "4.6.1"
    },
    "biomaterial_id": {
      "description": "A unique ID for the biomaterial.",
      "type": "string",
      "user_friendly": "Biomaterial ID"
    },
    "biomaterial_name": {
      "description": "A short, descriptive name for the biomaterial that need not be unique.",
      "type": "string",
      "user_friendly": "Biomaterial name"
    },
    "biomaterial_description": {
      "description": "A general description of the biomaterial.",
      "type": "string",
      "user_friendly": "Biomaterial description"
    },
    "ncbi_taxon_id": {
      "description": "A taxonomy ID (taxonID) from NCBI.",
      "type": "array",
      "items": {
        "type": "integer"
      },
      "user_friendly": "NCBI taxon ID",
      "example": 9606
    },
    "genotype": {
      "description": "Genotype of the biomaterial.",
      "type": "string",
      "user_friendly": "Genotype",
      "example": "DRB1 0401 protective allele"
    },
    "supplementary_files": {
      "description": "A list of filenames of biomaterial-level supplementary files.",
      "type": "array",
      "items": {
        "type": "string"
      },
      "user_friendly": "Supplementary files"
    },
    "biosd_biomaterial": {
      "description": "A DDBJ, NCBI, or EMBL-EBI BioSample ID. Accession must start with SAMD, SAMN, or SAME.",
      "type": "string",
      "pattern": "^SAM(D|N|E([AG]?))[0-9]+$",
      "user_friendly": "BioSample ID",
      "example": "SAMN00000000"
    },
    "insdc_biomaterial": {
      "description": "An INSDC (International Nucleotide Sequence Database Collaboration) sample accession. Can be from the DDBJ, NCBI, or EMBL-EBI. Accession must start with DRS, SRS, or ERS.",
      "type": "string",
      "pattern": "^[D|E|S]RS[0-9]+$",
      "user_friendly": "INSDC ID",
      "example": "SRS0000000"
    }
  }
}
