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.

get_studies(
  taxon = NA,
  entity = NA,
  quality = NA,
  phenotype = NA,
  includeRels = c("part of"),
  relation = c("part of")
)

Arguments

taxon

character. The taxon by which to filter, if any.

entity

character. The anatomical entity by which to filter, if any.

quality

character. The phenotypic quality by which to filter, if any.

phenotype

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.

includeRels

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".

relation

character. Deprecated, for backwards compatibility defaults to part of. Only used if includeRels is left at its default value.

Value

A data.frame with columns "id" and "label", or an empty list if no matching study was found.

Examples

# 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