{
    "$id": "data_frame_factor/v1.json",
    "$schema": "http://json-schema.org/draft-07/schema",
    "_attributes": {
        "format": "text/csv",
        "restore": {
            "R": "alabaster.base::loadDataFrameFactor"
        }
    },
    "additionalProperties": false,
    "description": "A factor where the levels are the rows of a data frame. The `levels` property points to a `data_frame` resource containing the levels.\n\nDerived from `factor/v1.json`: virtual factor-like object where the unique levels are some vector-like object, corresponding to the Factor class in the [**S4Vectors**](https://bioconductor.org/packages/S4Vectors) Bioconductor package. The `path` property points to a CSV file, see [here](https://github.com/ArtifactDB/takane/blob/master/docs/specifications/factor/v1.md) for a detailed specification. Concrete subclasses are expected to define a `levels` property that points to a vector-like object containing the levels.",
    "properties": {
        "$schema": {
            "description": "The schema to use.",
            "type": "string"
        },
        "data_frame_factor": {
            "additionalProperties": false,
            "properties": {
                "levels": {
                    "description": "Location of the data frame containing the levels.",
                    "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"
                }
            },
            "required": [
                "levels"
            ],
            "type": "object"
        },
        "factor": {
            "additionalProperties": false,
            "properties": {
                "compression": {
                    "description": "Type of compression applied to the file.",
                    "enum": [
                        "none",
                        "gzip",
                        "bzip2"
                    ],
                    "type": "string"
                },
                "element_data": {
                    "description": "Pointer to a data frame additional annotations for each element in the factor. 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"
                },
                "length": {
                    "description": "Length of the factor.",
                    "type": "integer"
                },
                "names": {
                    "default": false,
                    "description": "Whether the factor is named. If `true`, the first column of CSV contains the names of the factor elements.",
                    "type": "boolean"
                },
                "other_data": {
                    "description": "Pointer to a list of additional metadata for this object.",
                    "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"
                }
            },
            "required": [
                "compression",
                "length"
            ],
            "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",
        "data_frame_factor",
        "factor",
        "md5sum",
        "path"
    ],
    "title": "Data Frame Factor",
    "type": "object"
}
