Skip to content

using semantic sql in R: a vignette #106

Open

Description

@vjcitn

Users of semantic sql will find a reasonable fraction of the jupyter tutorial
reflected in R/RSQLite operations managed in the ontoProc2 package, which
may appear in Bioc 3.23 in April. For now, github-only:

https://vjcitn.github.io/ontoProc2/articles/ontoProc2.html

Activity

  1. github-actions commented on Mar 22, 2026

    @github-actions

    Summary

    This issue is a community contribution from @vjcitn (Vince Carey, Bioconductor core), announcing that the ontoProc2 R package provides an R/RSQLite interface to semantic-sql databases. The package is expected to appear in Bioconductor 3.23 (April 2026), with the current version available on GitHub only.


    What ontoProc2 Does

    ontoProc2 is a modernized Bioconductor package that wraps semantic-sql SQLite databases for use in R workflows. It mirrors a significant portion of the semantic-sql Jupyter tutorial but in R idioms.

    Key capabilities demonstrated in the vignette:

    Feature Details
    DB connection semsql_connect() — connects to pre-built semantic-sql .db files
    Table access Queries the 100+ views/tables via dplyr + DBI
    Label search Pattern matching against rdfs_label (e.g., find "apoptosis" terms)
    Direct edges Subject–predicate–object graph traversal
    Entailed edges Uses entailed_edge table for inferred (transitive closure) relationships
    Cross-ontology Joins across CL, UBERON, GO, RO, CHEBI

    Headline example:

    Find all forebrain neurons — filters 185 CL cell types located in forebrain that are subclasses of neuron, returning specialized neuron types across brain regions.

    R packages used:

    ontoProc2, dplyr, DBI, DT, S7, ontologyIndex

    Ontologies demonstrated:

    Gene Ontology (GO), Cell Ontology (CL), UBERON, Relational Ontology (RO), ChEBI


    Significance

    This is notable as it substantially lowers the barrier for Bioconductor/R users to work with OBO ontologies via semantic-sql — a large community that previously had no first-class path to the semantic-sql infrastructure. The entailed_edge table (pre-computed transitive closures from relation-graph) is particularly powerful for graph traversal in R without needing Python/OAK.

    Worth considering: linking this from the semantic-sql README or tutorial index once the Bioc 3.23 release lands.

  2. cmungall commented on Jul 2, 2026

    @cmungall
    Collaborator

    Thanks for this! Do you want to make a PR to add this to the README?

  3. vjcitn commented on Jul 2, 2026

    @vjcitn
    Author

    I will do this once it passes review in Bioconductor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions