{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "$id": "https://schema.humancellatlas.org/type/process/analysis/7.0.0/analysis_process",
  "description": "Information about the analysis process",
  "additionalProperties": false,
  "required": [
    "describedBy",
    "schema_type",
    "process_core",
    "process_type",
    "timestamp_start_utc",
    "timestamp_stop_utc",
    "input_bundles",
    "reference_bundle",
    "tasks",
    "inputs",
    "outputs",
    "analysis_run_type"
  ],
  "title": "analysis_process",
  "type": "object",
  "definitions": {
    "task": {
      "additionalProperties": false,
      "required": [
        "task_name",
        "start_time",
        "stop_time",
        "disk_size",
        "docker_image",
        "cpus",
        "memory",
        "zone"
      ],
      "type": "object",
      "properties": {
        "disk_size": {
          "type": "string"
        },
        "task_name": {
          "type": "string"
        },
        "zone": {
          "type": "string"
        },
        "log_err": {
          "type": "string"
        },
        "start_time": {
          "type": "string",
          "format": "date-time"
        },
        "cpus": {
          "type": "integer"
        },
        "log_out": {
          "type": "string"
        },
        "stop_time": {
          "type": "string",
          "format": "date-time"
        },
        "memory": {
          "type": "string"
        },
        "docker_image": {
          "type": "string"
        }
      }
    },
    "parameter": {
      "additionalProperties": false,
      "required": [
        "parameter_name",
        "parameter_value"
      ],
      "type": "object",
      "properties": {
        "checksum": {
          "type": "string"
        },
        "parameter_name": {
          "type": "string"
        },
        "parameter_value": {
          "type": "string"
        }
      }
    }
  },
  "properties": {
    "describedBy": {
      "description": "The URL reference to the schema.",
      "type": "string",
      "pattern": "^(http|https)://schema.(.*?)humancellatlas.org/type/process/analysis/(([0-9]{1,}.[0-9]{1,}.[0-9]{1,})|([a-zA-Z]*?))/analysis_process"
    },
    "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": [
        "process"
      ]
    },
    "provenance": {
      "description": "Provenance information provided by the system.",
      "type": "object",
      "$ref": "https://schema.humancellatlas.org/system/1.0.1/provenance"
    },
    "process_core": {
      "description": "Core process-level information.",
      "type": "object",
      "$ref": "https://schema.humancellatlas.org/core/process/8.0.0/process_core"
    },
    "process_type": {
      "description": "The type of process. Must be a child term of https://www.ebi.ac.uk/ols/ontologies/efo/terms?iri=http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FOBI_0000272.",
      "type": "object",
      "$ref": "https://schema.humancellatlas.org/module/ontology/5.3.0/process_type_ontology",
      "user_friendly": "Process type"
    },
    "inputs": {
      "description": "Input parameters used in the pipeline run, these can be files or string values (settings).",
      "type": "array",
      "items": {
        "$ref": "https://schema.humancellatlas.org/type/process/analysis/7.0.0/analysis_process#/definitions/parameter"
      }
    },
    "tasks": {
      "description": "Descriptions of tasks in the workflow.",
      "type": "array",
      "items": {
        "$ref": "https://schema.humancellatlas.org/type/process/analysis/7.0.0/analysis_process#/definitions/task"
      }
    },
    "input_bundles": {
      "description": "The input bundles used in this analysis run.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "outputs": {
      "description": "Output generated by the pipeline run.",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "https://schema.humancellatlas.org/type/file/5.3.2/analysis_file"
      }
    },
    "timestamp_start_utc": {
      "description": "Initial start time of the full pipeline.",
      "type": "string",
      "format": "date-time"
    },
    "timestamp_stop_utc": {
      "description": "Terminal stop time of the full pipeline.",
      "type": "string",
      "format": "date-time"
    },
    "analysis_run_type": {
      "description": "Indicator of whether the analysis actually ran or was just copied forward as an optimization.",
      "type": "string",
      "enum": [
        "run",
        "copy-forward"
      ]
    },
    "reference_bundle": {
      "description": "Bundle containing the reference used in running the pipeline.",
      "type": "string"
    }
  }
}
