fromTo: translation between human gene identifiers

Description Usage Arguments Details Value Note References See Also Examples

View source: R/fromTo.R

Description

Translation between human gene identifiers. For input keys with multiple valid matches, only first match is returned (warning is issued). If no id.in is provided, function will make an informed guess.

Usage

1
2
3
4
5
6
7
8
fromTo(
  key = NULL,
  id.in = NULL,
  id.out = "symbol",
  verbose = getOption("verbose"),
  rough = FALSE,
  all = FALSE
)

Arguments

key

a character vector, gene identifiers to be translated.

id.in

a character, colnames(anno.orgHs) are valid options.

id.out

a character, colnames(anno.orgHs) are valid options.

verbose

logical, whether console information are to returned.

rough

logical, whether to search for more than one match. If FALSE, provides less informative warnings.

all

logical, whether to include all possible matches. length(key) > 10000, setting rough=TRUE increases speed by >100x, but also suppresses warnings.

Details

Gene identifiers are from the org.Hs.eg.db package while biotype were retrieved from biomaRt using useMart(biomart = "ensembl", dataset = "hsapiens_gene_ensembl".

Value

A character vector of same length as key with gene identifiers as specified.

Note

Warnings are issued for keys with none or more than one hit. For keys with more than one possible match, only first match is returned (thus rough).

References

Marc Carlson (). org.Hs.eg.db: Genome wide annotation for Human. R package version 3.2.3.

Steffen Durinck et al. (2009) Mapping identifiers for the integration of genomic datasets with the R/Bioconductor package. Nature Protocols 4, 1184-1191.

See Also

anno.orgHs, org.Hs.eg.db

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 library(Biobase)
 fromTo(rownames(crcTCGAsubset)[1:50], "entrez", "symbol")
 # colnames indicate valid keys
 # example: AKT3 symbol has one valid Entrez mapping but two different ENSG
 anno.orgHs[anno.orgHs$symbol == "AKT3",]
 fromTo("AKT3", "symbol", "ensg") # expect one
 fromTo("AKT3", "symbol", "entrez") # expect one
 fromTo("AKT3", "symbol", "ensg", rough=FALSE) # expect one
 fromTo("AKT3", "symbol", "ensg", all = TRUE) # expect two
 # number of ids with multiple mappings
 sum(table(anno.orgHs$symbol) > 1)
 sum(table(anno.orgHs$entrez) > 1)
 sum(table(anno.orgHs$ensg) > 1)

peterawe/CMScaller documentation built on June 13, 2020, 4:49 a.m.