inst/unitTests/test_getAnnMap.R

## Set up 
require(org.Hs.eg.db)
require(annotate)
require(RUnit)

## For testing 
test_getAnnMap <- function(){
  ## test for a map that exist
  map <- getAnnMap("CHRLOC","org.Hs.eg.db")
  checkTrue( class(map) == "AnnDbMap" )
  ## and test for a map that does not (but which is available via select)
  map2 <- getAnnMap("ONTOLOGY","org.Hs.eg.db")
  checkTrue( class(map2) == "FlatBimap" )
}

Try the annotate package in your browser

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

annotate documentation built on Nov. 8, 2020, 8:14 p.m.