[BioC] affy ids from gene symbols
Martin Morgan
mtmorgan at fhcrc.org
Fri Mar 7 22:37:21 CET 2008
If you have a list of symbols and don't need to do any pattern
matching,
> syms = c("COPA")
you can just
> library(annotate)
> rmap = revmap(getAnnMap("SYMBOL", "hgu95av2.db"))
> mget(syms, rmap)
$COPA
[1] "36962_at"
Reading Mark's email, I guess there is also
> map = getAnnMap("ALIAS2PROBE", "hgu95av2.db")
> mget(syms, map)
Martin
"James W. MacDonald" <jmacdon at med.umich.edu> writes:
> Say your input vector of symbol names is called 'input'.
>
> complist <- vector("list", length(input))
> names(complist) <- input
> library(hgu133plus2.db) ## note I am using the new package type!!
>
> mapp <- toTable(hgu133plus2SYMBOL)
>
> for(i in 1:length(input)) complist[[i]] <- mapp[grep(paste("^",
> input[i], "$", sep=""), mapp[,2]),1]
>
> Depending on if you want to assume your symbols exactly match the
> annotation package symbols, you might want to add in a tolower(), and
> possibly gsub() to remove things like '(', ')', '-', etc.
>
> Best,
>
> Jim
>
>
>
> IAIN GALLAGHER wrote:
>> Hello list.
>>
>> I would like to return the affymetrix probe ids for a list of genes. Normally I would do this through biomaRt but the service is down all weekend.
>>
>> I know the probe ids can be returned one at a time using regular expressions via
>>
>>> library(hgu133plus2)
>>> symbols<-unlist(as.list(hgu133plus2SYMBOLS))
>>> gene1<-grep('^COPA$', symbols)
>>> symbols[gene1]
>>
>> but I was wondering if there was a way to loop through the list of genes and 'grep' each one individually.
>>
>> Thanks for any advice.
>>
>> Iain
>>
>> [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor at stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>
> --
> James W. MacDonald, M.S.
> Biostatistician
> Affymetrix and cDNA Microarray Core
> University of Michigan Cancer Center
> 1500 E. Medical Center Drive
> 7410 CCGC
> Ann Arbor MI 48109
> 734-647-5623
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
--
Martin Morgan
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109
Location: Arnold Building M2 B169
Phone: (206) 667-2793
More information about the Bioconductor
mailing list