as.SummarizedExperiment | R Documentation |
SummarizedExperiment
.Improved S4 methods for reliably coercing objects that extend
RangedSummarizedExperiment
to a standard SummarizedExperiment
, that
doesn't drop rowData()
.
as.SummarizedExperiment(x, ...)
## S4 method for signature 'RangedSummarizedExperiment'
as.SummarizedExperiment(x)
## S4 method for signature 'SummarizedExperiment'
as.SummarizedExperiment(x)
x |
Object. |
... |
Additional arguments. |
SummarizedExperiment
.
Updated 2022-05-04.
suppressPackageStartupMessages(library(SummarizedExperiment))
data(RangedSummarizedExperiment, package = "AcidTest")
## RangedSummarizedExperiment ===
## Current S4 coercion drops row metadata.
names(metadata(rowRanges(RangedSummarizedExperiment)))
se <- as(RangedSummarizedExperiment, "SummarizedExperiment")
names(metadata(rowData(se)))
## Our alternate S3 method preserves the metadata.
se <- as.SummarizedExperiment(RangedSummarizedExperiment)
names(metadata(rowData(se)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.