Wraps any SummarizedExperiment (including DESeqDataSet and
RangedSummarizedExperiment objects, e.g. from recount3 or tximeta)
as a metaXpressStudy so it can enter the metaXpress
pipeline. as(se, "metaXpressStudy") calls this with defaults.
Usage
mx_from_se(
se,
assay_name = "counts",
condition_col = "condition",
accession = NULL,
organism = NULL
)Arguments
- se
A
SummarizedExperimentor subclass.- assay_name
Name of the assay holding raw counts. Defaults to
"counts", falling back to the first assay if absent.- condition_col
Name of the
colDatacolumn holding case/control labels; copied toconditionif different.- accession
Accession ID. Defaults to
metadata(se)$accessionif present, otherwise"local".- organism
Species name. Defaults to
metadata(se)$organismif present, otherwise"Homo sapiens".
Value
A metaXpressStudy object.
Examples
se <- SummarizedExperiment::SummarizedExperiment(
assays = list(counts = matrix(rpois(24, 100), nrow = 4,
dimnames = list(paste0("GENE", 1:4), paste0("S", 1:6)))),
colData = data.frame(dex = rep(c("untrt", "trt"), each = 3))
)
study <- mx_from_se(se, condition_col = "dex")
