Revision 5dbc7ef13680d99c0990cf5b8a8ba867aeab9ada authored by Alexey Sergushichev on 14 June 2022, 18:30:35 UTC, committed by Alexey Sergushichev on 14 June 2022, 18:30:35 UTC
1 parent 80dee83
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)
})
Computing file changes ...