Skip to content

Commit

Permalink
Updated druggability json for gx validation and commented out the val…
Browse files Browse the repository at this point in the history
…idation itself so I can run adt without problems and then update gx validation
  • Loading branch information
Beatriz Saldana committed Dec 4, 2024
1 parent 121f6ff commit d227ee4
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 114 deletions.
10 changes: 5 additions & 5 deletions gx_suite_definitions/gene_info.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/agoradatatools/etl/transform/gene_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def transform_gene_info(
grouping="ensembl_gene_id",
new_column="druggability",
drop_columns=["ensembl_gene_id"],
nested_field_is_list=False
nested_field_is_list=False,
)

biodomains = biodomains.dropna(subset=["biodomain", "ensembl_gene_id"])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,67 +415,6 @@
},
"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": [],
"items": {
"default": {},
"properties": {
"abability_bucket": {
"type": "number"
},
"abability_bucket_definition": {
"maxLength": 1000,
"minLength": 44,
"type": "string"
},
"classification": {
"maxLength": 1000,
"minLength": 22,
"type": "string"
},
"pharos_class": {
"type": [
"string",
"null"
]
},
"safety_bucket": {
"type": "number"
},
"safety_bucket_definition": {
"maxLength": 1000,
"minLength": 50,
"type": "string"
},
"sm_druggability_bucket": {
"type": "number"
}
},
"type": "object"
},
"title": "Druggability Schema",
"type": [
"array",
"null"
]
}
},
"meta": {}
},
{
"expectation_type": "expect_column_values_to_be_of_type",
"kwargs": {
Expand Down Expand Up @@ -514,25 +453,25 @@
"kwargs": {
"column": "biodomains",
"list_members": [
"Apoptosis",
"Vasculature",
"Lipid Metabolism",
"Oxidative Stress",
"Cell Cycle",
"Autophagy",
"Mitochondrial Metabolism",
"APP Metabolism",
"Proteostasis",
"DNA Repair",
"Synapse",
"Immune Response",
"APP Metabolism",
"Endolysosome",
"Vasculature",
"Tau Homeostasis",
"Cell Cycle",
"Epigenetic",
"RNA Spliceosome",
"Apoptosis",
"Lipid Metabolism",
"Myelination",
"Metal Binding and Homeostasis",
"Endolysosome",
"Synapse",
"Epigenetic",
"Immune Response",
"Oxidative Stress",
"Structural Stabilization",
"Myelination",
"RNA Spliceosome",
"Autophagy"
"DNA Repair"
]
},
"meta": {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,40 +1,34 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "http://example.com/example.json",
"type": ["array", "null"],
"default": [],
"title": "Druggability Schema",
"items": {
"type": "object",
"default": {},
"properties": {
"sm_druggability_bucket": {
"type": "number"
},
"safety_bucket": {
"type": "number"
},
"abability_bucket": {
"type": "number"
},
"pharos_class": {
"type": ["string", "null"]
},
"classification": {
"type": "object",
"default": {},
"title": "Root Schema",
"required": [
"pharos_class"
],
"properties": {
"pharos_class": {
"type": "array",
"default": [],
"title": "The pharos_class Schema",
"items": {
"type": "string",
"minLength": 22,
"maxLength": 1000
"default": "",
"title": "A Schema",
"examples": [
"Tchem"
]
},
"safety_bucket_definition": {
"type": "string",
"minLength": 50,
"maxLength": 1000
},
"abability_bucket_definition": {
"type": "string",
"minLength": 44,
"maxLength": 1000
}
"examples": [
[
"Tchem"]
]
}
}
},
"examples": [{
"pharos_class": [
"Tchem"
]
}]
}

0 comments on commit d227ee4

Please sign in to comment.