
Construct an ExploreDataset instance from a path, URL, or SE
Source: R/new_explore_dataset.R
new_explore_dataset.RdFactory function: loads the input (or accepts a live
SummarizedExperiment), classifies its shape via
detect_se_shape(), and returns the appropriate concrete subclass.
Value
An object inheriting from ExploreDataset.
Details
Accepted inputs:
A live
SummarizedExperimentobject.A character path to an
.rds/.qs2file.A character path to a
.RDatafile (Mageck EzResult convention).A character path to a directory containing one of the standard SUSHI artefacts (
deResult.rds,rawData_final.rds, etc.).An
http(s)://URL pointing at an.rdsfile.
Examples
# From a live SummarizedExperiment
se <- readRDS(system.file("examples/proteomics/SummarizedExperiment.rds", package = "exploreDE"))
eds <- new_explore_dataset(se)
class(eds)[1]
#> [1] "ExploreDatasetSE_Proteomics"
# From an .h5ad file written by build_explore_h5ad()
path <- build_explore_h5ad(
SummarizedExperiment::assay(se, "rawData"),
out = tempfile(fileext = ".h5ad"),
omics = "proteomics",
coldata = SummarizedExperiment::colData(se)
)
eds_h5ad <- new_explore_dataset(path)
class(eds_h5ad)[1]
#> [1] "ExploreDatasetH5AD"
eds_h5ad$has_de()
#> [1] FALSE