da-bar / JASPAR2020

JASPAR2020 data package
2 stars 2 forks source link

how can I get the whole plant motif in JASPAR2020 #6

Open shangguandong1996 opened 4 years ago

shangguandong1996 commented 4 years ago

According to the JASPAR download result, there will be 530 unique non-redundant plant motif. And when I use the following code to get the plant motif

library(JASPAR2020)
getJasparMotifs2020 <- function(species = "Homo sapiens", 
                                collection = "CORE", ...) {
  opts <- list()
  opts["species"] <- species
  opts["collection"] <- collection
  opts <- c(opts, list(...))
  out <- TFBSTools::getMatrixSet(JASPAR2020::JASPAR2020, opts)
  if (!isTRUE(all.equal(TFBSTools::name(out), names(out)))) 
    names(out) <- paste(names(out), TFBSTools::name(out), sep = "_")
  return(out)
}
jaspar2020_motifs <- getJasparMotifs2020(species = "Arabidopsis thaliana")

I only get the 465 motif, So I am wondering whether I can get the whole motif from JASPAR2020

> jaspar2020_motifs
PFMatrixList of length 465
names(465): MA0121.1_ARR10 MA0549.1_BZR2 ... MA1311.2_WRKY28 MA1329.2_ZHD1

And thanks for your JASPAR2020 package !

Best wishes Guandong Shang

shangguandong1996 commented 4 years ago

I am so sorry, I just find the solution

opts <- list()
opts[["tax_group"]] <- "plants"
opts[["collection"]] <- "CORE"
a <- TFBSTools::getMatrixSet(JASPAR2020::JASPAR2020, opts = opts)

And Thanks again!