{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "http://www.w3id.org/biocompute/1.3.0/schemas/description_domain.json",
    "type": "object",
    "title": "Description Domain",
    "description": "Structured field for description of external references, the pipeline steps, and the relationship of I/O objects.",
    "required": [
        "keywords",
        "pipeline_steps"
    ],
    "properties": {
        "keywords": {
            "type": "array",
            "description": "Keywords to aid in search-ability and description of the object.",
            "items": {
                "type": "string",
                "description": "This field should take free text value using common biological research terminology.",
                "examples": [
                    "HCV1a",
                    "Ledipasvir",
                    "antiviral resistance",
                    "SNP",
                    "amino acid substitutions"
                ]
            }
        },
        "xref": {
            "type": "array",
            "description": "List of the databases or ontology IDs that are cross-referenced in the BCO.",
            "items": {
                "type": "object",
                "description": "External references are stored in the form of prefixed identifiers (CURIEs). These CURIEs map directly to the URIs maintained by Identifiers.org.",
                "reference": "https://identifiers.org/",
                "required": [
                    "namespace",
                    "name",
                    "ids",
                    "access_time"
                ],
                "properties": {
                    "namespace": {
                        "type": "string",
                        "description": "External resource vendor prefix",
                        "examples": [
                            "pubchem.compound"
                        ]
                    },
                    "name": {
                        "type": "string",
                        "description": "Name of external reference",
                        "examples": [
                            "PubChem-compound"
                        ]
                    },
                    "ids": {
                        "type": "array",
                        "description": "List of reference identifiers",
                        "items": {
                            "type": "string",
                            "description": "Reference identifier",
                            "examples": [
                                "67505836"
                            ]
                        }
                    },
                    "access_time": {
                        "type": "string",
                        "description": "Date and time the external reference was accessed",
                        "format": "date-time"
                    }
                }
            }
        },
        "platform": {
            "type": "array",
            "description": "reference to a particular deployment of an existing platform where this BCO can be reproduced.",
            "items": {
                "type": "string",
                "examples": [
                    "hive"
                ]
            }
        },
        "pipeline_steps": {
            "type": "array",
            "description": "Each individual tool (or a well defined and reusable script) is represented as a step. Parallel processes are given the same step number.",
            "items": {
                "additionalProperties": false,
                "type": "object",
                "required": [
                    "step_number",
                    "name",
                    "description",
                    "input_list",
                    "output_list"
                ],
                "properties": {
                    "step_number": {
                        "type": "integer",
                        "description": "Non-negative integer value representing the position of the tool in a one-dimensional representation of the pipeline."
                    },
                    "name": {
                        "type": "string",
                        "description": "This is the common name of the software tool",
                        "examples": [
                            "HIVE-hexagon"
                        ]
                    },
                    "description": {
                        "type": "string",
                        "description": "Specific purpose of the tool.",
                        "examples": [
                            "Alignment of reads to a set of references"
                        ]
                    },
                    "version": {
                        "type": "string",
                        "description": "Version assigned to the instance of the tool used.",
                        "examples": [
                            "1.3"
                        ]
                    },
                    "prerequisite": {
                        "type": "array",
                        "description": "Reference or required prereqs",
                        "items": {
                            "type": "object",
                            "description": "Text value to indicate a package or prerequisite for running the tool used.",
                            "required": [
                                "name",
                                "uri"
                            ],
                            "properties": {
                                "name": {
                                    "type": "string",
                                    "description": "Public searchable name for reference or prereq.",
                                    "examples": [
                                        "Hepatitis C virus genotype 1"
                                    ]
                                },
                                "uri": {
                                    "$ref": "biocomputeobject.json#/definitions/uri"
                                }
                            }
                        }
                    },
                    "input_list": {
                        "type": "array",
                        "description": "URIs (expressed as a URN or URL) of the input files for each tool.",
                        "items": {
                            "$ref": "biocomputeobject.json#/definitions/uri"
                        }
                    },
                    "output_list": {
                        "type": "array",
                        "description": "URIs (expressed as a URN or URL) of the output files for each tool.",
                        "items": {
                            "$ref": "biocomputeobject.json#/definitions/uri"
                        }
                    }
                }
            }
        }
    }
}
