mget.multi: mget with multiple search keys

Description Usage Arguments Details Value Note Author(s) Examples

Description

lookup keys in a heirarchy of mapping environments, returning a value for each key in the earliest mapping environment possible.

Usage

1

Arguments

x

a vector of search keys

...

named search environments, passed to \.merge.values

Details

For a set of microarray probe ID's, sometimes you want to determine the best ID for that probe, starting with Gene Symbol, if known, falling back to RefSeq ID, UniGene ID, Genbank ID, and finally, just the probe ID. There is thus a heirarchy of annotation tables. This function looks up the search keys in the first mapping environment. If no value is found for some keys, then those keys are searched within the next environment and so it continues until you've run out of mapping environments.

Value

a named vector of values, corresponding to each of the search keys

Note

This function uses the Lkeys of the mapping tables to chain them together. What about an approach that uses the Rkeys, so you could get probe ID's from a vector of heterogeneous ID types.

Author(s)

Mark Cowley, 2011-09-27

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# if( require(org.Hs.eg.db) ) {
#   ids <- c("TP53", "INS", "SST", "12CC4")
#   eg <- mget.multi(ids, revmap(org.Hs.egSYMBOL), org.Hs.egALIAS2EG)
#   eg
#   mget2(eg, org.Hs.egSYMBOL)
# }
if( require(org.Hs.eg.db) && require(illuminaHumanv4.db) ) {
  ids <- c("ILMN_1779356", "ILMN_1666966", "ILMN_1812824", "ILMN_3302350", "ILMN_1343059")
  mget.multi(ids, illuminaHumanv4SYMBOL, illuminaHumanv4REFSEQ, illuminaHumanv4ENSEMBL, illuminaHumanv4ACCNUM)
}

drmjc/microarrays documentation built on May 15, 2019, 2:26 p.m.