| Title: | Interactive Exploration of Differential Expression Results |
|---|---|
| Description: | A Shiny application to help users explore and enjoy their 'omics data, and make publication-quality figures. It shows differential expression results from RNA-seq, proteomics and CRISPR screens as ordination plots, heatmaps, volcano plots, box plots, GO and KEGG pathway views, and ORA and GSEA tables. The app reads AnnData ('.h5ad') files in the exploreDE/1.0 layout, which build_explore_h5ad() writes from counts, sample tables, DE tables and enrichment results, and the SummarizedExperiment results of the FGCZ SUSHI and prolfqua pipelines. App settings are saved and restored as JSON session files. |
| Authors: | Peter Leary [aut] (ORCID: <https://orcid.org/0000-0003-1430-6185>), Witold Wolski [cre] (ORCID: <https://orcid.org/0000-0002-6468-120X>), Functional Genomics Center Zurich [fnd] |
| Maintainer: | Witold Wolski <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.99.0 |
| Built: | 2026-11-14 18:58:11 UTC |
| Source: | https://github.com/BiocStaging/exploreDE |
.h5ad from user-supplied dataThe source-agnostic "bring your own data" constructor. x is a
DESeqDataSet (its counts, colData, rowData and factors are used), a
SummarizedExperiment (every assay under its name, its colData and its
rowData), or the counts themselves (a matrix, or a named list of matrices
such as list(counts=, normalised=, vst=, tpm=)). Assay and matrix names
become layer names: rawData and raw are raw intensities in proteomics,
transformedData the analysis-ready ones. DE tables and pathway statistics
are supplied as arguments. Only counts + coldata + omics are required;
coldata and rowdata, when given, replace those of x.
build_explore_h5ad( x, out, omics, feature_level = NULL, coldata = NULL, rowdata = NULL, de = list(), de_columns = NULL, rowdata_columns = NULL, pathways = list(), enrichment_padj_max = 0.1, factors = NULL, organism = NA_character_, ref_build = NA_character_ )build_explore_h5ad( x, out, omics, feature_level = NULL, coldata = NULL, rowdata = NULL, de = list(), de_columns = NULL, rowdata_columns = NULL, pathways = list(), enrichment_padj_max = 0.1, factors = NULL, organism = NA_character_, ref_build = NA_character_ )
x |
A |
out |
Output |
omics |
Required: |
feature_level |
Optional override of the feature granularity within the
omics — rnaseq |
coldata |
Sample metadata |
rowdata |
Optional per-feature annotation (feature names/symbols/ids and
per-feature pathway annotation columns, e.g. |
de |
Optional named list of DE tables keyed by contrast
( |
de_columns |
Optional DE column overrides:
|
rowdata_columns |
Optional feature column overrides:
|
pathways |
Optional pathway statistics: a named list keyed by contrast
(keys a subset of |
enrichment_padj_max |
p.adjust cut-off applied to clusterProfiler
results before they are stored ( |
factors |
Optional colData columns that are experimental factors (default: all character/factor-typed columns). |
organism, ref_build
|
Optional labels. |
The output path, invisibly.
library(SummarizedExperiment) # A prolfqua proteomics result: one contrast, nested in rowData se <- readRDS(system.file("examples/proteomics/SummarizedExperiment.rds", package = "exploreDE")) de <- as.data.frame(rowData(se)$constrast_B_vs_A) path <- build_explore_h5ad( x = list(raw = assay(se, "rawData"), transformed = assay(se, "transformedData")), out = tempfile(fileext = ".h5ad"), omics = "proteomics", coldata = colData(se), rowdata = de, factors = "G_", de = list(B_vs_A = de) ) file.exists(path) # The SummarizedExperiment itself: rawData and transformedData become the # layers intensities_raw and intensities se_path <- build_explore_h5ad( se, out = tempfile(fileext = ".h5ad"), omics = "proteomics", rowdata = de, factors = "G_", de = list(B_vs_A = de) ) # Counts only counts_only <- build_explore_h5ad( assay(se, "rawData"), out = tempfile(fileext = ".h5ad"), omics = "proteomics", coldata = colData(se) )library(SummarizedExperiment) # A prolfqua proteomics result: one contrast, nested in rowData se <- readRDS(system.file("examples/proteomics/SummarizedExperiment.rds", package = "exploreDE")) de <- as.data.frame(rowData(se)$constrast_B_vs_A) path <- build_explore_h5ad( x = list(raw = assay(se, "rawData"), transformed = assay(se, "transformedData")), out = tempfile(fileext = ".h5ad"), omics = "proteomics", coldata = colData(se), rowdata = de, factors = "G_", de = list(B_vs_A = de) ) file.exists(path) # The SummarizedExperiment itself: rawData and transformedData become the # layers intensities_raw and intensities se_path <- build_explore_h5ad( se, out = tempfile(fileext = ".h5ad"), omics = "proteomics", rowdata = de, factors = "G_", de = list(B_vs_A = de) ) # Counts only counts_only <- build_explore_h5ad( assay(se, "rawData"), out = tempfile(fileext = ".h5ad"), omics = "proteomics", coldata = colData(se) )
ExploreDataset defines the accessor contract that every concrete
subclass must implement. It is not instantiable on its own — calling
ExploreDataset$new() raises an error. Use new_explore_dataset() to
build a concrete instance, or instantiate a subclass directly.
Methods implemented on the base class read only from
private$.config and are inherited unchanged by every subclass.
Methods that touch the storage backend are virtual
(stop("not implemented")) and must be overridden.
An R6 class generator. $new() always errors; the concrete
subclasses return an object inheriting from ExploreDataset.
ExploreDataset$new()Always errors: the base class is abstract. Use new_explore_dataset() or a concrete subclass.
ExploreDataset$new(...)
...Ignored.
ExploreDataset$omics_class()Omics class from the config: "genomics" or "proteomics".
ExploreDataset$omics_class()
ExploreDataset$data_type()Dataset type from the config, e.g. "RNASeq", "CountQC", "CrisprCountQC" or "proteomics".
ExploreDataset$data_type()
ExploreDataset$has_de()TRUE when the dataset has at least one contrast.
ExploreDataset$has_de()
ExploreDataset$has_enrichment()TRUE when the config lists at least one enrichment kind.
ExploreDataset$has_enrichment()
ExploreDataset$organism()Organism from the config, or NA when unknown.
ExploreDataset$organism()
ExploreDataset$ref_build()Reference genome build from the config, or NA when unknown.
ExploreDataset$ref_build()
ExploreDataset$feature_id_kind()What a feature ID denotes, from the config, e.g. "gene", "isoform", "protein",
"peptide", "phospho" or "guide".
ExploreDataset$feature_id_kind()
ExploreDataset$background_expression()Low-signal offset added to expression values before taking log2; from the config, default 10.
ExploreDataset$background_expression()
ExploreDataset$backend_kind()Short tag naming the storage backend ("se", "h5ad" or "parquet"). Implemented by subclasses.
ExploreDataset$backend_kind()
ExploreDataset$backend()The underlying storage object. Implemented by subclasses.
ExploreDataset$backend()
ExploreDataset$samples()Sample metadata as a data.frame, one row per sample, rownames are sample IDs. Implemented by subclasses.
ExploreDataset$samples()
ExploreDataset$sample_ids()Sample IDs: the rownames of samples().
ExploreDataset$sample_ids()
ExploreDataset$n_samples()Number of samples: the number of rows of samples().
ExploreDataset$n_samples()
ExploreDataset$factor_names()Names of the experimental factors from the config; empty when there are none.
ExploreDataset$factor_names()
ExploreDataset$factor_levels()Levels of one experimental factor, from the config.
ExploreDataset$factor_levels(factor)
factorFactor name, one of factor_names().
ExploreDataset$primary_grouping()Name of the factor used as the primary sample grouping, from the config.
ExploreDataset$primary_grouping()
ExploreDataset$secondary_grouping()Name of the secondary grouping factor, or NA when there is none.
ExploreDataset$secondary_grouping()
ExploreDataset$sample_factor()One column of samples(): the values of a factor, one per sample.
ExploreDataset$sample_factor(factor)
factorColumn name in samples(), usually one of factor_names().
ExploreDataset$features()Feature annotation as a data.frame, one row per feature, rownames are feature IDs, with a
display_name column. Implemented by subclasses.
ExploreDataset$features()
ExploreDataset$feature_ids()Feature IDs: the rownames of features().
ExploreDataset$feature_ids()
ExploreDataset$n_features()Number of features: the number of rows of features().
ExploreDataset$n_features()
ExploreDataset$feature_display()Display names of features, named by feature ID.
ExploreDataset$feature_display(ids = NULL)
idsFeature IDs to look up; NULL (default) returns all features.
ExploreDataset$assay_names()Canonical names of the assays this dataset provides. Implemented by subclasses.
ExploreDataset$assay_names()
ExploreDataset$has_assay()TRUE when name is one of assay_names().
ExploreDataset$has_assay(name)
nameCanonical assay name.
ExploreDataset$assay()One assay as a features x samples matrix, optionally subset. Implemented by subclasses.
ExploreDataset$assay(name, features = NULL, samples = NULL)
nameCanonical assay name, one of assay_names().
featuresFeature IDs (rows) to keep; NULL keeps all.
samplesSample IDs (columns) to keep; NULL keeps all.
ExploreDataset$assay_label()Human-readable label for an assay, from the config; name itself when no label is registered.
ExploreDataset$assay_label(name)
nameCanonical assay name.
ExploreDataset$assay_is_log2()TRUE when an assay is on the log2 scale (log2 counts, VST, transformed intensities),
from the config. Errors on an assay the dataset does not have.
ExploreDataset$assay_is_log2(name)
nameCanonical assay name, one of assay_names().
ExploreDataset$raw_assay_name()Canonical name of the raw assay, from the config.
ExploreDataset$raw_assay_name()
ExploreDataset$primary_assay_name()Canonical name of the primary assay, from the config.
ExploreDataset$primary_assay_name()
ExploreDataset$raw_assay()The raw assay: shortcut for assay(raw_assay_name(), ...).
ExploreDataset$raw_assay(...)
...Passed to assay(): features, samples.
ExploreDataset$primary_assay()The primary assay: shortcut for assay(primary_assay_name(), ...).
ExploreDataset$primary_assay(...)
...Passed to assay(): features, samples.
ExploreDataset$contrasts()Names of the DE contrasts, from the config; empty when the dataset has no DE results.
ExploreDataset$contrasts()
ExploreDataset$primary_contrast()Name of the primary contrast, from the config; NA when there are no contrasts.
ExploreDataset$primary_contrast()
ExploreDataset$de()DE result table for one contrast, as a data.frame. Implemented by subclasses.
ExploreDataset$de(contrast)
contrastContrast name, one of contrasts().
ExploreDataset$de_all()DE result tables of all contrasts, as a list named by contrast.
ExploreDataset$de_all()
ExploreDataset$contrast_meta()Metadata list of one contrast from the config: test and reference group, factor, method, thresholds. Errors on an unknown contrast.
ExploreDataset$contrast_meta(contrast)
contrastContrast name, one of contrasts().
ExploreDataset$contrast_label()Display label of a contrast: currently the contrast name itself. Errors on an unknown contrast.
ExploreDataset$contrast_label(contrast)
contrastContrast name, one of contrasts().
ExploreDataset$de_display_extras()Names of extra DE columns shown for display only (e.g. SaintScore), from the config;
empty by default.
ExploreDataset$de_display_extras()
ExploreDataset$has_pvalue()TRUE when the DE table of at least one contrast has a non-missing raw pValue;
FALSE for FDR-only producers such as SAINTexpress.
ExploreDataset$has_pvalue()
ExploreDataset$enrichment_kinds()Enrichment kinds available, from the config: any of "ora" and "gsea".
ExploreDataset$enrichment_kinds()
ExploreDataset$enrichment()Enrichment results of one contrast and kind, as a flat named list of clusterProfiler results. Implemented by subclasses.
ExploreDataset$enrichment(contrast, kind)
contrastContrast name, one of contrasts().
kind"ora" or "gsea".
ExploreDataset$enrichment_input()Inputs for enrichment of one contrast: list(seq_anno, ranked_l2fc, selections).
Implemented by subclasses.
ExploreDataset$enrichment_input(contrast)
contrastContrast name, one of contrasts().
ExploreDataset$enrichment_table()Enrichment results of one contrast and kind as one tidy data.frame, derived from
enrichment(); an empty data.frame when there are none.
ExploreDataset$enrichment_table(contrast, kind)
contrastContrast name, one of contrasts().
kind"ora" or "gsea".
ExploreDataset$enrichment_filter()The p.adjust cut-off applied to the stored enrichment tables, from the config;
NA when none was applied.
ExploreDataset$enrichment_filter()
ExploreDataset$sgrna_to_gene()Named character vector mapping sgRNA IDs to gene names (CRISPR datasets); NULL otherwise.
ExploreDataset$sgrna_to_gene()
ExploreDataset$proteomics_choices()Choices and lookup for the proteomics feature picker, list(choices, lookup); NULL when the
dataset has none.
ExploreDataset$proteomics_choices(kind = c("gene", "protein"))
kind"gene" (default) or "protein".
ExploreDataset$all_pathways()GO terms named in the GO BP, GO MF and GO CC columns of features(), as
"GO:ID term name" strings; empty when those columns are absent.
ExploreDataset$all_pathways()
ExploreDataset$source()Provenance list from the config: backend kind, schema version and build time.
ExploreDataset$source()
ExploreDataset$format()Summary of the dataset (type, dimensions, factors, contrasts, assays, enrichment), one
line per element. print() on the object shows these lines.
ExploreDataset$format(...)
...Ignored.
ExploreDataset$clone()The objects of this class are cloneable with this method.
ExploreDataset$clone(deep = FALSE)
deepWhether to make a deep clone.
se <- readRDS(system.file("examples/proteomics/SummarizedExperiment.rds", package = "exploreDE")) eds <- new_explore_dataset(se) inherits(eds, "ExploreDataset") eds$contrasts() head(eds$de(eds$primary_contrast())) # The base class itself cannot be instantiated try(ExploreDataset$new())se <- readRDS(system.file("examples/proteomics/SummarizedExperiment.rds", package = "exploreDE")) eds <- new_explore_dataset(se) inherits(eds, "ExploreDataset") eds$contrasts() head(eds$de(eds$primary_contrast())) # The base class itself cannot be instantiated try(ExploreDataset$new())
ExploreDataset backend over a canonical AnnData (.h5ad)Reads a canonical exploreDE/1.0 AnnData and implements the accessor
contract inherited from ExploreDataset. Accepts a path to a .h5ad
file or a live anndataR object. This is the backend for user-supplied
data ("bring your own data") and the eventual single backend once
producers emit canonical .h5ad directly.
An R6 class generator; $new() returns an ExploreDatasetH5AD
object.
ExploreDataset -> ExploreDatasetH5AD
ExploreDataset$all_pathways()ExploreDataset$assay_is_log2()ExploreDataset$assay_label()ExploreDataset$background_expression()ExploreDataset$contrast_label()ExploreDataset$contrast_meta()ExploreDataset$contrasts()ExploreDataset$data_type()ExploreDataset$de_all()ExploreDataset$de_display_extras()ExploreDataset$enrichment_filter()ExploreDataset$enrichment_kinds()ExploreDataset$factor_levels()ExploreDataset$factor_names()ExploreDataset$feature_display()ExploreDataset$feature_id_kind()ExploreDataset$feature_ids()ExploreDataset$format()ExploreDataset$has_assay()ExploreDataset$has_de()ExploreDataset$has_enrichment()ExploreDataset$has_pvalue()ExploreDataset$n_features()ExploreDataset$n_samples()ExploreDataset$omics_class()ExploreDataset$organism()ExploreDataset$primary_assay()ExploreDataset$primary_assay_name()ExploreDataset$primary_contrast()ExploreDataset$primary_grouping()ExploreDataset$proteomics_choices()ExploreDataset$raw_assay()ExploreDataset$raw_assay_name()ExploreDataset$ref_build()ExploreDataset$sample_factor()ExploreDataset$sample_ids()ExploreDataset$secondary_grouping()ExploreDataset$sgrna_to_gene()ExploreDataset$source()ExploreDatasetH5AD$new()Read a canonical .h5ad or take a live AnnData, build the config from it, and prepare the
feature and DE tables.
ExploreDatasetH5AD$new(input)
inputAn anndataR AnnData object, or a path to an existing .h5ad file.
ExploreDatasetH5AD$backend()The AnnData parts read at construction, as list(obs, var, layers, varm, uns) of plain R
objects.
ExploreDatasetH5AD$backend()
ExploreDatasetH5AD$backend_kind()Returns "h5ad".
ExploreDatasetH5AD$backend_kind()
ExploreDatasetH5AD$samples()Sample metadata from obs, with the factor_ prefix stripped from column names and a Name
column added when missing.
ExploreDatasetH5AD$samples()
ExploreDatasetH5AD$features()Feature annotation from var, with feature_id and display_name columns, ordered by the
p-value of the primary contrast.
ExploreDatasetH5AD$features()
ExploreDatasetH5AD$de()DE table of one contrast from varm, with the legacy aliases log2Ratio, pValue and fdr
added; an empty data.frame when the slot is missing. Errors on an unknown contrast.
ExploreDatasetH5AD$de(contrast)
contrastContrast name, one of contrasts().
ExploreDatasetH5AD$assay_names()Canonical assay names from the config's assay map whose layer exists; computed assays are always included.
ExploreDatasetH5AD$assay_names()
ExploreDatasetH5AD$assay()One assay as a features x samples matrix (the layer transposed); normalised,
normalised_log2, vst, fpkm and tpm are computed when the config maps them to no layer.
ExploreDatasetH5AD$assay(name, features = NULL, samples = NULL)
nameCanonical assay name, one of assay_names().
featuresFeature IDs (rows) to keep; NULL keeps all.
samplesSample IDs (columns) to keep; NULL keeps all.
ExploreDatasetH5AD$enrichment()Enrichment results of one contrast and kind, rebuilt from uns$enrichment and
uns$enrichment_support.
ExploreDatasetH5AD$enrichment(contrast, kind)
contrastContrast name, one of contrasts().
kind"ora" or "gsea".
ExploreDatasetH5AD$enrichment_table()Tidy enrichment table of one contrast and kind: the table stored in uns$enrichment when
present, otherwise derived from enrichment() as in the base class.
ExploreDatasetH5AD$enrichment_table(contrast, kind)
contrastContrast name, one of contrasts().
kind"ora" or "gsea".
ExploreDatasetH5AD$enrichment_input()Enrichment inputs rebuilt from the DE table: features(), log2 fold changes sorted decreasing,
and up/down feature selections at the contrast's FDR and log2FC thresholds.
ExploreDatasetH5AD$enrichment_input(contrast)
contrastContrast name, one of contrasts().
ExploreDatasetH5AD$clone()The objects of this class are cloneable with this method.
ExploreDatasetH5AD$clone(deep = FALSE)
deepWhether to make a deep clone.
library(SummarizedExperiment) se <- readRDS(system.file("examples/proteomics/SummarizedExperiment.rds", package = "exploreDE")) de <- as.data.frame(rowData(se)$constrast_B_vs_A) path <- tempfile(fileext = ".h5ad") build_explore_h5ad( x = list(raw = assay(se, "rawData"), transformed = assay(se, "transformedData")), out = path, omics = "proteomics", coldata = colData(se), rowdata = de, factors = "G_", de = list(B_vs_A = de) ) eds <- ExploreDatasetH5AD$new(path) eds head(eds$de("B_vs_A"))library(SummarizedExperiment) se <- readRDS(system.file("examples/proteomics/SummarizedExperiment.rds", package = "exploreDE")) de <- as.data.frame(rowData(se)$constrast_B_vs_A) path <- tempfile(fileext = ".h5ad") build_explore_h5ad( x = list(raw = assay(se, "rawData"), transformed = assay(se, "transformedData")), out = path, omics = "proteomics", coldata = colData(se), rowdata = de, factors = "G_", de = list(B_vs_A = de) ) eds <- ExploreDatasetH5AD$new(path) eds head(eds$de("B_vs_A"))
ExploreDatasetSE holds the SummarizedExperiment backend
reference and implements the accessor contract uniformly for every
SE shape. Concrete subclasses (ExploreDatasetSE_RNASeq,
_CountQC, _CrisprCountQC, _Proteomics) override two private
methods only:
.build_config(se) — returns the per-instance config list at
$initialize() time
.prep() — populates private$.features_df, private$.de_dfs,
private$.fid_lookup from the SE
This class is not instantiable on its own — instantiate a concrete subclass instead.
An R6 class generator; the concrete subclasses' $new() returns an
object inheriting from ExploreDatasetSE.
ExploreDataset -> ExploreDatasetSE
ExploreDataset$all_pathways()ExploreDataset$assay_is_log2()ExploreDataset$assay_label()ExploreDataset$background_expression()ExploreDataset$contrast_label()ExploreDataset$contrast_meta()ExploreDataset$contrasts()ExploreDataset$data_type()ExploreDataset$de_all()ExploreDataset$de_display_extras()ExploreDataset$enrichment_filter()ExploreDataset$enrichment_kinds()ExploreDataset$enrichment_table()ExploreDataset$factor_levels()ExploreDataset$factor_names()ExploreDataset$feature_display()ExploreDataset$feature_id_kind()ExploreDataset$feature_ids()ExploreDataset$format()ExploreDataset$has_assay()ExploreDataset$has_de()ExploreDataset$has_enrichment()ExploreDataset$has_pvalue()ExploreDataset$n_features()ExploreDataset$n_samples()ExploreDataset$omics_class()ExploreDataset$organism()ExploreDataset$primary_assay()ExploreDataset$primary_assay_name()ExploreDataset$primary_contrast()ExploreDataset$primary_grouping()ExploreDataset$proteomics_choices()ExploreDataset$raw_assay()ExploreDataset$raw_assay_name()ExploreDataset$ref_build()ExploreDataset$sample_factor()ExploreDataset$sample_ids()ExploreDataset$secondary_grouping()ExploreDataset$sgrna_to_gene()ExploreDataset$source()ExploreDatasetSE$new()Wrap a SummarizedExperiment: store it, build the config from it, and prepare the feature
and DE tables.
ExploreDatasetSE$new(se)
seA SummarizedExperiment.
ExploreDatasetSE$backend()The wrapped SummarizedExperiment.
ExploreDatasetSE$backend()
ExploreDatasetSE$backend_kind()Returns "se".
ExploreDatasetSE$backend_kind()
ExploreDatasetSE$samples()Sample metadata from colData(), with the SUSHI [Factor] suffix stripped from column names,
rownames set to sample IDs, and a Name column added.
ExploreDatasetSE$samples()
ExploreDatasetSE$features()Feature annotation table, prepared from rowData() by the subclass.
ExploreDatasetSE$features()
ExploreDatasetSE$de()DE table of one contrast, prepared from rowData() by the subclass; an empty data.frame when
none was prepared. Errors on an unknown contrast.
ExploreDatasetSE$de(contrast)
contrastContrast name, one of contrasts().
ExploreDatasetSE$assay_names()Canonical assay names from the config's assay map whose SE assay exists; computed assays are always included.
ExploreDatasetSE$assay_names()
ExploreDatasetSE$assay()One assay as a features x samples matrix with rows renamed to feature IDs; normalised_log2,
vst, fpkm and tpm are computed when the config maps them to no SE assay.
ExploreDatasetSE$assay(name, features = NULL, samples = NULL)
nameCanonical assay name, one of assay_names().
featuresFeature IDs (rows) to keep; NULL keeps all.
samplesSample IDs (columns) to keep; NULL keeps all.
ExploreDatasetSE$enrichment()Enrichment results of one kind, read from metadata(se) and flattened to a named list; an empty
list when absent. contrast is not used.
ExploreDatasetSE$enrichment(contrast, kind)
contrastContrast name; not used by this backend.
kind"ora" or "gsea".
ExploreDatasetSE$enrichment_input()Enrichment inputs read from metadata(se)$enrichInput, with NULL fields and no selections when
absent. contrast is not used.
ExploreDatasetSE$enrichment_input(contrast)
contrastContrast name; not used by this backend.
ExploreDatasetSE$clone()The objects of this class are cloneable with this method.
ExploreDatasetSE$clone(deep = FALSE)
deepWhether to make a deep clone.
se <- readRDS(system.file("examples/proteomics/SummarizedExperiment.rds", package = "exploreDE")) eds <- new_explore_dataset(se) inherits(eds, "ExploreDatasetSE") eds$assay_names() dim(eds$raw_assay())se <- readRDS(system.file("examples/proteomics/SummarizedExperiment.rds", package = "exploreDE")) eds <- new_explore_dataset(se) inherits(eds, "ExploreDatasetSE") eds$assay_names() dim(eds$raw_assay())
SummarizedExperiment outputsTop-level rowData(se) carries feature annotations; there are no
DE results. May include a presentFlag / isPresent assay used
as the QC denominator.
Inherits the accessor contract from ExploreDataset via
ExploreDatasetSE; overrides only .build_config() and .prep().
An R6 class generator; $new() returns an
ExploreDatasetSE_CountQC object.
ExploreDataset -> ExploreDatasetSE -> ExploreDatasetSE_CountQC
ExploreDataset$all_pathways()ExploreDataset$assay_is_log2()ExploreDataset$assay_label()ExploreDataset$background_expression()ExploreDataset$contrast_label()ExploreDataset$contrast_meta()ExploreDataset$contrasts()ExploreDataset$data_type()ExploreDataset$de_all()ExploreDataset$de_display_extras()ExploreDataset$enrichment_filter()ExploreDataset$enrichment_kinds()ExploreDataset$enrichment_table()ExploreDataset$factor_levels()ExploreDataset$factor_names()ExploreDataset$feature_display()ExploreDataset$feature_id_kind()ExploreDataset$feature_ids()ExploreDataset$format()ExploreDataset$has_assay()ExploreDataset$has_de()ExploreDataset$has_enrichment()ExploreDataset$has_pvalue()ExploreDataset$n_features()ExploreDataset$n_samples()ExploreDataset$omics_class()ExploreDataset$organism()ExploreDataset$primary_assay()ExploreDataset$primary_assay_name()ExploreDataset$primary_contrast()ExploreDataset$primary_grouping()ExploreDataset$proteomics_choices()ExploreDataset$raw_assay()ExploreDataset$raw_assay_name()ExploreDataset$ref_build()ExploreDataset$sample_factor()ExploreDataset$sample_ids()ExploreDataset$secondary_grouping()ExploreDataset$sgrna_to_gene()ExploreDataset$source()ExploreDatasetSE$assay()ExploreDatasetSE$assay_names()ExploreDatasetSE$backend()ExploreDatasetSE$backend_kind()ExploreDatasetSE$de()ExploreDatasetSE$enrichment()ExploreDatasetSE$enrichment_input()ExploreDatasetSE$features()ExploreDatasetSE$initialize()ExploreDatasetSE$samples()ExploreDatasetSE_CountQC$clone()The objects of this class are cloneable with this method.
ExploreDatasetSE_CountQC$clone(deep = FALSE)
deepWhether to make a deep clone.
library(SummarizedExperiment) de_result <- readRDS(system.file("examples/genomics/deResult.rds", package = "exploreDE")) # A count table without DE results, as SUSHI's CountQC writes it se <- SummarizedExperiment( assays = list(counts = assay(de_result, "counts")), colData = colData(de_result), rowData = rowData(de_result)[, c("gene_id", "gene_name", "description")] ) eds <- ExploreDatasetSE_CountQC$new(se) eds eds$has_de()library(SummarizedExperiment) de_result <- readRDS(system.file("examples/genomics/deResult.rds", package = "exploreDE")) # A count table without DE results, as SUSHI's CountQC writes it se <- SummarizedExperiment( assays = list(counts = assay(de_result, "counts")), colData = colData(de_result), rowData = rowData(de_result)[, c("gene_id", "gene_name", "description")] ) eds <- ExploreDatasetSE_CountQC$new(se) eds eds$has_de()
Identical to ExploreDatasetSE_CountQC plus a sgRNA → gene mapping
parsed from the SE feature IDs, which are assumed to follow the
GENE_<n>_<SEQUENCE> convention.
Inherits .prep() from ExploreDatasetSE_CountQC unchanged.
An R6 class generator; $new() returns an
ExploreDatasetSE_CrisprCountQC object.
ExploreDataset -> ExploreDatasetSE -> ExploreDatasetSE_CountQC -> ExploreDatasetSE_CrisprCountQC
ExploreDataset$all_pathways()ExploreDataset$assay_is_log2()ExploreDataset$assay_label()ExploreDataset$background_expression()ExploreDataset$contrast_label()ExploreDataset$contrast_meta()ExploreDataset$contrasts()ExploreDataset$data_type()ExploreDataset$de_all()ExploreDataset$de_display_extras()ExploreDataset$enrichment_filter()ExploreDataset$enrichment_kinds()ExploreDataset$enrichment_table()ExploreDataset$factor_levels()ExploreDataset$factor_names()ExploreDataset$feature_display()ExploreDataset$feature_id_kind()ExploreDataset$feature_ids()ExploreDataset$format()ExploreDataset$has_assay()ExploreDataset$has_de()ExploreDataset$has_enrichment()ExploreDataset$has_pvalue()ExploreDataset$n_features()ExploreDataset$n_samples()ExploreDataset$omics_class()ExploreDataset$organism()ExploreDataset$primary_assay()ExploreDataset$primary_assay_name()ExploreDataset$primary_contrast()ExploreDataset$primary_grouping()ExploreDataset$proteomics_choices()ExploreDataset$raw_assay()ExploreDataset$raw_assay_name()ExploreDataset$ref_build()ExploreDataset$sample_factor()ExploreDataset$sample_ids()ExploreDataset$secondary_grouping()ExploreDataset$sgrna_to_gene()ExploreDataset$source()ExploreDatasetSE$assay()ExploreDatasetSE$assay_names()ExploreDatasetSE$backend()ExploreDatasetSE$backend_kind()ExploreDatasetSE$de()ExploreDatasetSE$enrichment()ExploreDatasetSE$enrichment_input()ExploreDatasetSE$features()ExploreDatasetSE$initialize()ExploreDatasetSE$samples()ExploreDatasetSE_CrisprCountQC$clone()The objects of this class are cloneable with this method.
ExploreDatasetSE_CrisprCountQC$clone(deep = FALSE)
deepWhether to make a deep clone.
library(SummarizedExperiment) # Guide counts: 4 guides for each of 10 genes, named GENE_<n>_<SEQUENCE> set.seed(1) guides <- sprintf("GENE%d_%d_ACGTACGTACGT", rep(1:10, each = 4), rep(1:4, 10)) counts <- matrix(rpois(40 * 4, 50), nrow = 40, dimnames = list(guides, paste0("S", 1:4))) samples <- S4Vectors::DataFrame( `Condition [Factor]` = rep(c("ctrl", "treated"), each = 2), row.names = colnames(counts), check.names = FALSE ) se <- SummarizedExperiment(assays = list(counts = counts), colData = samples) eds <- ExploreDatasetSE_CrisprCountQC$new(se) eds head(eds$sgrna_to_gene())library(SummarizedExperiment) # Guide counts: 4 guides for each of 10 genes, named GENE_<n>_<SEQUENCE> set.seed(1) guides <- sprintf("GENE%d_%d_ACGTACGTACGT", rep(1:10, each = 4), rep(1:4, 10)) counts <- matrix(rpois(40 * 4, 50), nrow = 40, dimnames = list(guides, paste0("S", 1:4))) samples <- S4Vectors::DataFrame( `Condition [Factor]` = rep(c("ctrl", "treated"), each = 2), row.names = colnames(counts), check.names = FALSE ) se <- SummarizedExperiment(assays = list(counts = counts), colData = samples) eds <- ExploreDatasetSE_CrisprCountQC$new(se) eds head(eds$sgrna_to_gene())
SummarizedExperiment outputsReads from a prolfqua-derived SE. Top-level rowData(se) is sparse;
feature metadata and per-contrast DE statistics live nested inside
rowData(se)$constrast_<name> DataFrames (note the SUSHI typo is
preserved). The first contrast is the source of truth for feature
metadata. feature_id is built from protein_Id (+ site /
peptide_Id to disambiguate), and the assay matrices' rownames are
remapped via .fid_lookup since SE rownames do not match the built
feature_ids.
Inherits the accessor contract from ExploreDataset via
ExploreDatasetSE; overrides .build_config() and .prep().
An R6 class generator; $new() returns an
ExploreDatasetSE_Proteomics object.
ExploreDataset -> ExploreDatasetSE -> ExploreDatasetSE_Proteomics
ExploreDataset$all_pathways()ExploreDataset$assay_is_log2()ExploreDataset$assay_label()ExploreDataset$background_expression()ExploreDataset$contrast_label()ExploreDataset$contrast_meta()ExploreDataset$contrasts()ExploreDataset$data_type()ExploreDataset$de_all()ExploreDataset$de_display_extras()ExploreDataset$enrichment_filter()ExploreDataset$enrichment_kinds()ExploreDataset$enrichment_table()ExploreDataset$factor_levels()ExploreDataset$factor_names()ExploreDataset$feature_display()ExploreDataset$feature_id_kind()ExploreDataset$feature_ids()ExploreDataset$format()ExploreDataset$has_assay()ExploreDataset$has_de()ExploreDataset$has_enrichment()ExploreDataset$has_pvalue()ExploreDataset$n_features()ExploreDataset$n_samples()ExploreDataset$omics_class()ExploreDataset$organism()ExploreDataset$primary_assay()ExploreDataset$primary_assay_name()ExploreDataset$primary_contrast()ExploreDataset$primary_grouping()ExploreDataset$proteomics_choices()ExploreDataset$raw_assay()ExploreDataset$raw_assay_name()ExploreDataset$ref_build()ExploreDataset$sample_factor()ExploreDataset$sample_ids()ExploreDataset$secondary_grouping()ExploreDataset$sgrna_to_gene()ExploreDataset$source()ExploreDatasetSE$assay()ExploreDatasetSE$assay_names()ExploreDatasetSE$backend()ExploreDatasetSE$backend_kind()ExploreDatasetSE$de()ExploreDatasetSE$enrichment()ExploreDatasetSE$enrichment_input()ExploreDatasetSE$features()ExploreDatasetSE$initialize()ExploreDatasetSE$samples()ExploreDatasetSE_Proteomics$clone()The objects of this class are cloneable with this method.
ExploreDatasetSE_Proteomics$clone(deep = FALSE)
deepWhether to make a deep clone.
se <- readRDS(system.file("examples/proteomics/SummarizedExperiment.rds", package = "exploreDE")) eds <- ExploreDatasetSE_Proteomics$new(se) eds head(eds$feature_ids()) head(eds$de(eds$primary_contrast()))se <- readRDS(system.file("examples/proteomics/SummarizedExperiment.rds", package = "exploreDE")) eds <- ExploreDatasetSE_Proteomics$new(se) eds head(eds$feature_ids()) head(eds$de(eds$primary_contrast()))
SummarizedExperiment outputsReads from a SUSHI ezApp DESeq2 / edgeR / limma result. Top-level
rowData(se) carries feature annotations plus inline DE columns for
the single contrast described by param$comparison. Optional
pre-computed enrichResult / gseaResult objects live in
metadata(se).
Inherits the accessor contract from ExploreDataset via
ExploreDatasetSE; overrides only .build_config() and .prep().
An R6 class generator; $new() returns an
ExploreDatasetSE_RNASeq object.
ExploreDataset -> ExploreDatasetSE -> ExploreDatasetSE_RNASeq
ExploreDataset$all_pathways()ExploreDataset$assay_is_log2()ExploreDataset$assay_label()ExploreDataset$background_expression()ExploreDataset$contrast_label()ExploreDataset$contrast_meta()ExploreDataset$contrasts()ExploreDataset$data_type()ExploreDataset$de_all()ExploreDataset$de_display_extras()ExploreDataset$enrichment_filter()ExploreDataset$enrichment_kinds()ExploreDataset$enrichment_table()ExploreDataset$factor_levels()ExploreDataset$factor_names()ExploreDataset$feature_display()ExploreDataset$feature_id_kind()ExploreDataset$feature_ids()ExploreDataset$format()ExploreDataset$has_assay()ExploreDataset$has_de()ExploreDataset$has_enrichment()ExploreDataset$has_pvalue()ExploreDataset$n_features()ExploreDataset$n_samples()ExploreDataset$omics_class()ExploreDataset$organism()ExploreDataset$primary_assay()ExploreDataset$primary_assay_name()ExploreDataset$primary_contrast()ExploreDataset$primary_grouping()ExploreDataset$proteomics_choices()ExploreDataset$raw_assay()ExploreDataset$raw_assay_name()ExploreDataset$ref_build()ExploreDataset$sample_factor()ExploreDataset$sample_ids()ExploreDataset$secondary_grouping()ExploreDataset$sgrna_to_gene()ExploreDataset$source()ExploreDatasetSE$assay()ExploreDatasetSE$assay_names()ExploreDatasetSE$backend()ExploreDatasetSE$backend_kind()ExploreDatasetSE$de()ExploreDatasetSE$enrichment()ExploreDatasetSE$enrichment_input()ExploreDatasetSE$features()ExploreDatasetSE$initialize()ExploreDatasetSE$samples()ExploreDatasetSE_RNASeq$clone()The objects of this class are cloneable with this method.
ExploreDatasetSE_RNASeq$clone(deep = FALSE)
deepWhether to make a deep clone.
se <- readRDS(system.file("examples/genomics/deResult.rds", package = "exploreDE")) eds <- ExploreDatasetSE_RNASeq$new(se) eds eds$contrasts() head(eds$de(eds$primary_contrast())) eds$enrichment_kinds()se <- readRDS(system.file("examples/genomics/deResult.rds", package = "exploreDE")) eds <- ExploreDatasetSE_RNASeq$new(se) eds eds$contrasts() head(eds$de(eds$primary_contrast())) eds$enrichment_kinds()
Opens the app locally. With no file, it starts on the landing page, where
you can upload one or more .h5ad files built with build_explore_h5ad()
or load the demo dataset. With file, it opens straight into that dataset;
with several files, the first opens in the tabs and the contrasts of the
others join it in the Multi DE tabs.
exploreDE(file = NULL, ...)exploreDE(file = NULL, ...)
file |
Optional dataset: a |
... |
Passed to |
A SummarizedExperiment opens as new_explore_dataset() classifies it: a
SUSHI RNA-seq or prolfqua proteomics result with all its tabs, any other as
a Count QC dataset. To see the DE tabs for another SummarizedExperiment,
build an .h5ad from it with build_explore_h5ad() and open that.
Called to run the app; returns the value passed to shiny::stopApp()
when the app stops (usually NULL), as shiny::runApp() does.
if (interactive()) { exploreDE() exploreDE("my_data.h5ad") exploreDE(c("design1.h5ad", "design2.h5ad")) se <- readRDS(system.file("examples/proteomics/SummarizedExperiment.rds", package = "exploreDE")) exploreDE(se) }if (interactive()) { exploreDE() exploreDE("my_data.h5ad") exploreDE(c("design1.h5ad", "design2.h5ad")) se <- readRDS(system.file("examples/proteomics/SummarizedExperiment.rds", package = "exploreDE")) exploreDE(se) }
ExploreDataset instance from a path, URL, or SEFactory function: loads the input (or accepts a live
SummarizedExperiment), classifies its shape via
detect_se_shape(), and returns the appropriate concrete subclass.
new_explore_dataset(input)new_explore_dataset(input)
input |
See above. |
Accepted inputs:
A live SummarizedExperiment object.
A character path to an .rds / .qs2 file.
A character path to a .RData file (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 .rds file.
An object inheriting from ExploreDataset.
# From a live SummarizedExperiment se <- readRDS(system.file("examples/proteomics/SummarizedExperiment.rds", package = "exploreDE")) eds <- new_explore_dataset(se) class(eds)[1] # 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] eds_h5ad$has_de()# From a live SummarizedExperiment se <- readRDS(system.file("examples/proteomics/SummarizedExperiment.rds", package = "exploreDE")) eds <- new_explore_dataset(se) class(eds)[1] # 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] eds_h5ad$has_de()
ExploreDataset instanceChecks subclass-agnostic invariants by walking the accessor API:
validate_explore_dataset(eds, strict = TRUE)validate_explore_dataset(eds, strict = TRUE)
eds |
An |
strict |
If |
The runtime class is a concrete ExploreDataset subclass — not
the abstract base or intermediate.
Cross-references resolve: factor_names() are columns of
samples(); every contrasts() entry has a working de() with
the effect_log2fc and score_fdr columns;
primary_grouping() is a member of factor_names();
primary_contrast() is in contrasts() (or NA).
Assays: raw_assay_name() and primary_assay_name() are in
assay_names(), every assay has a log2 fact (assay_is_log2()), and the raw assay's rownames / colnames agree
with feature_ids() / sample_ids().
Cost is proportional to the number of contrasts (one de(c)
round-trip each) plus a small constant of other accessor calls.
Invisibly, TRUE on success (strict mode); or
list(ok = logical(1), errors = character) (non-strict mode).
se <- readRDS(system.file("examples/proteomics/SummarizedExperiment.rds", package = "exploreDE")) eds <- new_explore_dataset(se) validate_explore_dataset(eds) validate_explore_dataset(eds, strict = FALSE)se <- readRDS(system.file("examples/proteomics/SummarizedExperiment.rds", package = "exploreDE")) eds <- new_explore_dataset(se) validate_explore_dataset(eds) validate_explore_dataset(eds, strict = FALSE)