
Convert experiment to SummarizedExperiment
as_se.RdConvert an experiment() object to a SummarizedExperiment object.
This function maps the experiment structure to SummarizedExperiment format:
expr_matbecomes the main assaysample_infobecomescolDatavar_infobecomesrowDatameta_databecomesmetadata
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)
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