R/study.R
get_studies.Rd
Return studies that contain taxa which are members of the optional input taxon, and characters which have phenotype annotations subsumed by the given entity and quality terms.
character. The taxon by which to filter, if any.
character. The anatomical entity by which to filter, if any.
character. The phenotypic quality by which to filter, if any.
character. The phenotype (as its identifier) by which to filter, if any. If provided, matching studies (through its one or more of its character states) must be linked to the given phenotype, or one subsumed by it. This must be provided as identifier, no text search will be performed for resolution.
character or vector of characters. The names of relationships
for anatomical entities to include in addition to subtype (is_a
, rdfs:subClassOf
).
Defaults to "part_of"
. Set to FALSE
to not include any additional relationships.
Otherwise one or more of "part of"
, "historical homologous to"
, and
"serially homologous to"
, or set to TRUE
to include all possible ones. It is
acceptable to use unambiguous prefixes, for example "historical homolog"
.
character. Deprecated, for backwards compatibility defaults to
part of
. Only used if includeRels
is left at its default value.
A data.frame with columns "id" and "label", or an empty list if no matching study was found.
# by default, parts are included
slist <- get_studies(taxon = "Siluridae", entity = "fin")
colnames(slist)
#> [1] "id" "label"
nrow(slist)
#> [1] 7
# can also disable parts
slist <- get_studies(taxon = "Siluridae", entity = "fin", includeRels = FALSE)
nrow(slist)
#> [1] 4
# or filter studies only by entity, including their parts
slist <- get_studies(entity = "pelvic fin", includeRels = c("part of"))
nrow(slist)
#> [1] 127
# or filter studies only by entity, including their parts
slist <- get_studies(entity = "pelvic fin", includeRels = c("part of"))
nrow(slist)
#> [1] 127
# including not only parts but also historical and serial homologs
slist <- get_studies(entity = "pelvic fin",
includeRels = c("part of",
"serially homologous to",
"historical homologous to"))
nrow(slist)
#> [1] 203
# relationship names can be given as prefixes
slist1 <- get_studies(entity = "pelvic fin",
includeRels = c("part", "serial", "historical"))
nrow(slist1) == nrow(slist)
#> [1] TRUE
# or apply no filter, obtaining all studies in the KB
slist <- get_studies()
nrow(slist)
#> [1] 256