{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://schema.humancellatlas.org/type/process/analysis/8.0.6/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",
  "name": "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": {
          "description": "Path to file or setting 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.3/provenance"
    },
    "process_core": {
      "description": "Core process-level information.",
      "type": "object",
      "$ref": "https://schema.humancellatlas.org/core/process/9.0.3/process_core",
      "user_friendly": "Process core"
    },
    "process_type": {
      "description": "The type of process.",
      "type": "object",
      "$ref": "https://schema.humancellatlas.org/module/ontology/5.3.3/process_type_ontology",
      "user_friendly": "Process type"
    },
    "inputs": {
      "description": "Input parameters used in the pipeline run.",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "https://schema.humancellatlas.org/type/process/analysis/8.0.6/analysis_process#/definitions/parameter"
      },
      "user_friendly": "Input parameters"
    },
    "tasks": {
      "description": "Information about steps in the workflow.",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "https://schema.humancellatlas.org/type/process/analysis/8.0.6/analysis_process#/definitions/task"
      },
      "user_friendly": "Workflow tasks"
    },
    "input_bundles": {
      "description": "UUID(s) of the input bundle(s) used in running the pipeline.",
      "type": "array",
      "items": {
        "type": "string"
      },
      "user_friendly": "Input bundles",
      "example": "b816d2d6-5f10-4447-4194-3d0a804454d6"
    },
    "outputs": {
      "description": "Output files generated by the pipeline run.",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "https://schema.humancellatlas.org/type/file/5.3.5/analysis_file"
      },
      "user_friendly": "Output files"
    },
    "timestamp_start_utc": {
      "description": "Initial start time of the full pipeline in UTC.",
      "type": "string",
      "format": "date-time",
      "user_friendly": "Start timestamp (UTC)",
      "example": "2018-01-21T09:34:27Z",
      "guidelines": "Enter the time in date-time format: yyyy-mm-ddThh:mm:ssZ."
    },
    "timestamp_stop_utc": {
      "description": "Terminal stop time of the full pipeline in UTC.",
      "type": "string",
      "format": "date-time",
      "user_friendly": "Stop timestamp (UTC)",
      "example": "2018-01-21T11:35:01Z",
      "guidelines": "Enter the time in date-time format: yyyy-mm-ddThh:mm:ssZ."
    },
    "analysis_run_type": {
      "description": "Whether the analysis was run or was copied forward as an optimization.",
      "type": "string",
      "enum": [
        "run",
        "copy-forward"
      ],
      "user_friendly": "Analysis run type",
      "example": "Should be one of: run, or copy-forward."
    },
    "reference_bundle": {
      "description": "UUID of the bundle containing the reference used in running the pipeline.",
      "type": "string",
      "user_friendly": "Reference bundle",
      "example": "b816d2d6-5f10-4447-4194-3d0a804454d6"
    }
  }
}
