trouble accessing JASPAR2018.sqlite
1
0
Entering edit mode
@mdshapiro-15113
Last seen 6.8 years ago

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.

jaspar rsqlite • 1.0k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 3 days ago
United States

It seems to work for me:

> library(TFBSTools)
> library(JASPAR2018)
> opts <- list()
opts[["species"]] <- 9606
opts[["name"]] <- "RUNX1"
opts[["type"]] <- "SELEX"
opts[["all_versions"]] <- TRUE
PFMatrixList <- getMatrixSet(JASPAR2018, opts)

> PFMatrixList
PFMatrixList of length 1
names(1): MA0002.1

In addition:

> library(DBI)
> library(RSQLite)
> con <- dbConnect(SQLite(), JASPAR2018@db)

> sapply(dbListTables(con), function(x) dbGetQuery(con, paste("select count(*) from", x, ";")))
$`MATRIX.count(*)`
[1] 2404

$`MATRIX_ANNOTATION.count(*)`
[1] 16485

$`MATRIX_DATA.count(*)`
[1] 122616

$`MATRIX_PROTEIN.count(*)`
[1] 1993

$`MATRIX_SPECIES.count(*)`
[1] 2240

$`TAX.count(*)`
[1] 525711

$`TAX_EXT.count(*)`
[1] 23100

$`TFFM.count(*)`
[1] 133

 

ADD COMMENT
0
Entering edit mode
> sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 16299)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] RSQLite_2.0          DBI_0.7              JASPAR2018_1.0.0    
[4] TFBSTools_1.16.0     BiocInstaller_1.28.0

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.14                lattice_0.20-35            
 [3] GO.db_3.5.0                 png_0.1-7                  
 [5] Rsamtools_1.30.0            Biostrings_2.46.0          
 [7] gtools_3.5.0                digest_0.6.13              
 [9] R6_2.2.2                    GenomeInfoDb_1.14.0        
[11] plyr_1.8.4                  stats4_3.4.3               
[13] httr_1.3.1                  ggplot2_2.2.1              
[15] zlibbioc_1.24.0             rlang_0.1.4                
[17] lazyeval_0.2.1              annotate_1.56.1            
[19] blob_1.1.0                  S4Vectors_0.16.0           
[21] R.utils_2.6.0               R.oo_1.21.0                
[23] Matrix_1.2-12               splines_3.4.3              
[25] BiocParallel_1.12.0         readr_1.1.1                
[27] stringr_1.2.0               CNEr_1.14.0                
[29] RCurl_1.95-4.8              bit_1.1-12                 
[31] munsell_0.4.3               DelayedArray_0.4.1         
[33] compiler_3.4.3              rtracklayer_1.38.2         
[35] pkgconfig_2.0.1             seqLogo_1.44.0             
[37] BiocGenerics_0.24.0         DirichletMultinomial_1.20.0
[39] SummarizedExperiment_1.8.0  KEGGREST_1.18.0            
[41] tibble_1.3.4                GenomeInfoDbData_1.0.0     
[43] IRanges_2.12.0              matrixStats_0.52.2         
[45] XML_3.98-1.9                TFMPvalue_0.0.6            
[47] GenomicAlignments_1.14.1    bitops_1.0-6               
[49] R.methodsS3_1.7.1           grid_3.4.3                 
[51] xtable_1.8-2                gtable_0.2.0               
[53] magrittr_1.5                scales_0.5.0               
[55] stringi_1.1.6               XVector_0.18.0             
[57] reshape2_1.4.3              tools_3.4.3                
[59] bit64_0.9-7                 BSgenome_1.46.0            
[61] Biobase_2.38.0              poweRlaw_0.70.1            
[63] hms_0.4.0                   parallel_3.4.3             
[65] AnnotationDbi_1.40.0        colorspace_1.3-2           
[67] GenomicRanges_1.30.0        caTools_1.17.1             
[69] memoise_1.1.0               VGAM_1.0-5                
ADD REPLY

Login before adding your answer.

Traffic: 340 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6