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

Generate RO-Biolink predicate mappings based on a particular Biolink model #104

Open
wants to merge 39 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
5af9507
Added a ro-to-biolink-local-mappings.tsv as a prereq.
gaurav Jul 30, 2023
88c96ba
Implemented a very basic command and added some documentation.
gaurav Jul 30, 2023
5685685
Reorganized code a little bit.
gaurav Jul 30, 2023
a13546d
Added some data structures.
gaurav Jul 30, 2023
e1c4fa6
Moved over code to download predicate-mappings from Biolink.
gaurav Jul 31, 2023
671c165
Partially implemented thing.
gaurav Aug 1, 2023
7dbf919
Something that works.
gaurav Aug 1, 2023
9475a16
Works correctly.
gaurav Aug 1, 2023
54bd04e
Removed some unnecessary code.
gaurav Aug 1, 2023
391048a
Added Scope to manage Source.
gaurav Aug 1, 2023
d42f5d6
Added code to write out RO mappings.
gaurav Aug 1, 2023
f84e058
Put relations into the right place.
gaurav Aug 1, 2023
af7637c
Fixed generation and added ro-to-biolink-mappings.tsv.
gaurav Aug 1, 2023
dcb8499
Added some manual mappings from cam-kp-api PR 640.
gaurav Aug 1, 2023
ef21fa3
Added new manually added predicates.
gaurav Aug 1, 2023
07dd294
Added a missing Biolink prefix.
gaurav Aug 1, 2023
f4adfe7
Commented out Biolink model mappings -- only predicate mappings for now.
gaurav Aug 14, 2023
a21515e
Added ro-to-biolink-predicate-mappings.tsv as a Makefile target.
gaurav Aug 14, 2023
a9eb7c2
Added explanatory log message.
gaurav Aug 14, 2023
f0662c9
Added current biolink-predicate-mappings to GitHub for reference.
gaurav Aug 14, 2023
ecdb887
Added export of all qualifiers into a single value.
gaurav Aug 14, 2023
69e1c2b
Improved output with filtering and simplification.
gaurav Aug 14, 2023
584bc92
Committed Biolink Predicate Mappings TSV to repo.
gaurav Aug 14, 2023
431c735
Added GOREL to list of prefixes we support.
gaurav Aug 14, 2023
25ee915
Added GOREL, reorganized code.
gaurav Aug 14, 2023
b54328d
Turn Biolink predicates into URLs too.
gaurav Aug 14, 2023
9d0285c
First stab at incorporating qualifiers into kg_edges output.
gaurav Aug 14, 2023
77a90f6
Removed redundant predicate.
gaurav Aug 14, 2023
2349501
Reduced storage space, added all predicate mappings.
gaurav Aug 14, 2023
e1d6dd0
Fixed syntax error.
gaurav Aug 14, 2023
00749c4
Fixed path in Makefile.
gaurav Aug 14, 2023
37f3378
Added local mapping reading code.
gaurav Aug 28, 2023
c54b71c
Upgraded dev.zio packages.
gaurav Aug 28, 2023
b74ef8e
Replaced snake case with camel case to make it more Scala-y.
gaurav Aug 28, 2023
a00234a
First stab at warnings.
gaurav Aug 28, 2023
4cf88b2
Added additional duplication checks.
gaurav Aug 28, 2023
fb145de
Added checks for invalid Biolink predicates.
gaurav Aug 28, 2023
797ff28
Deleted RO:0002313 from local mappings.
gaurav Aug 28, 2023
28e5dd9
Merge branch 'master' into kg-tsv-qualifiers
gaurav Nov 7, 2023
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
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,24 +126,27 @@ biolink.facts: biolink-model.owl.ttl
biolink-model-prefix-map.json:
curl -L -O 'https://raw.githubusercontent.com/biolink/biolink-model/$(BIOLINK)/prefix-map/biolink-model-prefix-map.json'

# Step 15. Load all the data and ontologies.
# Step 15. Download the Biolink Model predicate mappings.
ro-to-biolink-predicate-mappings.tsv:
$(SCALA_RUN) scripts/generate_ro_biolink_mapping.sc -- $@

# Step 16. Load all the data and ontologies.
# - ./scripts/kg_edges: compiled from ./scripts/kg_edges.dl with Souffle (see above).
# - inferred.csv: All inferred quads.
# - quad.facts: All asserted quads.
# - biolink.facts: Biolink model.
# - ontology.facts: only used to convert REACTOME identifiers into UniProtKB identifiers.
# - Also uses: ro-to-biolink-local-mappings.tsv to map from RO to Biolink.
# - TODO: add as a prereq
# Creates a TSV file named kg_edge.csv with five columns:
# - subj: direct type of subject
# - pred: Biolink predicate
# - obj: direct type of object
# - ps: primary_source
# - prov: graph that this is coming from (without brackets -- if it had brackets, it would
# be ignored by scripts/compact_iris.sc)
kg_edge.csv: scripts/kg_edges inferred.csv quad.facts biolink.facts ontology.facts
kg_edge.csv: scripts/kg_edges inferred.csv quad.facts biolink.facts ontology.facts ro-to-biolink-local-mappings.tsv ro-to-biolink-predicate-mappings.tsv
./scripts/kg_edges

