diff --git a/gx_suite_definitions/gene_info.ipynb b/gx_suite_definitions/gene_info.ipynb index e043478..1f0ece5 100644 --- a/gx_suite_definitions/gene_info.ipynb +++ b/gx_suite_definitions/gene_info.ipynb @@ -245,11 +245,11 @@ "metadata": {}, "outputs": [], "source": [ - "# # druggability\n", - "# validator.expect_column_values_to_be_of_type(\"druggability\", \"str\")\n", - "# with open(\"../src/agoradatatools/great_expectations/gx/json_schemas/gene_info/druggability.json\", \"r\") as file:\n", - "# druggability_schema = json.load(file)\n", - "# validator.expect_column_values_to_match_json_schema(\"druggability\", json_schema=druggability_schema)" + "# druggability\n", + "validator.expect_column_values_to_be_of_type(\"druggability\", \"str\")\n", + "with open(\"../src/agoradatatools/great_expectations/gx/json_schemas/gene_info/druggability.json\", \"r\") as file:\n", + " druggability_schema = json.load(file)\n", + "validator.expect_column_values_to_match_json_schema(\"druggability\", json_schema=druggability_schema, mostly=0.50)" ] }, { diff --git a/src/agoradatatools/great_expectations/gx/expectations/gene_info.json b/src/agoradatatools/great_expectations/gx/expectations/gene_info.json index 794c094..231acf9 100644 --- a/src/agoradatatools/great_expectations/gx/expectations/gene_info.json +++ b/src/agoradatatools/great_expectations/gx/expectations/gene_info.json @@ -415,6 +415,56 @@ }, "meta": {} }, + { + "expectation_type": "expect_column_values_to_be_of_type", + "kwargs": { + "column": "druggability", + "type_": "str" + }, + "meta": {} + }, + { + "expectation_type": "expect_column_values_to_match_json_schema", + "kwargs": { + "column": "druggability", + "json_schema": { + "$id": "http://example.com/example.json", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "default": null, + "examples": [ + { + "pharos_class": [ + "Tchem" + ] + } + ], + "properties": { + "pharos_class": { + "default": [], + "examples": [ + [ + "Tchem" + ] + ], + "items": { + "default": "", + "examples": [ + "Tchem" + ], + "title": "Pharos object", + "type": "string" + }, + "title": "The pharos_class Schema", + "type": "array" + } + }, + "title": "Root Schema", + "type": "object" + }, + "mostly": 0.5 + }, + "meta": {} + }, { "expectation_type": "expect_column_values_to_be_of_type", "kwargs": { @@ -453,25 +503,25 @@ "kwargs": { "column": "biodomains", "list_members": [ - "Cell Cycle", + "Oxidative Stress", + "Synapse", + "Metal Binding and Homeostasis", "Autophagy", - "Mitochondrial Metabolism", - "Proteostasis", + "RNA Spliceosome", "APP Metabolism", + "Apoptosis", "Endolysosome", "Vasculature", - "Tau Homeostasis", - "RNA Spliceosome", - "Apoptosis", + "DNA Repair", + "Immune Response", "Lipid Metabolism", + "Tau Homeostasis", "Myelination", - "Metal Binding and Homeostasis", - "Synapse", "Epigenetic", - "Immune Response", - "Oxidative Stress", + "Mitochondrial Metabolism", + "Proteostasis", "Structural Stabilization", - "DNA Repair" + "Cell Cycle" ] }, "meta": {} diff --git a/src/agoradatatools/great_expectations/gx/json_schemas/gene_info/druggability.json b/src/agoradatatools/great_expectations/gx/json_schemas/gene_info/druggability.json index e5e1be2..894f884 100644 --- a/src/agoradatatools/great_expectations/gx/json_schemas/gene_info/druggability.json +++ b/src/agoradatatools/great_expectations/gx/json_schemas/gene_info/druggability.json @@ -2,11 +2,8 @@ "$schema": "https://json-schema.org/draft/2019-09/schema", "$id": "http://example.com/example.json", "type": "object", - "default": {}, + "default": null, "title": "Root Schema", - "required": [ - "pharos_class" - ], "properties": { "pharos_class": { "type": "array", @@ -15,7 +12,7 @@ "items": { "type": "string", "default": "", - "title": "A Schema", + "title": "Pharos object", "examples": [ "Tchem" ]