as.owl
creates an object (or a list of objects) of type "owl".
The object to be coerced must be a character vector.
The character vector must be a valid OWL expression appropriate for the format.
The object returned will have a type appropriate for the format.
is.owl
tests whether an object is of type "owl"
is.manchester_owl
tests whether an object is of type "owlmn"
as.owl(owlstr, format = "manchester", usesLabels = FALSE)
is.owl(x)
is.manchester_owl(x)
a valid OWL expression for the chosen format
the OWL syntax to which owlstr
conforms - currently only "manchester" (for OWL Manchester Syntax) is allowed
which applies the "owlmn" type to the returned object
logical. If TRUE the owlstr parameter must contain a label-based class expression to be resolved into OWL Manchester expression composed of IRIs. Labels containing spaces must be single-quoted, e.g. 'basihyal bone'. Exact label matches will be resolved to term identifiers. Default is FALSE.
an object to check
as.owl
returns an object of type "owl" and a format specific type such as "owlmn",
or a list of such objects. Note that (at least currently) these are in essence character strings, and are recognizable as such by R.
is.owl
returns TRUE if the object is of type "owl" and FALSE
otherwise.
is.manchester_owl
returns TRUE if the object is of type "owlmn" and FALSE
otherwise.
Create objects of type "owl" that represent OWL expressions.
as.owl("<http://purl.obolibrary.org/obo/VTO_0034991>
or <http://purl.obolibrary.org/obo/VTO_0037519>")
#> [1] "<http://purl.obolibrary.org/obo/VTO_0034991> \n or <http://purl.obolibrary.org/obo/VTO_0037519>"
#> attr(,"class")
#> [1] "owl" "owlmn" "character"
as.owl("Characiformes or Siluriformes", usesLabels = TRUE)
#> [1] "<http://purl.obolibrary.org/obo/VTO_0034991> or <http://purl.obolibrary.org/obo/VTO_0037519>"
#> attr(,"class")
#> [1] "owl" "owlmn" "character"
obj <- as.owl("'fin spine' and ('part of' some 'fin spine')", usesLabels = TRUE)
obj
#> [1] "<http://purl.obolibrary.org/obo/UBERON_4200075> and (<http://purl.obolibrary.org/obo/BFO_0000050> some <http://purl.obolibrary.org/obo/UBERON_4200075>)"
#> attr(,"class")
#> [1] "owl" "owlmn" "character"
is.character(obj)
#> [1] TRUE