[BioC] multiple annotations with get()?

Ed Siefker ebs15242 at gmail.com
Fri Oct 11 22:08:13 CEST 2013


Thanks, I figured the answer would be something trivial but nonobvious
like that.  Out of
curiosity, is there a reason get() isn't designed to "do the right
thing" if passed a character
vector of length >1?

On Fri, Oct 11, 2013 at 2:34 PM, Sean Davis <sdavis2 at mail.nih.gov> wrote:
> On Fri, Oct 11, 2013 at 3:31 PM, Ed Siefker <ebs15242 at gmail.com> wrote:
>> I have a list of gene symbols I want to convert into entrez ids.
>> For example, I have a txt file with these symbols:
>>
>> SFRP2
>> MGP
>> COL10A1
>> MSRB3
>>
>> I've loaded Biobase, annotate, and org.Hs.eg.db and done the following:
>>
>> symb<- read.table("example.txt",stringsAsFactors=FALSE)
>>> get(symb, org.Hs.egSYMBOL2EG)
>
> Hi, Ed.
>
> You may want to use mget (multiple get) instead.
>
> Sean
>
>> Error in .checkKeysAreWellFormed(keys) :
>>   keys must be supplied in a character vector with no NAs
>>> class(symb[[1]])
>> [1] "character"
>>> length(symb[[1]])
>> [1] 4
>>> get(symb[[1]], org.Hs.egSYMBOL2EG)
>> [1] "6423"
>>
>> Why is get() only giving me one entrez ID?  Shouldn't it give me a vector
>> of 4 entrez IDs when I pass it a vector of 4 gene symbols?
>>
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor



More information about the Bioconductor mailing list