tests/testthat/test_topAnat.R

context("expect_output")


test_that("Creating the topAnat object is working", {
  bgee <- Bgee$new(species="Bos_taurus", dataType="rna_seq")
  myTopAnatData <- loadTopAnatData(bgee, stage="UBERON:0000092")
  geneList <- as.factor(c(rep(0, times=85), rep(1, times=15)))
  names(geneList) <- c("ENSBTAG00000000011","ENSBTAG00000000014","ENSBTAG00000000016",
                       "ENSBTAG00000000026","ENSBTAG00000000039","ENSBTAG00000000040",
                       "ENSBTAG00000000042","ENSBTAG00000000050","ENSBTAG00000000056",
                       "ENSBTAG00000000064","ENSBTAG00000000067","ENSBTAG00000000071",
                       "ENSBTAG00000000072","ENSBTAG00000000080","ENSBTAG00000000081",
                       "ENSBTAG00000000084","ENSBTAG00000000091","ENSBTAG00000000099",
                       "ENSBTAG00000000111","ENSBTAG00000000123","ENSBTAG00000000132",
                       "ENSBTAG00000000153","ENSBTAG00000000162","ENSBTAG00000000163",
                       "ENSBTAG00000000169","ENSBTAG00000000179","ENSBTAG00000000197",
                       "ENSBTAG00000000199","ENSBTAG00000000202","ENSBTAG00000000203",
                       "ENSBTAG00000000204","ENSBTAG00000000213","ENSBTAG00000000215",
                       "ENSBTAG00000000223","ENSBTAG00000000224","ENSBTAG00000000225",
                       "ENSBTAG00000000236","ENSBTAG00000000250","ENSBTAG00000000251",
                       "ENSBTAG00000000252","ENSBTAG00000000253","ENSBTAG00000000261",
                       "ENSBTAG00000000274","ENSBTAG00000000277","ENSBTAG00000000279",
                       "ENSBTAG00000000285","ENSBTAG00000000286","ENSBTAG00000000287",
                       "ENSBTAG00000000289","ENSBTAG00000000297","ENSBTAG00000000305",
                       "ENSBTAG00000000312","ENSBTAG00000000328","ENSBTAG00000000335",
                       "ENSBTAG00000000341","ENSBTAG00000000343","ENSBTAG00000000354",
                       "ENSBTAG00000000355","ENSBTAG00000000356","ENSBTAG00000000365",
                       "ENSBTAG00000000372","ENSBTAG00000000379","ENSBTAG00000000380",
                       "ENSBTAG00000000382","ENSBTAG00000000396","ENSBTAG00000000404",
                       "ENSBTAG00000000405","ENSBTAG00000000406","ENSBTAG00000000411",
                       "ENSBTAG00000000425","ENSBTAG00000000434","ENSBTAG00000000435",
                       "ENSBTAG00000000438","ENSBTAG00000000448","ENSBTAG00000000451",
                       "ENSBTAG00000000454","ENSBTAG00000000456","ENSBTAG00000000457",
                       "ENSBTAG00000000459","ENSBTAG00000000462","ENSBTAG00000000469",
                       "ENSBTAG00000000470","ENSBTAG00000000484","ENSBTAG00000000497",
                       "ENSBTAG00000000501","ENSBTAG00000009707","ENSBTAG00000026266",
                       "ENSBTAG00000021992","ENSBTAG00000005353","ENSBTAG00000005333",
                       "ENSBTAG00000006424","ENSBTAG00000026972","ENSBTAG00000010799",
                       "ENSBTAG00000010799","ENSBTAG00000014614","ENSBTAG00000014614",
                       "ENSBTAG00000045757","ENSBTAG00000046332","ENSBTAG00000046332",
                       "ENSBTAG00000008394")
  myTopAnatObject <-  topAnat(myTopAnatData, geneList)
  
  expect_is(myTopAnatObject, "topAnatData")
  expect_message(message("Annotating nodes (Can be long)......"))
  expect_warning(warning("WARNING: Given the low number of genes provided, it is very unlikely that the test will have enough power."))
})

Try the BgeeDB package in your browser

Any scripts or data that you put into this service are public.

BgeeDB documentation built on Nov. 8, 2020, 8:21 p.m.