Search
Question: annotation: how to use "character" for function 'select()'
0
gravatar for Guido Hooiveld
22 months ago by
Guido Hooiveld2.3k
Wageningen University, Wageningen, the Netherlands
Guido Hooiveld2.3k wrote:

I face a small issue, which likely is easy to solve.....:

I would like to automatically retrieve annotation information for expressionSets, but somehow I don't get it to work...:

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

Any suggestions to solve this?

Thanks,

Guido

 

 > library(affyPLM)
> affy.data <- ReadAffy()
>
> x.norm <- rma(affy.data)
Background correcting
Normalizing
Calculating Expression
>
> head(featureNames(x.norm))
[1] "1415670_at"   "1415671_at"   "1415672_at"   "1415673_at"   "1415674_a_at"
[6] "1415675_at"  
>
> annotation(x.norm)
[1] "mouse4302"
>
> require(paste(annotation(x.norm),".db", sep=""), character.only=TRUE)
Loading required package: mouse4302.db
Loading required package: org.Mm.eg.db

>
> paste(annotation(x.norm),".db", sep="")
[1] "mouse4302.db"
>
> anno.result <- select(paste(annotation(x.norm),".db", sep=""),
+ keys=featureNames(x.norm), columns=c("ENTREZID","SYMBOL"), keytype="PROBEID")
Error in (function (classes, fdef, mtable)  :
  unable to find an inherited method for function ‘select’ for signature ‘"character"’
>

 

ADD COMMENTlink modified 22 months ago by Martin Morgan ♦♦ 22k • written 22 months ago by Guido Hooiveld2.3k
1
gravatar for Martin Morgan
22 months ago by
Martin Morgan ♦♦ 22k
United States
Martin Morgan ♦♦ 22k wrote:

use select(get(paste0(annotation(x.norm), ".db")), ...) or

pkg <- paste0(annotation(x.norm), ".db")
db <- loadNamespace(pkg)[[pkg]]
ADD COMMENTlink modified 22 months ago • written 22 months ago by Martin Morgan ♦♦ 22k

Thanks Martin, working nicely now with get!

ADD REPLYlink written 22 months ago by Guido Hooiveld2.3k
Please log in to add an answer.

Help
Access

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