Humanize an R object

humanize(object, ...)

# S4 method for SummarizedExperiment
humanize(object)

Arguments

object

Object.

...

Additional arguments.

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.

Note

Updated 2019-07-28.

Examples

data( RangedSummarizedExperiment, SingleCellExperiment, 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)
#> Making the rownames and colnames human readable.
#> Returning with the sample names unmodified.
lapply(dimnames(x), head)
#> [[1]] #> [1] "TSPAN6" "TNMD" "DPM1" "SCYL3" "C1orf112" "FGR" #> #> [[2]] #> [1] "sample01" "sample02" "sample03" "sample04" "sample05" "sample06" #>
## SingleCellExperiment ==== object <- SingleCellExperiment lapply(dimnames(object), head)
#> [[1]] #> [1] "gene001" "gene002" "gene003" "gene004" "gene005" "gene006" #> #> [[2]] #> [1] "cell001" "cell002" "cell003" "cell004" "cell005" "cell006" #>
x <- humanize(object)
#> Making the rownames and colnames human readable.
#> SingleCellExperiment contains cells instead of samples. #> Returning with column names unmodified.
lapply(dimnames(x), head)
#> [[1]] #> [1] "TSPAN6" "TNMD" "DPM1" "SCYL3" "C1orf112" "FGR" #> #> [[2]] #> [1] "cell001" "cell002" "cell003" "cell004" "cell005" "cell006" #>