tests/testthat/test-add_hpo_id.R

test_that("add_hpo_id works", {

  # Only run locally (failing on GHA only for some unknown reason)
  if (Sys.getenv("GITHUB_ACTION")==""){
    phenotype_to_genes <- load_phenotype_to_genes()
    phenos <- unique(phenotype_to_genes[,-c("hpo_id")])
    phenos <- add_hpo_id(phenos=phenos)
    testthat::expect_equal(sum(is.na(phenos$hpo_id)),0)
  }

})
neurogenomics/HPOExplorer documentation built on April 17, 2025, 9:25 p.m.