Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KG2c domain_range_exclusion property contains booleans in strings? #2185

Open
amykglen opened this issue Oct 25, 2023 · 4 comments
Open

KG2c domain_range_exclusion property contains booleans in strings? #2185

amykglen opened this issue Oct 25, 2023 · 4 comments
Assignees

Comments

@amykglen
Copy link
Member

I noticed today that in the kg2c_lite.json file, the domain_range_exclusion property on edges appears to be a python boolean in a string - e.g., "False" rather than false:

ubuntu@ip-172-31-52-1:~/plater-plover$ tail --bytes 1000 kg2c_lite_2.8.4.json 
     "domain_range_exclusion": "False",
      "object": "NCBITaxon:9606",
      "qualified_object_direction": "",
      "id": 45854429,
      "primary_knowledge_source": "infores:kegg",
      "subject": "KEGG:05416",
      "qualified_predicate": ""
    },
    {
      "qualified_object_aspect": "",
      "predicate": "biolink:subclass_of",
      "domain_range_exclusion": "False",
      "object": "NCBITaxon:9606",
      "qualified_object_direction": "",
      "id": 45854430,
      "primary_knowledge_source": "infores:kegg",
      "subject": "KEGG:05417",
      "qualified_predicate": ""
    },
    {
      "qualified_object_aspect": "",
      "predicate": "biolink:subclass_of",
      "domain_range_exclusion": "False",
      "object": "NCBITaxon:9606",
      "qualified_object_direction": "",
      "id": 45854431,
      "primary_knowledge_source": "infores:kegg",
      "subject": "KEGG:05418",
      "qualified_predicate": ""
    }
  ],
  "kg2_version": "2.8.4",
  "biolink_version": "3.1.2"
}

Would it make sense to store that value as an actual boolean, rather than a string?

(I'm not actually sure what this property is for - think I missed that over the summer - so I could be wrong, but just thought it's a bit odd while I was working with the kg2c_lite.json file today..)

@amykglen amykglen changed the title Domain range exclusion property contains booleans in strings? KG2c domain range exclusion property contains booleans in strings? Oct 25, 2023
@amykglen amykglen changed the title KG2c domain range exclusion property contains booleans in strings? KG2c domain_range_exclusion property contains booleans in strings? Oct 25, 2023
@saramsey
Copy link
Member

@sundareswarpullela do you know what JSON type that edge property is supposed to be?

@sundareswarpullela
Copy link
Collaborator

Its supposed to be a string as far as KG2c edge property is concerned. I consulted Erica about it when she implemented domain_range_exclusion for KG2pre. The current logic uses string comparison to filter the results from Plover at query time.

@sundareswarpullela
Copy link
Collaborator

sundareswarpullela commented Oct 28, 2023

There is no issue in changing the domain_range_exclusion key to a json boolean in kg2c_lite.json but this has to be done before triggering the KG2.8.6c build and there are some Expand changes necessary that filter domain_range_exclusion nodes. IMO this can be slated for Winter before the next KG2c version build.

@saramsey
Copy link
Member

Thank you Sundar. Yes, we can include the change in the KG2.8.7c build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants