filter_: Filter functions

filter_R Documentation

Filter functions

Description

Functions to filter data.table objects.

Usage

filter_descendants(
  phenos,
  keep_descendants = NULL,
  remove_descendants = NULL,
  hpo = get_hpo()
)

Arguments

phenos

A data.table containing HPO IDs and other metadata.

keep_descendants

Terms whose descendants should be kept (including themselves). Set to NULL (default) to skip this filtering step.

remove_descendants

Terms whose descendants should be removed (including themselves). Set to NULL (default) to skip this filtering step.

hpo

Human Phenotype Ontology object, loaded from get_ontology.

Value

Filtered data.

data.table of phenotypes, with additional columns: "ancestor", "ancestor_id"

Functions

  • filter_descendants(): filter_ Filter descendants

    Subset a phenos data.table to only descendants of an ancestor HPO ID term.

Examples

phenos <- make_phenos_dataframe(ancestor = "Neurodevelopmental delay")
phenos2 <- filter_descendants(phenos = phenos,
                              keep_descendants = "Motor delay")

neurogenomics/HPOExplorer documentation built on July 17, 2024, 3:12 p.m.