Add an experiment while preserving the MAE sample map
Source:R/workflow-inputs.R
mae_add_experiment.RdA matrix is wrapped in a SummarizedExperiment. With neither
source_experiment nor sample_map, its column names must be primary MAE
sample identifiers. source_experiment copies an existing experiment's map
when the new value has the same assay-column identifiers.
Usage
mae_add_experiment(
x,
value,
name,
assay_name = "value",
source_experiment = NULL,
sample_map = NULL,
overwrite = FALSE
)Arguments
- x
A
MultiAssayExperimentobject.- value
A feature-by-sample matrix-like object or a
SummarizedExperiment.- name
Name for the new experiment.
- assay_name
Assay name used when
valueis a matrix-like object.- source_experiment
Optional existing experiment whose sample map is copied for the new experiment.
- sample_map
Optional map for the new experiment, with
primaryandcolnamecolumns and an optionalassaycolumn equal toname.- overwrite
Replace an existing experiment of the same name.