Question: lapply query MotifDb
gravatar for Ed Siefker
9 months ago by
Ed Siefker220
United States
Ed Siefker220 wrote:

What's going on here? 

> ETVs<-list("ETV1","ETV4", "ETV5")
> query(MotifDb, ETVs[[1]])
MotifDb object of length 1
| Created from downloaded public sources: 2013-Aug-30
| 1 position frequency matrices from 1 source:
|          jolma2013:    1
| 1 organism/s
|           Hsapiens:    1
> lapply(ETVs, query, MotifDb)
Error in (function (classes, fdef, mtable)  :
  unable to find an inherited method for function 'query' for signature '"character"'



> sessionInfo()
R version 3.4.2 (2017-09-28)
Platform: amd64-portbld-freebsd10.3 (64-bit)
Running under: FreeBSD bio 10.3-STABLE FreeBSD 10.3-STABLE #0 r295946=5327704(9.10-STABLE): Wed Aug  3 12:13:26 PDT 2016  amd64

Matrix products: default
LAPACK: /usr/local/lib/R/lib/

[1] C

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

other attached packages:
[1] MotifDb_1.18.0      Biostrings_2.44.2   XVector_0.16.0
[4] IRanges_2.10.5      S4Vectors_0.14.7    BiocGenerics_0.22.1

loaded via a namespace (and not attached):
 [1] lattice_0.20-35            matrixStats_0.52.2
 [3] XML_3.98-1.9               Rsamtools_1.28.0
 [5] GenomicAlignments_1.12.2   bitops_1.0-6
 [7] grid_3.4.2                 GenomeInfoDb_1.12.3
 [9] zlibbioc_1.22.0            Matrix_1.2-11
[11] BiocParallel_1.10.1        tools_3.4.2
[13] Biobase_2.36.2             RCurl_1.95-4.8
[15] DelayedArray_0.2.7         rtracklayer_1.36.5
[17] compiler_3.4.2             GenomicRanges_1.28.6
[19] SummarizedExperiment_1.6.5 GenomeInfoDbData_0.99.0





ADD COMMENTlink modified 9 months ago by Martin Morgan ♦♦ 22k • written 9 months ago by Ed Siefker220
gravatar for Martin Morgan
9 months ago by
Martin Morgan ♦♦ 22k
United States
Martin Morgan ♦♦ 22k wrote:

You're trying to associate the elements of ETvs with tehe second argument, queryString, whereas R is trying to associate the first argument, object

> args(query)
function (object, queryString, = TRUE) 


lapply(ETVs, query, object=MotifDb)

which binds MotifDb to the argument query, leaving the first available argument for the iteration queryString.

ADD COMMENTlink written 9 months ago by Martin Morgan ♦♦ 22k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 193 users visited in the last hour