Skip to content

Commit

Permalink
Merge pull request #488 from biolink/update_bmt_1.4.0
Browse files Browse the repository at this point in the history
Fixing KGX to support testing knowledge_level and agent_type
  • Loading branch information
sierra-moxon authored Apr 13, 2024
2 parents 38c82e7 + e268826 commit 5ee98e1
Show file tree
Hide file tree
Showing 14 changed files with 784 additions and 678 deletions.
217 changes: 153 additions & 64 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions tests/integration/test_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ def test_validator_good():
subject="UBERON:0000001",
object="UBERON:0000002",
category=["biolink:Association"],
knowledge_level="not_provided",
agent_type="not_provided",
)
validator = Validator(verbose=True)
validator.validate(G)
Expand Down Expand Up @@ -107,6 +109,8 @@ def test_validator_explicit_biolink_version():
subject="CHEMBL.COMPOUND:1222250",
object="UBERON:0000001",
category=["biolink:Association"],
knowledge_level="not_provided",
agent_type="not_provided",
)
Validator.set_biolink_model(toolkit.get_model_version())
validator = Validator(verbose=True)
Expand Down
20 changes: 10 additions & 10 deletions tests/resources/chebi_kgx_tsv_edges.tsv
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
id subject predicate object category relation knowledge_source logical_interpretation
CHEBI:101257-biolink:subclass_of-CHEBI:22702 CHEBI:101257 biolink:subclass_of CHEBI:22702 rdfs:subClassOf chebiasc66dwf
CHEBI:101257-biolink:subclass_of-CHEBI:64459 CHEBI:101257 biolink:subclass_of CHEBI:64459 rdfs:subClassOf chebiasc66dwf
CHEBI:101257-biolink:subclass_of-CHEBI:50995 CHEBI:101257 biolink:subclass_of CHEBI:50995 rdfs:subClassOf chebiasc66dwf
CHEBI:101257-biolink:subclass_of-CHEBI:25018 CHEBI:101257 biolink:subclass_of CHEBI:25018 rdfs:subClassOf chebiasc66dwf
CHEBI:101257-biolink:subclass_of-CHEBI:48975 CHEBI:101257 biolink:subclass_of CHEBI:48975 rdfs:subClassOf chebiasc66dwf
CHEBI:101257-biolink:subclass_of-CHEBI:21644 CHEBI:101257 biolink:subclass_of CHEBI:21644 rdfs:subClassOf chebiasc66dwf
CHEBI:101257-biolink:subclass_of-CHEBI:25477 CHEBI:101257 biolink:subclass_of CHEBI:25477 rdfs:subClassOf chebiasc66dwf
CHEBI:101257-biolink:subclass_of-CHEBI:24780 CHEBI:101257 biolink:subclass_of CHEBI:24780 rdfs:subClassOf chebiasc66dwf
urn:uuid:6c0781c9-a64a-4750-be57-5c352a3b93fd CHEBI:101257 biolink:has_attribute CHEBI:67267 biolink:Association RO:0000087 chebiasc66dwf owlstar:AllSomeInterpretation
id subject predicate object category relation knowledge_source logical_interpretation knowledge_level agent_type
CHEBI:101257-biolink:subclass_of-CHEBI:22702 CHEBI:101257 biolink:subclass_of CHEBI:22702 rdfs:subClassOf chebiasc66dwf not_provided not_provided
CHEBI:101257-biolink:subclass_of-CHEBI:64459 CHEBI:101257 biolink:subclass_of CHEBI:64459 rdfs:subClassOf chebiasc66dwf not_provided not_provided
CHEBI:101257-biolink:subclass_of-CHEBI:50995 CHEBI:101257 biolink:subclass_of CHEBI:50995 rdfs:subClassOf chebiasc66dwf not_provided not_provided
CHEBI:101257-biolink:subclass_of-CHEBI:25018 CHEBI:101257 biolink:subclass_of CHEBI:25018 rdfs:subClassOf chebiasc66dwf not_provided not_provided
CHEBI:101257-biolink:subclass_of-CHEBI:48975 CHEBI:101257 biolink:subclass_of CHEBI:48975 rdfs:subClassOf chebiasc66dwf not_provided not_provided
CHEBI:101257-biolink:subclass_of-CHEBI:21644 CHEBI:101257 biolink:subclass_of CHEBI:21644 rdfs:subClassOf chebiasc66dwf not_provided not_provided
CHEBI:101257-biolink:subclass_of-CHEBI:25477 CHEBI:101257 biolink:subclass_of CHEBI:25477 rdfs:subClassOf chebiasc66dwf not_provided not_provided
CHEBI:101257-biolink:subclass_of-CHEBI:24780 CHEBI:101257 biolink:subclass_of CHEBI:24780 rdfs:subClassOf chebiasc66dwf not_provided not_provided
urn:uuid:6c0781c9-a64a-4750-be57-5c352a3b93fd CHEBI:101257 biolink:has_attribute CHEBI:67267 biolink:Association RO:0000087 chebiasc66dwf owlstar:AllSomeInterpretation not_provided not_provided
24 changes: 12 additions & 12 deletions tests/resources/cm_edges.csv
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
subject,epredicate,object,relation,predicate,provided_by
HGNC:7670,http://www.w3.org/2002/07/owl#equivalentClass,OMIM:601937,owl:equivalentClass,biolink:same_as,hgnc.ttl
HGNC:7670,http://www.w3.org/2002/07/owl#equivalentClass,ENSEMBL:ENSG00000124151,owl:equivalentClass,biolink:same_as,hgnc.ttl
HGNC:7670,http://www.w3.org/2002/07/owl#equivalentClass,NCBIGene:8202,owl:equivalentClass,biolink:same_as,hgnc.ttl
HGNC:35302,http://www.w3.org/2002/07/owl#equivalentClass,ENSEMBL:ENSG00000284458,owl:equivalentClass,biolink:same_as,hgnc.ttl
HGNC:35302,http://www.w3.org/2002/07/owl#equivalentClass,NCBIGene:100302240,owl:equivalentClass,biolink:same_as,hgnc.ttl
OMIM:601937,http://www.w3.org/2000/01/rdf-schema#subClassOf,SO:0001217,rdfs:subClassOf,biolink:subclass_of,hgnc.ttl
ENSEMBL:ENSG00000124151,http://www.w3.org/2000/01/rdf-schema#subClassOf,SO:0001217,rdfs:subClassOf,biolink:subclass_of,hgnc.ttl
ENSEMBL:ENSG00000284458,http://www.w3.org/2000/01/rdf-schema#subClassOf,SO:0001265,rdfs:subClassOf,biolink:subclass_of,hgnc.ttl
NCBIGene:100302240,http://www.w3.org/2000/01/rdf-schema#subClassOf,SO:0001265,rdfs:subClassOf,biolink:subclass_of,hgnc.ttl
HGNC:3121,http://www.w3.org/2000/01/rdf-schema#subClassOf,SO:0001217,rdfs:subClassOf,biolink:subclass_of,hgnc.ttl
HGNC:35302,interacts_with,HGNC:3121,RO:00000000,biolink:interacts_with,test.ttl
subject,epredicate,object,relation,predicate,provided_by,knowledge_level,agent_type
HGNC:7670,http://www.w3.org/2002/07/owl#equivalentClass,OMIM:601937,owl:equivalentClass,biolink:same_as,hgnc.ttl,not_provided,not_provided
HGNC:7670,http://www.w3.org/2002/07/owl#equivalentClass,ENSEMBL:ENSG00000124151,owl:equivalentClass,biolink:same_as,hgnc.ttl,not_provided,not_provided
HGNC:7670,http://www.w3.org/2002/07/owl#equivalentClass,NCBIGene:8202,owl:equivalentClass,biolink:same_as,hgnc.ttl,not_provided,not_provided
HGNC:35302,http://www.w3.org/2002/07/owl#equivalentClass,ENSEMBL:ENSG00000284458,owl:equivalentClass,biolink:same_as,hgnc.ttl,not_provided,not_provided
HGNC:35302,http://www.w3.org/2002/07/owl#equivalentClass,NCBIGene:100302240,owl:equivalentClass,biolink:same_as,hgnc.ttl,not_provided,not_provided
OMIM:601937,http://www.w3.org/2000/01/rdf-schema#subClassOf,SO:0001217,rdfs:subClassOf,biolink:subclass_of,hgnc.ttl,not_provided,not_provided
ENSEMBL:ENSG00000124151,http://www.w3.org/2000/01/rdf-schema#subClassOf,SO:0001217,rdfs:subClassOf,biolink:subclass_of,hgnc.ttl,not_provided,not_provided
ENSEMBL:ENSG00000284458,http://www.w3.org/2000/01/rdf-schema#subClassOf,SO:0001265,rdfs:subClassOf,biolink:subclass_of,hgnc.ttl,not_provided,not_provided
NCBIGene:100302240,http://www.w3.org/2000/01/rdf-schema#subClassOf,SO:0001265,rdfs:subClassOf,biolink:subclass_of,hgnc.ttl,not_provided,not_provided
HGNC:3121,http://www.w3.org/2000/01/rdf-schema#subClassOf,SO:0001217,rdfs:subClassOf,biolink:subclass_of,hgnc.ttl,not_provided,not_provided
HGNC:35302,interacts_with,HGNC:3121,RO:00000000,biolink:interacts_with,test.ttl,not_provided,not_provided
38 changes: 19 additions & 19 deletions tests/resources/cm_test2_edges.tsv
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
subject object relation predicate provided_by
HGNC:7670 OMIM:601937 owl:equivalentClass biolink:same_as Test
HGNC:7670 ENSEMBL:ENSG00000124151 owl:equivalentClass biolink:same_as Test
HGNC:7670 NCBIGene:8202 owl:equivalentClass biolink:same_as Test
HGNC:35302 ENSEMBL:ENSG00000284458 owl:equivalentClass biolink:same_as Test
HGNC:35302 NCBIGene:100302240 owl:equivalentClass biolink:same_as Test
OMIM:601937 SO:0001217 rdfs:subClassOf biolink:subclass_of Test
ENSEMBL:ENSG00000284458 SO:0001265 rdfs:subClassOf biolink:subclass_of Test
OMIM:601937 SO:0001217 rdfs:subClassOf biolink:subclass_of Test
OMIM:601937 UniProt:1 RO:0002434 biolink:interacts_with Test
OMIM:601937 UniProt:2 RO:0002434 biolink:interacts_with Test
OMIM:601937 UniProt:3 RO:0002434 biolink:interacts_with Test
OMIM:601937 UniProt:4 RO:0002434 biolink:interacts_with Test
PMID:1 NCBIGene:8202 RO:0000000 biolink:related_to Test
PMID:2 NCBIGene:8202 RO:0000000 biolink:related_to Test
PMID:3 NCBIGene:8202 RO:0000000 biolink:related_to Test
NCBIGene:100302240 SO:0001265 rdfs:subClassOf biolink:subclass_of Test
HGNC:3121 SO:0001217 rdfs:subClassOf biolink:subclass_of Test
HGNC:35302 HGNC:3121 RO:0002434 biolink:interacts_with Test
subject object relation predicate provided_by knowledge_level agent_type
HGNC:7670 OMIM:601937 owl:equivalentClass biolink:same_as Test not_provided not_provided
HGNC:7670 ENSEMBL:ENSG00000124151 owl:equivalentClass biolink:same_as Test not_provided not_provided
HGNC:7670 NCBIGene:8202 owl:equivalentClass biolink:same_as Test not_provided not_provided
HGNC:35302 ENSEMBL:ENSG00000284458 owl:equivalentClass biolink:same_as Test not_provided not_provided
HGNC:35302 NCBIGene:100302240 owl:equivalentClass biolink:same_as Test not_provided not_provided
OMIM:601937 SO:0001217 rdfs:subClassOf biolink:subclass_of Test not_provided not_provided
ENSEMBL:ENSG00000284458 SO:0001265 rdfs:subClassOf biolink:subclass_of Test not_provided not_provided
OMIM:601937 SO:0001217 rdfs:subClassOf biolink:subclass_of Test not_provided not_provided
OMIM:601937 UniProt:1 RO:0002434 biolink:interacts_with Test not_provided not_provided
OMIM:601937 UniProt:2 RO:0002434 biolink:interacts_with Test not_provided not_provided
OMIM:601937 UniProt:3 RO:0002434 biolink:interacts_with Test not_provided not_provided
OMIM:601937 UniProt:4 RO:0002434 biolink:interacts_with Test not_provided not_provided
PMID:1 NCBIGene:8202 RO:0000000 biolink:related_to Test not_provided not_provided
PMID:2 NCBIGene:8202 RO:0000000 biolink:related_to Test not_provided not_provided
PMID:3 NCBIGene:8202 RO:0000000 biolink:related_to Test not_provided not_provided
NCBIGene:100302240 SO:0001265 rdfs:subClassOf biolink:subclass_of Test not_provided not_provided
HGNC:3121 SO:0001217 rdfs:subClassOf biolink:subclass_of Test not_provided not_provided
HGNC:35302 HGNC:3121 RO:0002434 biolink:interacts_with Test not_provided not_provided
16 changes: 8 additions & 8 deletions tests/resources/complex_graph_edges.tsv
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
subject object predicate relation aggregator_knowledge_source
HGNC:10848 NCBIGene:6469 biolink:interacts_with RO:0002434 biogrid
HGNC:10848 HGNC:9398 biolink:interacts_with RO:0002434|RO:0002434|RO:0002434 string
HGNC:10848 HGNC:9399 biolink:interacts_with RO:0002434 string
HGNC:10848 HGNC:16265 biolink:interacts_with RO:0002434 string
HGNC:10848 HGNC:16787 biolink:interacts_with RO:0002434 biogrid
HGNC:10848 GO:0009986 biolink:part_of BFO:0000050 go
HGNC:10848 GO:0097190 biolink:related_to RO:0002331|RO:0002327 go
subject object predicate relation aggregator_knowledge_source knowledge_level agent_type
HGNC:10848 NCBIGene:6469 biolink:interacts_with RO:0002434 biogrid not_provided not_provided
HGNC:10848 HGNC:9398 biolink:interacts_with RO:0002434|RO:0002434|RO:0002434 string not_provided not_provided
HGNC:10848 HGNC:9399 biolink:interacts_with RO:0002434 string not_provided not_provided
HGNC:10848 HGNC:16265 biolink:interacts_with RO:0002434 string not_provided not_provided
HGNC:10848 HGNC:16787 biolink:interacts_with RO:0002434 biogrid not_provided not_provided
HGNC:10848 GO:0009986 biolink:part_of BFO:0000050 go not_provided not_provided
HGNC:10848 GO:0097190 biolink:related_to RO:0002331|RO:0002327 go not_provided not_provided
Loading

0 comments on commit 5ee98e1

Please sign in to comment.