## ----lkon1,message=FALSE------------------------------------------------------
library(ontoProc2)
library(DT)
ro <- semsql_connect(ontology = "ro")
search_labels(ro, "plasma membrane")

## ----lkct1--------------------------------------------------------------------
data("tag2cn", package = "ontoProc2")
cd8reg <- grep("CD8-positive.*regulatory", tag2cn, value = TRUE)
cd8reg

## ----lkct2, message=FALSE,eval=FALSE------------------------------------------
# prtab <- get_present_pmp(names(cd8reg))
# datatable(prtab)

## ----lkpr1, message=FALSE,eval=FALSE------------------------------------------
# prs <- c("PR:000001094", "PR:000001380")
# clk <- try(cells_with_pmp(prs))
# if (inherits(clk, "try-error")) message("it is necessary to allow a large download of Protein Ontology for this chunk to run") else datatable(clk)

## ----lkentedg, message=FALSE--------------------------------------------------
cl <- semsql_connect(ontology = "cl")
cl
library(dplyr)
tbl(cl@con, "entailed_edge")
tbl(cl@con, "entailed_edge") |> count()

## ----domo---------------------------------------------------------------------
tbl(cl@con, "entailed_edge") |>
  filter(predicate == "RO:0002104") |>
  as.data.frame() |>
  filter(grepl("PR:", object)) |>
  arrange(subject) |>
  datatable()

## ----dodisc-------------------------------------------------------------------
disconnect(cl)
disconnect(ro)

## ----lksess-------------------------------------------------------------------
sessionInfo()

