[BioC] affy ids from gene symbols
James W. MacDonald
jmacdon at med.umich.edu
Fri Mar 7 21:49:10 CET 2008
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.
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
>> gene1<-grep('^COPA$', symbols)
> 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.
> [[alternative HTML version deleted]]
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
James W. MacDonald, M.S.
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
Ann Arbor MI 48109
More information about the Bioconductor