tests/testthat/test_getGroupGO.R

context("getGroupGO")

library(org.Hs.eg.db)
data(CeTFdemo)
genes <- unique(c(as.character(NetworkData(CeTFdemo, "network1")[["gene1"]]),
                  as.character(NetworkData(CeTFdemo, "network1")[["gene2"]])))



test_that('getGroupGO throws an error when there are no keyType choice', {
  expect_error(getGroupGO(genes = genes,
                          ont = 'BP',
                          annoPkg = org.Hs.eg.db))
})

test_that('getGroupGO throws an error when there are no annoPkg choice', {
  expect_error(getGroupGO(genes = genes,
                          ont = 'BP',
                          keyType = 'ENSEMBL'))
})
cbiagii/pcitRif documentation built on Feb. 5, 2023, 9:03 p.m.