Add severity Tier for each HPO ID, in accordance with the rating system provided by Lazarin et al (2014). In order of increasing severity:
Tier 4 Reduced fertility
Tier 3 Sensory impairment: vision, Immunodeficiency/cancer, Sensory impairment: hearing, Sensory impairment: touch, other (including pain), Mental illness, Dysmorphic features
Tier 2 Shortened life span: premature adulthood, Impaired mobility, Internal physical malformation
Tier 1 Shortened life span: infancy, Shortened life span: childhood/adolescence, Intellectual disability
add_tier(
phenos,
all.x = TRUE,
include_disease_characteristics = TRUE,
auto_assign = TRUE,
hpo = get_hpo(),
keep_tiers = NULL,
verbose = TRUE
)
dataframe of phenotypes and values / parameters.
logical; if TRUE
, then extra rows will be added to the
output, one for each row in x
that has no matching row in y
.
These rows will have 'NA's in those columns that are usually filled with values
from y
. The default is FALSE
, so that only rows with data from both
x
and y
are included in the output.
Include phenotypes
that
are also high-level include_disease_characteristics
.
Automatically assing HPO IDs to Tiers by conducting regex searches for keywords that appear in the term name, or the names of its descendants or ancestors.
Human Phenotype Ontology object, loaded from ontologyIndex.
Tiers from hpo_tiers to keep.
Include NA
if you wish to retain phenotypes that
do not have any Tier assignment.
Print messages.
phenos data.table with extra column
phenos <- example_phenos()
#> ℹ All local files already up-to-date!
phenos2 <- add_tier(phenos = phenos)
#> Annotating phenos with Tiers.