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

Keep edge provenance #94

Merged
merged 5 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions dags/roger/models/kgx.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,13 @@ def merge(self):
edges['subject'] + edges['predicate'] +
edges['object'] +
edges.get("biolink:primary_knowledge_source", ""))
keys_to_del = set()
for key in edges:
if key.startswith('biolink:'):
keys_to_del.add(key)
for k in keys_to_del:
edges[k.replace('biolink:', '')] = edges[k]
del edges[k]
stream.write(json.dumps(edges).decode('utf-8') + '\n')

write_merge_metric['edges_writing_time'] = time.time() - start_edge_jsonl
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ flatten-dict
redisgraph-bulk-loader==0.12.3
pytest
PyYAML
git+https://github.com/helxplatform/dug@cde-links-2
git+https://github.com/helxplatform/dug@patch-nrslv-resp
orjson
kg-utils==0.0.6
bmt==1.1.0
linkml-runtime==1.6.0
linkml-runtime==1.6.0