{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://schema.humancellatlas.org/type/protocol/sequencing/4.3.2/library_preparation_protocol",
  "description": "Information about how a sequencing library was prepared.",
  "additionalProperties": false,
  "required": [
    "describedBy",
    "schema_type",
    "protocol_core",
    "end_bias",
    "library_construction_approach",
    "strand",
    "input_nucleic_acid_molecule"
  ],
  "title": "Library preparation protocol",
  "name": "library_preparation_protocol",
  "type": "object",
  "properties": {
    "describedBy": {
      "description": "The URL reference to the schema.",
      "type": "string",
      "pattern": "^(http|https)://schema.(.*?)humancellatlas.org/type/protocol/sequencing/(([0-9]{1,}.[0-9]{1,}.[0-9]{1,})|([a-zA-Z]*?))/library_preparation_protocol"
    },
    "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"
    },
    "schema_type": {
      "description": "The type of the metadata schema entity.",
      "type": "string",
      "enum": [
        "protocol"
      ]
    },
    "provenance": {
      "description": "Provenance information provided by the system.",
      "type": "object",
      "$ref": "https://schema.humancellatlas.org/system/1.0.3/provenance"
    },
    "protocol_core": {
      "description": "Core protocol-level information.",
      "type": "object",
      "$ref": "https://schema.humancellatlas.org/core/protocol/5.2.4/protocol_core"
    },
    "cell_barcode": {
      "description": "Information about cell identifier barcodes.",
      "type": "object",
      "$ref": "https://schema.humancellatlas.org/module/process/sequencing/5.2.4/barcode",
      "user_friendly": "Cell barcode"
    },
    "input_nucleic_acid_molecule": {
      "description": "Starting nucleic acid molecule isolated for sequencing.",
      "type": "object",
      "$ref": "https://schema.humancellatlas.org/module/ontology/5.3.2/biological_macromolecule_ontology",
      "user_friendly": "Input nucleic acid molecule",
      "example": "polyA RNA"
    },
    "nucleic_acid_source": {
      "description": "Source cells or organelles from which nucleic acid molecules were collected.",
      "type": "string",
      "enum": [
        "bulk cell",
        "single cell",
        "single nucleus",
        "bulk nuclei",
        "mitochondria"
      ],
      "user_friendly": "Nucleic acid source",
      "example": "Should be one of: bulk cell, single cell, single nucleus, bulk nuclei, or mitochondria."
    },
    "library_construction_approach": {
      "description": "The general approach for sequencing library construction.",
      "type": "object",
      "$ref": "https://schema.humancellatlas.org/module/ontology/1.2.2/library_construction_ontology",
      "user_friendly": "Library construction approach",
      "example": "Smart-seq2"
    },
    "library_construction_kit": {
      "description": "Name of kit used to construct the sequencing library.",
      "type": "object",
      "$ref": "https://schema.humancellatlas.org/module/process/6.0.3/purchased_reagents",
      "user_friendly": "Library construction kit"
    },
    "nucleic_acid_conversion_kit": {
      "description": "Name of kit used to convert RNA to DNA for sequencing.",
      "type": "object",
      "$ref": "https://schema.humancellatlas.org/module/process/6.0.3/purchased_reagents",
      "user_friendly": "Nucleic acid conversion kit"
    },
    "end_bias": {
      "description": "The type of tag or end bias the library has.",
      "type": "string",
      "example": "Should be one of: 3 prime tag, 3 prime end bias, 5 prime tag, 5 prime end bias, or full length.",
      "enum": [
        "3 prime tag",
        "3 prime end bias",
        "5 prime tag",
        "5 prime end bias",
        "full length"
      ],
      "user_friendly": "End bias"
    },
    "primer": {
      "description": "Primer used for cDNA synthesis from RNA.",
      "type": "string",
      "enum": [
        "poly-dT",
        "random"
      ],
      "user_friendly": "Primer",
      "example": "Should be one of: poly-dT, or random."
    },
    "strand": {
      "description": "Library strandedness.",
      "type": "string",
      "enum": [
        "first",
        "second",
        "unstranded"
      ],
      "example": "Should be one of: first, second, or unstranded.",
      "user_friendly": "Strand"
    },
    "spike_in_kit": {
      "description": "Information about a spike-in kit, if used.",
      "type": "object",
      "$ref": "https://schema.humancellatlas.org/module/process/6.0.3/purchased_reagents",
      "user_friendly": "Spike-in kit"
    },
    "spike_in_dilution": {
      "description": "Dilution of spike-in, if used.",
      "type": "integer",
      "maximum": 1000000,
      "minimum": 1,
      "user_friendly": "Spike-in dilution",
      "example": 100
    },
    "umi_barcode": {
      "description": "Information about unique molecular identifier (UMI) barcodes.",
      "type": "object",
      "$ref": "https://schema.humancellatlas.org/module/process/sequencing/5.2.4/barcode",
      "user_friendly": "UMI barcode"
    },
    "library_preamplification_method": {
      "description": "The method used to amplify RNA prior to adaptor ligation.",
      "type": "object",
      "$ref": "https://schema.humancellatlas.org/module/ontology/1.2.2/library_amplification_ontology",
      "user_friendly": "Library pre-amplification method",
      "example": "PCR"
    },
    "cdna_library_amplification_method": {
      "description": "The method used to amplify a cDNA library prior to sequencing.",
      "type": "object",
      "$ref": "https://schema.humancellatlas.org/module/ontology/1.2.2/library_amplification_ontology",
      "user_friendly": "cDNA library amplification method",
      "example": "PCR"
    }
  }
}
