
Convert experiment to SummarizedExperiment
as_se.Rd
Convert an experiment()
object to a SummarizedExperiment
object.
This function maps the experiment structure to SummarizedExperiment format:
expr_mat
becomes the main assaysample_info
becomescolData
var_info
becomesrowData
meta_data
becomesmetadata
Arguments
- exp
An
experiment()
object to convert.- assay_name
Character string specifying the name for the assay. Default is "counts".
Examples
# Convert toy experiment to SummarizedExperiment
se <- as_se(toy_experiment)
#> Warning: replacing previous import ‘S4Arrays::makeNindexFromArrayViewport’ by ‘DelayedArray::makeNindexFromArrayViewport’ when loading ‘SummarizedExperiment’
se
#> class: SummarizedExperiment
#> dim: 4 6
#> metadata(2): exp_type glycan_type
#> assays(1): counts
#> rownames(4): V1 V2 V3 V4
#> rowData names(3): protein peptide glycan_composition
#> colnames(6): S1 S2 ... S5 S6
#> colData names(2): group batch