Entering edit mode
Dario Greco
▴
310
@dario-greco-1536
Last seen 10.4 years ago
hi everybody,
thanks a lot for all the useful information you have kindly provided.
here is how i have fixed the problem using most of the info you have
provided:
FIRST STEP:
> temp <- eapply(hgu133aMAP, paste, sep = "", collapse = ";")
> temp <- cbind(names(temp), unlist(temp))
> temp <- AnnBuilder:::getReverseMapping(temp)
> map2Probe <- cbind(names(temp), unlist(temp))
# (as kindly suggested by John Zhang).
# this returns map2Probe which is a matrix of dimension 2512x2 with
cytobande
name in column 1 and probesetIDs in column2.
SECOND STEP:
> library(graph)
> h<-hashtable()
#i have created a hash table using hashtable() from the
library(graph).
THIRD STEP:
> for (i in 1:2512)
> h[[map2Probe[i,1]]]<-unlist(strsplit(map2Probe[i,2], "\\;"))
#this populate the hash table with each element of the matrix
map2Probe using
the element in column 1 as "key" and the element in column "2" as
"value" ("key" and "value" are from Perl terminology) and splits the
"value"
string substituting the ";" between each probesetID.
i am sure there are nicer and quicker ways, but anyway, i hope this
can be
useful to someone in the future.
thanks again,
cheers
Dario
--
Dario Greco
Institute of Biotechnology - University of Helsinki
Building Cultivator II
P.O.Box 56 Viikinkaari 4
FIN-00014 Finland
Office: +358 9 191 58951
Fax: +358 9 191 58952
Mobile: +358 44 023 5780
Lab WebPage:
http://www.biocenter.helsinki.fi/bi/dna-microarray/
Personal WebPage:
http://www.biocenter.helsinki.fi/bi/dna-microarray/dario.htm