Skip to content

SNORQL audit: update SPARQL queries for owl:sameAs predicate migration #70

@marvinm2

Description

@marvinm2

Summary

Phase 3 (predicate correction) changes the cross-database identifier predicate from skos:exactMatch to owl:sameAs in the generated RDF output. This issue documents the full audit of SPARQL queries that consume these predicates and tracks updates needed in both this repository and the external aopwiki-snorql-extended repository.

Audit Inventory

This repository (AOPWikiRDF) — UPDATED

All occurrences in this repo have been updated from skos:exactMatch to owl:sameAs.

SPARQLQueries/SPARQLqueries (6 occurrences — all updated)

Line Query Context Status
58 Genes mapped with PR — count HGNC IDs via protein ontology links Updated
59 Genes mapped with PR — count Entrez Gene IDs Updated
60 Genes mapped with PR — count Ensembl IDs Updated
68 Gene IDs — count Entrez cross-references Updated
69 Gene IDs — count RefSeq cross-references Updated
70 Gene IDs — count Ensembl cross-references Updated

SPARQLQueries/Federated queries (1 occurrence — updated)

Line Query Context Status
90 Federated query joining KE biological objects with UniProt via AOP DB Updated

AOP-Wiki_stats.ipynb (3 occurrences — all updated)

Cell Query Context Status
26 Chemical identifier type enumeration Updated
29 Key Event biological object type enumeration Updated
30 Biological object entity count by type with labels Updated

hgnc: symbol patterns

No hgnc:SYMBOL patterns found in any SPARQL query files or notebooks. No action needed for HGNC URI format changes in queries.

External: aopwiki-snorql-extended — NEEDS AUDIT

  • Clone and grep aopwiki-snorql-extended for skos:exactMatch patterns
  • Identify all affected queries
  • Update queries to use owl:sameAs
  • Verify queries work with dual-predicate output (both skos:exactMatch and owl:sameAs emitted during transition)
  • Submit PR or update directly

Backward Compatibility

The RDF generation pipeline includes a dual-predicate transition flag (emit_legacy_predicates in PipelineConfig):

  • When True (default): both skos:exactMatch AND owl:sameAs are emitted
  • When False: only owl:sameAs is emitted

This ensures existing SPARQL consumers continue to work during the transition period. The flag should only be set to False after all downstream consumers have been updated.

Timeline

  1. This repo queries: Updated (this commit)
  2. External repo audit: To be completed before disabling legacy predicates
  3. Disable legacy predicates: After all consumers confirmed updated

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions