Skip to content

Commit

Permalink
fix ols ingest when directAncestors is not an array, add skos:exactMa…
Browse files Browse the repository at this point in the history
…tch to identifier props
  • Loading branch information
jamesamcl committed Aug 12, 2024
1 parent 04d102a commit bf96829
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions 01_ingest/grebi_ingest_ols/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ fn read_entities(json: &mut JsonStreamReader<BufReader<StdinLock<'_>>>, output_n
output_nodes.write_all(r#"","grebi:type":[""#.as_bytes()).unwrap();
output_nodes.write_all(grebitype.as_bytes()).unwrap();
if obj.contains_key("ols:directAncestor") {
for ancestor in obj.get("ols:directAncestor").unwrap().as_array().unwrap() {
if type_superclasses.contains(ancestor.as_str().unwrap()) {
for ancestor in get_string_values(obj.get("ols:directAncestor").unwrap()) {
if type_superclasses.contains(ancestor) {
output_nodes.write_all(r#","#.as_bytes()).unwrap();
output_nodes.write_all(ancestor.to_string().as_bytes()).unwrap();
}
Expand Down
3 changes: 2 additions & 1 deletion configs/subgraph_configs/ebi_full_monarch.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"obo:chebi/smiles",
"impc:pmId",
"impc:humanGeneAccId",
"monarch:iri"
"monarch:iri",
"skos:exactMatch"
],
"additional_equivalence_groups": [
["grebi:name", "ols:label", "rdfs:label", "monarch:name", "impc:name", "reactome:displayName"],
Expand Down

0 comments on commit bf96829

Please sign in to comment.