Strip gene identifier versions
Source:R/AllGenerics.R
, R/stripGeneVersions-methods.R
stripGeneVersions.Rd
Strip gene identifier versions
Details
Intentionally does not strip transcript versions, if defined in the object.
To perform that action in parallel, use stripVersions
instead.
Examples
data(RangedSummarizedExperiment, package = "AcidTest")
rowData <- SummarizedExperiment::rowData
## SummarizedExperiment ====
object <- RangedSummarizedExperiment
head(rowData(object)[["geneId"]])
#> character-Rle of length 6 with 6 runs
#> Lengths: 1 1 ... 1
#> Values : "ENSG00000000003.15" "ENSG00000000005.6" ... "ENSG00000000938.13"
rownames(object) <- as.character(rowData(object)[["geneId"]])
head(rownames(object))
#> [1] "ENSG00000000003.15" "ENSG00000000005.6" "ENSG00000000419.12"
#> [4] "ENSG00000000457.14" "ENSG00000000460.17" "ENSG00000000938.13"
object <- stripGeneVersions(object)
head(rowData(object)[["geneId"]])
#> character-Rle of length 6 with 6 runs
#> Lengths: 1 1 ... 1
#> Values : "ENSG00000000003.15" "ENSG00000000005.6" ... "ENSG00000000938.13"
head(rownames(object))
#> [1] "ENSG00000000003" "ENSG00000000005" "ENSG00000000419" "ENSG00000000457"
#> [5] "ENSG00000000460" "ENSG00000000938"