phenotype_matches: Which phenotypes match filter

View source: R/phenotypes.R

phenotype_matchesR Documentation

Which phenotypes match filter

Description

Determines which of one or more phenotype IDs match the given filter.

Usage

phenotype_matches(x, studies)

Arguments

x

character, vector of phenotype IDs to test. A data.frame is allowed if it has a column labeled "id".

studies

character, vector of study IDs for which to test. A data.frame is allowed if it has a column labeled "id".

Details

At present, the only supported query filter is a list of studies (as their IDs). A phenotype matches if it is linked to at least one of the studies.

Value

a logical vector of the same length as the vector of phenotypes, with TRUE as element if the corresponding phenotype matches, and FALSE otherwise.

Examples

x <- get_phenotypes(entity = "basihyal bone")
nrow(x)
# which of these are in the same study or studies as the first one?
phenotype_matches(x, get_studies(phenotype = x$id[1]))

xu-hong/rphenoscape documentation built on Jan. 28, 2024, 12:22 p.m.