retrieve labels with names
Usage
# S3 method for class 'owlents'
labels(object, ...)
Note
When multiple labels are present, only first is silently returned. Note that reticulate 1.35.0 made a change that appears to imply that `[0]` can be used to retrieve the desired components. To get ontology tags, use `names(labels(...))`. Note: This function was revised Jul 12 2024 to allow terms that lack labels (like CHEBI references in cl.owl) to be processed, returning NA. The previous functionality which failed is available, not exported, as labelsOLD.owlents.
Examples
clont_path = owl2cache(url="http://purl.obolibrary.org/obo/cl.owl")
#> resource BFC1189 already in cache from http://purl.obolibrary.org/obo/cl.owl
o2 = try(reticulate::import("owlready2"), silent=TRUE)
if (!inherits(o2, "try-error")) {
clont = setup_entities(clont_path)
labels(clont[1:5])
labels(clont[51:55])
}
#> ENSG00000122585 ENSG00000122852 ENSG00000124302 ENSG00000124491 ENSG00000125869
#> "NPY" "SFTPA1" "CHST8" "F13A1" "LAMP5"