translateCounts | R Documentation |
translateCounts
renames counts matrix rownames according to supplied
dict
ionary. Function can handle many to one assignments by taking a
sum or an average over counts
rows. Other types of ambiguous
assignments are not supported.
translateCounts(counts, dict)
counts |
matrix of expression values. |
dict |
named character vector mapping |
matrix of expression values with new rownames.
counts <- matrix(
data = c(5, 4, 3, 2),
nrow = 2,
dimnames = list(
c("ENSG00000130700", "ENSG00000089225"),
c("treatment", "control")
)
)
dict <- c(ENSG00000130700 = "GATA5", ENSG00000089225 = "TBX5")
translateCounts(counts, dict)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.