lapply query MotifDb
1
0
Entering edit mode
Ed Siefker ▴ 230
@ed-siefker-5136
Last seen 4 months ago
United States

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
Hsapiens-jolma2013-ETV1
> 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     root@build.ixsystems.com:/tank/home/nightlies/build-freenas9/_BE/objs/tank/home/nightlies/build-freenas9/_BE/os/sys/FreeNAS.amd64  amd64

Matrix products: default
LAPACK: /usr/local/lib/R/lib/libRlapack.so

locale:
[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
>

 

 

 

 

software error • 507 views
ADD COMMENT
2
Entering edit mode
@martin-morgan-1513
Last seen 6 weeks ago
United States

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, ignore.case = TRUE) 

Try

lapply(ETVs, query, object=MotifDb)

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

ADD COMMENT

Login before adding your answer.

Traffic: 785 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