File: updateSymbolsToValidKeys.Rd

package info (click to toggle)
r-bioc-annotate 1.84.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,624 kB
  • sloc: makefile: 2
file content (42 lines) | stat: -rw-r--r-- 1,479 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
\name{updateSymbolsToValidKeys}
\alias{updateSymbolsToValidKeys}
\title{Take a list of symbols and translate them into the best possible
  ID for a package.}
\description{
  Given a list of gene symbols and a package, find a valid ID for that
  package.  If there isn't a valid ID, then return the original symbol.
}
\usage{
updateSymbolsToValidKeys(symbols, pkg)
}
\arguments{
  \item{symbols}{A character vector containing gene symbols that you
    wish to try and translate into valid IDs.}
  \item{pkg}{The package name of the chip for which we wish to validate IDs.}
}
\details{
  This is a convenience function for getting from a possibly varied list
  of gene symbols mapped onto something that is a nice concrete ID such as an
  entrez gene ID.  When such an ID cannot be found, the original symbol
  will come back to prevent the loss of any information.
}
\value{
  This function returns a vector of IDs corresponding to the symbols
  that were input.  If the symbols don't have a valid ID, then they come
  back instead.
}
\author{Marc Carlson}
\seealso{\code{\link{isValidKey}}}
\examples{
\dontrun{
  ## one "bad" ID, one that can be mapped onto a valid ID, and a 3rd
  ## which already is a valid ID
  syms <- c("15S_rRNA_2","21S_rRNA_4","15S_rRNA")
  updateSymbolsToValidKeys(syms, "org.Sc.sgd")

  ## 3 symbols and a 4th that will NOT be valid
  syms <- c("MAPK11","P38B","FLJ45465", "altSymbol")
  updateSymbolsToValidKeys(syms, "org.Hs.eg")
}
}
\keyword{manip}