I have been able to use JASPAR2014 via TFBSTools. Upgrading to JASPAR2018 has so far not been so successful. As a fall-back, I thought I would try to access the JASPAR2018.sqlite file using DBI / RSQLite. When I do this, I find that most of the tables are empty.
Here is my "HelloJaspar" code:
---------------------------------------------------------
library(DBI)
libDir = .libPaths()[1]
dbDir = '/home/mds59/R/x86_64-pc-linux-gnu-library/3.2/JASPAR2018/extdata'
jaspar = 'JASPAR2018'
dbName = sprintf('%s/%s/extdata/%s.sqlite',libDir,jaspar,jaspar)
con = dbConnect(RSQLite::SQLite(), dbName)
allTables = dbListTables(con)
tables = list()
for(t in allTables)
{
query = sprintf('select * from %s',t)
df = dbGetQuery(con,query)
tables[[t]] = df
print(sprintf('%s %d %d',t,nrow(df),ncol(df)))
}
dbDisconnect(con)
----------------------------------------------
Here is the resulting output:
[1] "MATRIX 0 5"
[1] "MATRIX_ANNOTATION 0 3"
[1] "MATRIX_DATA 0 4"
[1] "MATRIX_PROTEIN 0 2"
[1] "MATRIX_SPECIES 0 2"
[1] "TAX 0 2"
[1] "TAX_EXT 0 2"
[1] "TFFM 133 9"
[1] "sqlite_sequence 0 2"
-----------------------------------------------
And here is the session info:
R version 3.4.3 (2017-11-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.4 LTS
Matrix products: default
BLAS: /usr/lib/openblas-base/libblas.so.3
LAPACK: /usr/lib/libopenblasp-r0.2.18.so
locale:
[1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8
[5] LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8
[7] LC_PAPER=en_GB.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] DBI_0.7
loaded via a namespace (and not attached):
[1] bit_1.1-12 compiler_3.4.3 pillar_1.2.1 tibble_1.4.2
[5] memoise_1.1.0 Rcpp_0.12.15 bit64_0.9-7 RSQLite_2.0
[9] blob_1.1.0 digest_0.6.15 pkgconfig_2.0.1 rlang_0.2.0
---------------------------------------------------------------
Any insight would be much appreciated.