{
    "$id": "genomic_ranges/v1.json",
    "$schema": "http://json-schema.org/draft-07/schema",
    "_attributes": {
        "format": "text/csv",
        "restore": {
            "R": "alabaster.ranges::loadGRanges"
        }
    },
    "additionalProperties": false,
    "description": "Genomic ranges, stored in a CSV file (see [here](https://github.com/ArtifactDB/takane/blob/master/docs/specifications/genomic_ranges/v1.md) for a detailed specification). Each row of the CSV corresponds to a genomic range. The file should contain at least the columns `seqnames` (character), `start` (integer), `end` (integer), and `strand` (string, one of `-`, `+` or `*`). Both `start` and `end` are 1-based positions where `end` is inclusive, i.e., the genomic interval is defined as `[start, end]`. If the `genomic_ranges.names` property is present, the first column of the CSV file contains the names of the ranges.",
    "properties": {
        "$schema": {
            "description": "The schema to use.",
            "type": "string"
        },
        "genomic_ranges": {
            "additionalProperties": false,
            "properties": {
                "compression": {
                    "description": "Type of compression applied to the file.",
                    "enum": [
                        "none",
                        "gzip",
                        "bzip2"
                    ],
                    "type": "string"
                },
                "length": {
                    "description": "Number of entries.",
                    "type": "integer"
                },
                "names": {
                    "default": false,
                    "description": "Whether the ranges are named. If `true`, the first column of CSV contains the names of the individual ranges.",
                    "type": "boolean"
                },
                "other_data": {
                    "description": "Location of additional metadata for this object, typically stored as a list (via the `basic_list` schema).",
                    "properties": {
                        "resource": {
                            "_children": {
                                "contains": [
                                    "basic_list"
                                ]
                            },
                            "properties": {
                                "path": {
                                    "description": "Relative path of the resource from the root of the project directory.",
                                    "type": "string"
                                },
                                "type": {
                                    "description": "Type of file. Local files should be present in the same project directory.",
                                    "enum": [
                                        "local"
                                    ],
                                    "type": "string"
                                }
                            },
                            "required": [
                                "type",
                                "path"
                            ],
                            "type": "object"
                        }
                    },
                    "required": [
                        "resource"
                    ],
                    "type": "object"
                },
                "range_data": {
                    "description": "Location of additional annotations for each genomic range. If omitted, no additional annotations are present.",
                    "properties": {
                        "resource": {
                            "_children": {
                                "contains": [
                                    "data_frame"
                                ]
                            },
                            "properties": {
                                "path": {
                                    "description": "Relative path of the resource from the root of the project directory.",
                                    "type": "string"
                                },
                                "type": {
                                    "description": "Type of file. Local files should be present in the same project directory.",
                                    "enum": [
                                        "local"
                                    ],
                                    "type": "string"
                                }
                            },
                            "required": [
                                "type",
                                "path"
                            ],
                            "type": "object"
                        }
                    },
                    "required": [
                        "resource"
                    ],
                    "type": "object"
                },
                "sequence_information": {
                    "description": "Location of the file containing the sequence information.",
                    "properties": {
                        "resource": {
                            "_children": {
                                "contains": [
                                    "sequence_information"
                                ]
                            },
                            "properties": {
                                "path": {
                                    "description": "Relative path of the resource from the root of the project directory.",
                                    "type": "string"
                                },
                                "type": {
                                    "description": "Type of file. Local files should be present in the same project directory.",
                                    "enum": [
                                        "local"
                                    ],
                                    "type": "string"
                                }
                            },
                            "required": [
                                "type",
                                "path"
                            ],
                            "type": "object"
                        }
                    },
                    "required": [
                        "resource"
                    ],
                    "type": "object"
                }
            },
            "required": [
                "compression",
                "length",
                "sequence_information"
            ],
            "type": "object"
        },
        "is_child": {
            "default": false,
            "description": "Is this a child document, only to be interpreted in the context of the parent document from which it is linked? This may have implications for search and metadata requirements.",
            "type": "boolean"
        },
        "md5sum": {
            "description": "MD5 checksum for the file.",
            "type": "string"
        },
        "path": {
            "description": "Path to the file in the project directory.",
            "type": "string"
        }
    },
    "required": [
        "$schema",
        "genomic_ranges",
        "md5sum",
        "path"
    ],
    "title": "Genomic Ranges",
    "type": "object"
}
