Humanize an R object
Value
Modified object. Contains human-friendly rownames (e.g. gene symbols instead of stable gene IDs) and colnames (e.g. sample names instead of sample IDs).
Details
This can make dimnames invalid (see make.names()
) and
should only be called prior to writing files to disk.
Examples
data(RangedSummarizedExperiment, package = "AcidTest")
## SummarizedExperiment ====
object <- RangedSummarizedExperiment
lapply(dimnames(object), head)
#> [[1]]
#> [1] "gene001" "gene002" "gene003" "gene004" "gene005" "gene006"
#>
#> [[2]]
#> [1] "sample01" "sample02" "sample03" "sample04" "sample05" "sample06"
#>
x <- humanize(object)
lapply(dimnames(x), head)
#> [[1]]
#> [1] "TSPAN6" "TNMD" "DPM1" "SCYL3" "C1orf112" "FGR"
#>
#> [[2]]
#> [1] "sample01" "sample02" "sample03" "sample04" "sample05" "sample06"
#>