Encode using run-length encoding
Examples
data(RangedSummarizedExperiment, package = "AcidTest")
## SummarizedExperiment ====
## This works on rowData and colData.
object <- RangedSummarizedExperiment
object <- encode(object)
lapply(
X = SummarizedExperiment::rowData(object),
FUN = class
)
#> $broadClass
#> [1] "Rle"
#> attr(,"package")
#> [1] "S4Vectors"
#>
#> $description
#> [1] "Rle"
#> attr(,"package")
#> [1] "S4Vectors"
#>
#> $geneBiotype
#> [1] "Rle"
#> attr(,"package")
#> [1] "S4Vectors"
#>
#> $geneId
#> [1] "Rle"
#> attr(,"package")
#> [1] "S4Vectors"
#>
#> $geneIdNoVersion
#> [1] "Rle"
#> attr(,"package")
#> [1] "S4Vectors"
#>
#> $geneIdVersion
#> [1] "Rle"
#> attr(,"package")
#> [1] "S4Vectors"
#>
#> $geneName
#> [1] "Rle"
#> attr(,"package")
#> [1] "S4Vectors"
#>
#> $geneSynonyms
#> [1] "CompressedCharacterList"
#> attr(,"package")
#> [1] "IRanges"
#>
#> $ncbiGeneId
#> [1] "CompressedIntegerList"
#> attr(,"package")
#> [1] "IRanges"
#>
#> $seqCoordSystem
#> [1] "Rle"
#> attr(,"package")
#> [1] "S4Vectors"
#>