https://github.com/ctlab/phantasus
Tip revision: fc1777a6ebdabf2ea4e225a2337f0d9f9ae151a8 authored by Alexey Sergushichev on 08 April 2021, 15:17:58 UTC
Update .travis.yml
Update .travis.yml
Tip revision: fc1777a
testAnnotationByDb.R
context("Convert by AnnotationDb")
library(Biobase)
library(data.table)
test_that("AnnotationbyDb works with delete version", {
options(phantasusCacheDir = system.file("testdata/", package = "phantasus"))
test_file <- system.file("testdata/counts_versioned_ids.gct", package="phantasus")
if (test_file == ""){
stop("test counts file doesn't exists")
}
es <- read.gct(test_file)
dbName <- "sample_mouse_db.sqlite"
columnName <- "id"
columnType <- "ENSEMBL"
keyType <- "SYMBOL"
otherOptions <- list(deleteDotVersion = FALSE)
expect_error(convertByAnnotationDB(es, dbName, columnName, columnType, keyType, otherOptions))
otherOptions <- list(deleteDotVersion = TRUE)
symbols <- jsonlite::fromJSON(convertByAnnotationDB(es, dbName, columnName, columnType, keyType, otherOptions))
expect_gt(sum(!is.na(symbols)),0)
})