# Step 16. Compact IRIs in the kg_edge.csv file using the specified prefixes.
# Step 17. Compact IRIs in the kg_edge.csv file using the specified prefixes.
kg.tsv: kg_edge.csv scripts/compact_iris.sc biolink-model-prefix-map.json supplemental-namespaces.json
$(SCALA_RUN) scripts/compact_iris.sc -- biolink-model-prefix-map.json supplemental-namespaces.json kg_edge.csv $@
2 changes: 1 addition & 1 deletion kubernetes/build-cam-database-storage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ spec:
- ReadWriteMany
resources:
requests:
storage: 500Gi
storage: 100Gi
storageClassName: basic
1 change: 0 additions & 1 deletion ro-to-biolink-local-mappings.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
<http://purl.obolibrary.org/obo/RO_0002297> <https://w3id.org/biolink/vocab/has_output> narrow
<http://purl.obolibrary.org/obo/RO_0002298> <https://w3id.org/biolink/vocab/has_output> narrow
<http://purl.obolibrary.org/obo/RO_0002299> <https://w3id.org/biolink/vocab/has_output> narrow
<http://purl.obolibrary.org/obo/RO_0002313> <https://w3id.org/biolink/vocab/affects> narrow
<http://purl.obolibrary.org/obo/RO_0002315> <https://w3id.org/biolink/vocab/causes> narrow
<http://purl.obolibrary.org/obo/RO_0002325> <https://w3id.org/biolink/vocab/colocalizes_with> exact
<http://purl.obolibrary.org/obo/RO_0002326> <https://w3id.org/biolink/vocab/contributes_to> exact
Expand Down
202 changes: 202 additions & 0 deletions ro-to-biolink-predicate-mappings-all.tsv

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions ro-to-biolink-predicate-mappings.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
mapping_type predicate biolink_predicate qualifier_set
exact <http://purl.obolibrary.org/obo/RO_0003003> <https://w3id.org/biolink/vocab/affects> {"biolink:qualified_predicate":"biolink:causes"}||{"biolink:object_aspect_qualifier":"expression"}||{"biolink:object_direction_qualifier":"increased"}
exact <http://purl.obolibrary.org/obo/RO_0003002> <https://w3id.org/biolink/vocab/affects> {"biolink:qualified_predicate":"biolink:causes"}||{"biolink:object_aspect_qualifier":"expression"}||{"biolink:object_direction_qualifier":"decreased"}
exact <http://purl.obolibrary.org/obo/GOREL_0002003> <https://w3id.org/biolink/vocab/affects> {"biolink:object_aspect_qualifier":"localization"}
narrow <http://purl.obolibrary.org/obo/RO_0002313> <https://w3id.org/biolink/vocab/affects> {"biolink:qualified_predicate":"biolink:causes"}||{"biolink:object_aspect_qualifier":"transport"}||{"biolink:object_direction_qualifier":"increased"}
narrow <http://purl.obolibrary.org/obo/RO_0002340> <https://w3id.org/biolink/vocab/affects> {"biolink:qualified_predicate":"biolink:causes"}||{"biolink:object_aspect_qualifier":"transport"}||{"biolink:object_direction_qualifier":"increased"}
narrow <http://purl.obolibrary.org/obo/RO_0002345> <https://w3id.org/biolink/vocab/affects> {"biolink:qualified_predicate":"biolink:causes"}||{"biolink:object_aspect_qualifier":"transport"}||{"biolink:object_direction_qualifier":"increased"}
exact <http://purl.obolibrary.org/obo/GOREL_0002004> <https://w3id.org/biolink/vocab/affects> {"biolink:qualified_predicate":"biolink:causes"}||{"biolink:object_aspect_qualifier":"degradation"}||{"biolink:object_direction_qualifier":"increased"}
exact <http://purl.obolibrary.org/obo/RO_0002212> <https://w3id.org/biolink/vocab/regulates> {"biolink:object_direction_qualifier":"downregulated"}
exact <http://purl.obolibrary.org/obo/RO_0002449> <https://w3id.org/biolink/vocab/regulates> {"biolink:object_direction_qualifier":"downregulated"}
exact <http://purl.obolibrary.org/obo/RO_0002450> <https://w3id.org/biolink/vocab/regulates> {"biolink:object_direction_qualifier":"upregulated"}
exact <http://purl.obolibrary.org/obo/RO_0002213> <https://w3id.org/biolink/vocab/regulates> {"biolink:object_direction_qualifier":"upregulated"}
exact <http://purl.obolibrary.org/obo/RO_0002212> <https://w3id.org/biolink/vocab/regulates> {"biolink:object_direction_qualifier":"downregulated"}
exact <http://purl.obolibrary.org/obo/RO_0002305> <https://w3id.org/biolink/vocab/regulates> {"biolink:object_direction_qualifier":"downregulated"}
exact <http://purl.obolibrary.org/obo/RO_0002304> <https://w3id.org/biolink/vocab/regulates> {"biolink:object_direction_qualifier":"upregulated"}
Loading