This is a test version of Biostars. For the public version, visit https://www.biostars.org.
JASPAR2024_getMatrixSet error

Hello,

I am a beginner in bioinformatics and I have encountered an issue while trying to work with the TFBSTools and JASPAR2024 libraries in R. Despite having installed both JASPAR2024 and the latest version of TFBSTools (version 1.40.0), I'm facing a problem when attempting to fetch motifs from the JASPAR database using the getMatrixSet function. Here is the code I've used:

library(TFBSTools)
library(JASPAR2024)
library(BSgenome.Hsapiens.UCSC.hg38)

opts <- list()
opts[["species"]] <- 'Homo sapiens'
motifs <- getMatrixSet(JASPAR2024, opts)

Error in (function (classes, fdef, mtable) :
  unable to find an inherited method for function ‘getMatrixSet’ for signature ‘"function"’

Thank you

jaspar2024 getmatrixset

Same error here :-(

JASPAR2024 called by DumpJaspar(), monaLisa library :

library(monaLisa)
dumpJaspar(filename = "MA0886.2.txt", pkg = "JASPAR2024",
opts = list(ID = c("MA0886.2")));

Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘getMatrixSet’ for signature ‘"function"’

Please do not add answers unless you're answering the top level question. Instead, use Add Comment or Add Reply as appropriate. I've moved your post to the right location this time, please be more careful in the future.

1 answer

Try this:

#Read the motifs
library(JASPAR2024) 
library(TFBSTools)
jaspar <- JASPAR2024()
sq24 <- RSQLite::dbConnect(RSQLite::SQLite(), db(jaspar))
motifs24 <- TFBSTools::getMatrixSet(sq24, list(species = "Homo sapiens", collection = "CORE"))

Log in to answer this question.