{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "$id": "https://schema.humancellatlas.org/module/process/sequencing/5.2.0/barcode",
  "description": "This module describes barcodes used in a library preparation process.",
  "additionalProperties": false,
  "required": [
    "barcode_offset",
    "barcode_length",
    "barcode_read"
  ],
  "title": "barcode",
  "type": "object",
  "properties": {
    "describedBy": {
      "description": "The URL reference to the schema.",
      "type": "string",
      "pattern": "^(http|https)://schema.(dev.data.|)humancellatlas.org/module/process/sequencing/[0-9]{1,}.[0-9]{1,}.[0-9]{1,}/barcode"
    },
    "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"
    },
    "barcode_read": {
      "description": "The read that the barcode is found in. Should be one of Read 1, Read 2, i7 Index, or i5 Index.",
      "type": "string",
      "enum": [
        "Read 1",
        "Read 2",
        "i7 Index",
        "i5 Index"
      ],
      "user_friendly": "Barcode-containing read"
    },
    "barcode_offset": {
      "description": "0-based offset of start of barcode in read. 0 for beginning of read.",
      "type": "integer",
      "maximum": 50,
      "minimum": 0,
      "user_friendly": "Barcode offset"
    },
    "barcode_length": {
      "description": "Length of barcode in nucleotides.",
      "type": "integer",
      "maximum": 50,
      "minimum": 0,
      "user_friendly": "Barcode length"
    },
    "white_list_file": {
      "description": "Name of file containing legitimate barcode sequences.",
      "type": "string",
      "comment": "Unused for randomly generated barcodes.",
      "user_friendly": "White list barcode file"
    }
  }
}
