{
    "$id": "gff_file/v1.json",
    "$schema": "http://json-schema.org/draft-07/schema",
    "_attributes": {
        "restore": {
            "R": "alabaster.files::loadGffWrapper"
        }
    },
    "additionalProperties": false,
    "description": "A file in the general feature transfer (GFF) format, containing the coordinates of annotated features in relation to a reference sequence.",
    "properties": {
        "$schema": {
            "description": "The schema to use.",
            "type": "string"
        },
        "gff_file": {
            "additionalProperties": false,
            "allOf": [
                {
                    "if": {
                        "required": [
                            "index"
                        ]
                    },
                    "then": {
                        "compression": {
                            "const": "bgzip"
                        }
                    }
                }
            ],
            "properties": {
                "compression": {
                    "description": "The compression format.",
                    "enum": [
                        "none",
                        "gzip",
                        "bzip2",
                        "bgzip"
                    ],
                    "type": "string"
                },
                "format": {
                    "description": "The file format. This is technically unnecessary as GFF2 does not have an initial comment line specifying the GFF version, whereas GFF3 does; nonetheless, this `format` property is still required here, to avoid any ambiguity. Note that the GTF format is the same as GFF2.",
                    "enum": [
                        "GFF2",
                        "GFF3"
                    ],
                    "type": "string"
                },
                "index": {
                    "description": "Tabix file to index the features. If present, the features in this GFF file must be sorted by their genomic position, and `compression` must be set to \"bgzip\".",
                    "properties": {
                        "resource": {
                            "_children": {
                                "contains": [
                                    "tabix_index_file"
                                ]
                            },
                            "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"
                },
                "other_data": {
                    "description": "Location of additional metadata for this file, typically stored as a list (via the `simple_list` schema). Ommitted if no other metadata is provided.",
                    "properties": {
                        "resource": {
                            "_children": {
                                "contains": [
                                    "simple_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"
                }
            },
            "required": [
                "format",
                "compression"
            ],
            "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",
        "gff_file",
        "md5sum",
        "path"
    ],
    "title": "GFF file",
    "type": "object"
}
