Description Usage Arguments Details Value References See Also Examples
View source: R/replaceGeneId.R
Translate matrix rownames between gene identifiers.
1 | replaceGeneId(emat, id.in = "symbol", id.out = "entrez")
|
emat |
a numeric matrix with row features and sample columns. |
id.in |
a character, gene symbol, entrez and ENSG are valid options. |
id.out |
a character, gene symbol, entrez and ENSG are valid options. |
Gene identifiers are from the
org.Hs.eg.db
package.
A matrix with rownames gene identifier as specified in id.out.
For duplicates, rownames for rows with lower standard deviation are added a
number to make unique.
make.unique
are used to handle NA and duplicates in output.
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.
anno.orgHs
, fromTo
,
org.Hs.eg.db
, sd
make.unique
1 2 3 4 5 6 7 8 9 10 11 12 13 | # example data
library(Biobase)
x.entrez <- Biobase::exprs(crcTCGAsubset)
# rownames are entrez
head(rownames(x.entrez))
# translate to gene symbols
x.symbol <- replaceGeneId(x.entrez, id.in="entrez", id.out="symbol")
head(rownames(x.symbol))
x.entrez2 <- replaceGeneId(x.symbol, id.in="symbol", id.out="entrez")
# translations are not cycle consistent
table(rownames(x.entrez2) == rownames(x.entrez))
# matrix values are not changed
all(x.entrez == x.entrez2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.