/usr/lib/R/site-library/ensembldb/scripts/checkEnsDbs.R is in r-bioc-ensembldb 2.2.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | #' @description Check EnsDb sqlite files found in the specified folder.
#'
#' @param x \code{character(1)} with the folder in which we're looking for EnsDb
#' objects.
#'
#' @author Johannes Rainer
#'
#' @noRd
#'
#' @examples
#' dir <- "/Users/jo/tmp/ensdb_20"
checkEnsDbs <- function(x) {
edbs <- dir(x, pattern = ".sqlite$", full.names = TRUE)
for (i in 1:length(edbs)) {
message("\nChecking EnsDb: ", basename(edbs[i]))
edb <- EnsDb(edbs[i])
ensembldb:::validateEnsDb(edb)
ensembldb:::checkValidEnsDb(edb)
## Now check also some query calls:
gns <- genes(edb)
message(" version: ", ensembldb:::dbSchemaVersion(edb))
message(" OK")
}
}
|