diff --git a/.Rbuildignore b/.Rbuildignore index 3c05a31..0da5d1c 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -15,3 +15,5 @@ ^Makefile$ ^make$ ^\.githooks$ +^CITATION\.cff$ +^SKILLS\.md$ diff --git a/DESCRIPTION b/DESCRIPTION index b9a2bdb..72d4539 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -9,7 +9,6 @@ Description: A Shiny application to help users explore and enjoy their 'omics da License: MIT + file LICENSE Encoding: UTF-8 Imports: - devtools, shiny, shinydashboard, tidyverse, @@ -68,7 +67,9 @@ Imports: openxlsx, readr, tibble, - xml2 + xml2, + dendextend, + rlang Suggests: DOSE, testthat (>= 3.0.0), @@ -78,12 +79,10 @@ Suggests: arrow, knitr, rmarkdown, - dendextend, - rlang, - withr + withr, + devtools VignetteBuilder: knitr Config/testthat/edition: 3 Remotes: github::scverse/anndataR -Config/roxygen2/version: 8.0.0 -RoxygenNote: 7.3.3 +Config/roxygen2/version: 8.1.1 diff --git a/NAMESPACE b/NAMESPACE index 0b308a0..fa463ab 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -11,3 +11,6 @@ export(build_explore_h5ad) export(exploreDE) export(new_explore_dataset) export(validate_explore_dataset) +importFrom(R6,R6Class) +importFrom(dplyr,"%>%") +importFrom(rlang,.data) diff --git a/NEWS.md b/NEWS.md index c89795d..5d424ce 100644 --- a/NEWS.md +++ b/NEWS.md @@ -75,10 +75,12 @@ and a minimal Python writer) and `exploreDE-session-2.md` (session files). - README, the bring-your-own-data vignette, and the AI skill now cover writing files outside R, opening files from a link, and saving sessions. +- The help pages of the `ExploreDataset*` classes describe every public method and its arguments. ## Removed - The App Data tab (deprecated). +- `devtools` as a dependency: installing exploreDE no longer installs it. `dendextend` and `rlang`, which the package code calls, move from Suggests to Imports. # exploreDE 3.8.0 diff --git a/R/ExploreDataset.R b/R/ExploreDataset.R index 98fe0a1..8078283 100644 --- a/R/ExploreDataset.R +++ b/R/ExploreDataset.R @@ -15,44 +15,74 @@ ExploreDataset <- R6::R6Class( classname = "ExploreDataset", public = list( + #' @description Always errors: the base class is abstract. Use [new_explore_dataset()] or a concrete subclass. + #' @param ... Ignored. initialize = function(...) { stop("ExploreDataset is abstract. ", "Use new_explore_dataset() or one of the concrete subclasses.") }, # ---- identity (config-only) ------------------------------------------- + #' @description Omics class from the config: `"genomics"` or `"proteomics"`. omics_class = function() private$.config$omics_class, + #' @description Dataset type from the config, e.g. `"RNASeq"`, `"CountQC"`, `"CrisprCountQC"` or `"proteomics"`. data_type = function() private$.config$data_type, + #' @description `TRUE` when the dataset has at least one contrast. has_de = function() length(self$contrasts()) > 0L, + #' @description `TRUE` when the config lists at least one enrichment kind. has_enrichment = function() { length(private$.config$enrichment_kinds %||% character()) > 0L }, + #' @description Organism from the config, or `NA` when unknown. organism = function() private$.config$organism %||% NA_character_, + #' @description Reference genome build from the config, or `NA` when unknown. ref_build = function() private$.config$ref_build %||% NA_character_, + #' @description What a feature ID denotes, from the config, e.g. `"gene"`, `"isoform"`, `"protein"`, + #' `"peptide"`, `"phospho"` or `"guide"`. feature_id_kind = function() private$.config$feature_id_kind, + #' @description Low-signal offset added to expression values before taking log2; from the config, default 10. background_expression = function() { private$.config$background_expression %||% 10 }, + #' @description Short tag naming the storage backend (`"se"`, `"h5ad"` or `"parquet"`). Implemented by subclasses. backend_kind = function() stop("not implemented"), + #' @description The underlying storage object. Implemented by subclasses. backend = function() stop("not implemented"), # ---- samples (samples() virtual; rest derived) ------------------------ + #' @description Sample metadata as a data.frame, one row per sample, rownames are sample IDs. + #' Implemented by subclasses. samples = function() stop("not implemented"), + #' @description Sample IDs: the rownames of `samples()`. sample_ids = function() rownames(self$samples()), + #' @description Number of samples: the number of rows of `samples()`. n_samples = function() nrow(self$samples()), + #' @description Names of the experimental factors from the config; empty when there are none. factor_names = function() private$.config$factors %||% character(), + #' @description Levels of one experimental factor, from the config. + #' @param factor Factor name, one of `factor_names()`. factor_levels = function(factor) { private$.config$factor_levels[[factor]] }, + #' @description Name of the factor used as the primary sample grouping, from the config. primary_grouping = function() private$.config$primary_grouping, # NA when the dataset has no secondary grouping (e.g. proteomics, or # SUSHI params with grouping2Name blank). + #' @description Name of the secondary grouping factor, or `NA` when there is none. secondary_grouping = function() private$.config$secondary_grouping %||% NA_character_, + #' @description One column of `samples()`: the values of a factor, one per sample. + #' @param factor Column name in `samples()`, usually one of `factor_names()`. sample_factor = function(factor) self$samples()[[factor]], # ---- features (features() virtual; rest derived) ---------------------- + #' @description Feature annotation as a data.frame, one row per feature, rownames are feature IDs, with a + #' `display_name` column. Implemented by subclasses. features = function() stop("not implemented"), + #' @description Feature IDs: the rownames of `features()`. feature_ids = function() rownames(self$features()), + #' @description Number of features: the number of rows of `features()`. n_features = function() nrow(self$features()), + #' @description Display names of features, named by feature ID. + #' @param ids Feature IDs to look up; `NULL` (default) returns all features. feature_display = function(ids = NULL) { f <- self$features() if (is.null(ids)) { @@ -62,14 +92,23 @@ ExploreDataset <- R6::R6Class( }, # ---- assays (assay_names + assay virtual; rest derived) --------------- + #' @description Canonical names of the assays this dataset provides. Implemented by subclasses. assay_names = function() stop("not implemented"), + #' @description `TRUE` when `name` is one of `assay_names()`. + #' @param name Canonical assay name. has_assay = function(name) name %in% self$assay_names(), + #' @description One assay as a features x samples matrix, optionally subset. Implemented by subclasses. + #' @param name Canonical assay name, one of `assay_names()`. + #' @param features Feature IDs (rows) to keep; `NULL` keeps all. + #' @param samples Sample IDs (columns) to keep; `NULL` keeps all. assay = function(name, features = NULL, samples = NULL) { stop("not implemented") }, # Human-readable label for an assay (used by UI dropdowns). # Subclass populates private$.config$assay_labels at build_config() time. # Falls back to the canonical name if no label is registered. + #' @description Human-readable label for an assay, from the config; `name` itself when no label is registered. + #' @param name Canonical assay name. assay_label = function(name) { labels <- private$.config$assay_labels %||% list() if (name %in% names(labels)) { @@ -77,20 +116,34 @@ ExploreDataset <- R6::R6Class( } name }, + #' @description Canonical name of the raw assay, from the config. raw_assay_name = function() private$.config$raw_assay_name, + #' @description Canonical name of the primary assay, from the config. primary_assay_name = function() private$.config$primary_assay_name, + #' @description The raw assay: shortcut for `assay(raw_assay_name(), ...)`. + #' @param ... Passed to `assay()`: `features`, `samples`. raw_assay = function(...) self$assay(self$raw_assay_name(), ...), + #' @description The primary assay: shortcut for `assay(primary_assay_name(), ...)`. + #' @param ... Passed to `assay()`: `features`, `samples`. primary_assay = function(...) self$assay(self$primary_assay_name(), ...), # ---- DE (de() virtual; rest config-only) ------------------------------ + #' @description Names of the DE contrasts, from the config; empty when the dataset has no DE results. contrasts = function() { names(private$.config$contrast_meta) %||% character() }, + #' @description Name of the primary contrast, from the config; `NA` when there are no contrasts. primary_contrast = function() private$.config$primary_contrast, + #' @description DE result table for one contrast, as a data.frame. Implemented by subclasses. + #' @param contrast Contrast name, one of `contrasts()`. de = function(contrast) stop("not implemented"), + #' @description DE result tables of all contrasts, as a list named by contrast. de_all = function() { setNames(lapply(self$contrasts(), self$de), self$contrasts()) }, + #' @description Metadata list of one contrast from the config: test and reference group, factor, method, + #' thresholds. Errors on an unknown contrast. + #' @param contrast Contrast name, one of `contrasts()`. contrast_meta = function(contrast) { stopifnot(contrast %in% self$contrasts()) private$.config$contrast_meta[[contrast]] @@ -100,6 +153,8 @@ ExploreDataset <- R6::R6Class( # _RNASeq$.build_config; supplied directly by prolfqua for proteomics), # so this helper just validates and returns it. Modules wanting prose # ("diff vs undiff") for plot titles can `gsub("_vs_", " vs ", x)`. + #' @description Display label of a contrast: currently the contrast name itself. Errors on an unknown contrast. + #' @param contrast Contrast name, one of `contrasts()`. contrast_label = function(contrast) { stopifnot(contrast %in% self$contrasts()) contrast @@ -108,11 +163,15 @@ ExploreDataset <- R6::R6Class( # Extra DE columns to surface for display only (beyond log2Ratio/pValue/fdr) # — e.g. SAINTexpress's SaintScore. Default none; backends declaring a # mapping (H5AD) override via config. Names are also the DE-table labels. + #' @description Names of extra DE columns shown for display only (e.g. `SaintScore`), from the config; + #' empty by default. de_display_extras = function() private$.config$de_display_extras %||% character(), # Does any contrast carry a usable RAW p-value? FALSE for FDR-only producers # (SAINTexpress), which the p-value-type selectors use to degrade to # FDR-only rather than plotting all-NA -log10(pValue). + #' @description `TRUE` when the DE table of at least one contrast has a non-missing raw `pValue`; + #' `FALSE` for FDR-only producers such as SAINTexpress. has_pvalue = function() { if (!self$has_de()) { return(FALSE) @@ -127,10 +186,18 @@ ExploreDataset <- R6::R6Class( }, # ---- enrichment (all virtual except enrichment_kinds) ----------------- + #' @description Enrichment kinds available, from the config: any of `"ora"` and `"gsea"`. enrichment_kinds = function() { private$.config$enrichment_kinds %||% character() }, + #' @description Enrichment results of one contrast and kind, as a flat named list of clusterProfiler results. + #' Implemented by subclasses. + #' @param contrast Contrast name, one of `contrasts()`. + #' @param kind `"ora"` or `"gsea"`. enrichment = function(contrast, kind) stop("not implemented"), + #' @description Inputs for enrichment of one contrast: `list(seq_anno, ranked_l2fc, selections)`. + #' Implemented by subclasses. + #' @param contrast Contrast name, one of `contrasts()`. enrichment_input = function(contrast) stop("not implemented"), # Tidy enrichment as a plain data.frame — the form that does NOT require @@ -142,6 +209,10 @@ ExploreDataset <- R6::R6Class( # file ever written, including those with no uns$enrichment block. Backends # holding a stored tidy mirror should override and prefer it. # See plans/exploredelight/enrichment_detach_plan.md. + #' @description Enrichment results of one contrast and kind as one tidy data.frame, derived from + #' `enrichment()`; an empty data.frame when there are none. + #' @param contrast Contrast name, one of `contrasts()`. + #' @param kind `"ora"` or `"gsea"`. enrichment_table = function(contrast, kind) { objs <- self$enrichment(contrast, kind) if (!length(objs)) { @@ -166,12 +237,18 @@ ExploreDataset <- R6::R6Class( # were derived live and nothing was filtered. Callers that let a user raise # a GO threshold need this: without it an absent row is ambiguous between # "cut by the writer", "not significant" and "never run". + #' @description The `p.adjust` cut-off applied to the stored enrichment tables, from the config; + #' `NA` when none was applied. enrichment_filter = function() { private$.config$enrichment_filter %||% NA_real_ }, # ---- domain extras (config-only) -------------------------------------- + #' @description Named character vector mapping sgRNA IDs to gene names (CRISPR datasets); `NULL` otherwise. sgrna_to_gene = function() private$.config$sgrna_to_gene, + #' @description Choices and lookup for the proteomics feature picker, `list(choices, lookup)`; `NULL` when the + #' dataset has none. + #' @param kind `"gene"` (default) or `"protein"`. proteomics_choices = function(kind = c("gene", "protein")) { kind <- match.arg(kind) private$.config$proteomics[[kind]] @@ -183,6 +260,8 @@ ExploreDataset <- R6::R6Class( # the GO BP / GO MF / GO CC columns in features(), so works for any # backend. Returns character(0) when those columns are absent (proteomics, # CountQC without GO annotations). + #' @description 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. all_pathways = function() { f <- self$features() go_cols <- intersect(c("GO BP", "GO MF", "GO CC"), colnames(f)) @@ -209,9 +288,13 @@ ExploreDataset <- R6::R6Class( }, # ---- provenance -------------------------------------------------------- + #' @description Provenance list from the config: backend kind, schema version and build time. source = function() private$.config$source, # ---- lifecycle --------------------------------------------------------- + #' @description Print a summary of the dataset (type, dimensions, factors, contrasts, assays, enrichment) + #' and return the object invisibly. + #' @param ... Ignored. print = function(...) { cat("<", class(self)[1], " (", self$backend_kind(), ")>\n", sep = "") cat(" data_type: ", self$data_type(), "\n", sep = "") diff --git a/R/ExploreDatasetH5AD.R b/R/ExploreDatasetH5AD.R index 9ecdb4a..5c0a3b0 100644 --- a/R/ExploreDatasetH5AD.R +++ b/R/ExploreDatasetH5AD.R @@ -112,6 +112,10 @@ ExploreDatasetH5AD <- R6::R6Class( inherit = ExploreDataset, public = list( + #' @description Read a canonical `.h5ad` or take a live AnnData, build the config from it unless one is given, + #' and prepare the feature and DE tables. + #' @param input An `anndataR` AnnData object, or a path to an existing `.h5ad` file. + #' @param config Optional pre-built config list; built from the AnnData when `NULL`. initialize = function(input, config = NULL) { adata <- if (inherits(input, "AbstractAnnData")) { input @@ -131,11 +135,16 @@ ExploreDatasetH5AD <- R6::R6Class( invisible(self) }, + #' @description The AnnData parts read at construction, as `list(obs, var, layers, varm, uns)` of plain R + #' objects. backend = function() { list(obs = private$.obs, var = private$.var, layers = private$.layers, varm = private$.varm, uns = private$.uns) }, + #' @description Returns `"h5ad"`. backend_kind = function() "h5ad", + #' @description Sample metadata from `obs`, with the `factor_` prefix stripped from column names and a `Name` + #' column added when missing. samples = function() { cd <- private$.obs colnames(cd) <- .h5ad_strip_factor(colnames(cd)) @@ -153,13 +162,20 @@ ExploreDatasetH5AD <- R6::R6Class( cd }, + #' @description Feature annotation from `var`, with `feature_id` and `display_name` columns, ordered by the + #' p-value of the primary contrast. features = function() private$.features_df, + #' @description 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. + #' @param contrast Contrast name, one of `contrasts()`. de = function(contrast) { stopifnot(contrast %in% self$contrasts()) private$.de_dfs[[contrast]] %||% data.frame() }, + #' @description Canonical assay names from the config's assay map whose layer exists; computed assays are + #' always included. assay_names = function() { keys <- names(private$.config$assay_map %||% list()) keys[vapply( @@ -172,6 +188,11 @@ ExploreDatasetH5AD <- R6::R6Class( )] }, + #' @description 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. + #' @param name Canonical assay name, one of `assay_names()`. + #' @param features Feature IDs (rows) to keep; `NULL` keeps all. + #' @param samples Sample IDs (columns) to keep; `NULL` keeps all. assay = function(name, features = NULL, samples = NULL) { layer_key <- private$.config$assay_map[[name]] m <- if (!is.null(layer_key)) { @@ -199,6 +220,10 @@ ExploreDatasetH5AD <- R6::R6Class( m }, + #' @description Enrichment results of one contrast and kind: decoded from the serialised objects in older files, + #' otherwise rebuilt from `uns$enrichment` and `uns$enrichment_support`. + #' @param contrast Contrast name, one of `contrasts()`. + #' @param kind `"ora"` or `"gsea"`. enrichment = function(contrast, kind) { stopifnot(kind %in% c("ora", "gsea")) stopifnot(contrast %in% self$contrasts()) @@ -226,6 +251,10 @@ ExploreDatasetH5AD <- R6::R6Class( # Prefer the stored tidy mirror; fall back to the base class, which derives # it from the native objects. So a new file costs no decode at all, and an # old one still works. + #' @description 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. + #' @param contrast Contrast name, one of `contrasts()`. + #' @param kind `"ora"` or `"gsea"`. enrichment_table = function(contrast, kind) { stopifnot(kind %in% c("ora", "gsea")) slot <- sub("^de_", "", private$.contrast_slot[[contrast]] %||% contrast) @@ -238,6 +267,9 @@ ExploreDatasetH5AD <- R6::R6Class( # Canonical spec drops enrichInput; reconstruct on demand from varm + var # so the (accessor-migrated) pathway modules have what they need. + #' @description 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. + #' @param contrast Contrast name, one of `contrasts()`. enrichment_input = function(contrast) { de <- tryCatch(self$de(contrast), error = function(e) NULL) if (is.null(de) || !nrow(de)) { diff --git a/R/ExploreDatasetParquet.R b/R/ExploreDatasetParquet.R index 51ba486..d153638 100644 --- a/R/ExploreDatasetParquet.R +++ b/R/ExploreDatasetParquet.R @@ -117,6 +117,10 @@ ExploreDatasetParquet <- R6::R6Class( inherit = ExploreDatasetH5AD, public = list( + #' @description Read the parquet directory (manifest, obs, var, layers, varm, uns), build the config unless one + #' is given, prepare the feature and DE tables, and warn when the source `.h5ad` has changed since export. + #' @param input Path to the parquet directory. + #' @param config Optional pre-built config list; derived from `uns.json` when omitted. initialize = function(input, config = NULL) { if (!is.character(input) || length(input) != 1L || !dir.exists(input)) { stop("ExploreDatasetParquet: input must be a path to a parquet directory") @@ -170,6 +174,7 @@ ExploreDatasetParquet <- R6::R6Class( invisible(self) }, + #' @description Returns `"parquet"`. backend_kind = function() "parquet", # Hydrate-then-delegate. The payloads live in their own files so that @@ -177,22 +182,31 @@ ExploreDatasetParquet <- R6::R6Class( # 13 MB of a 29 MB export). The first call for a contrast pulls the blobs # in, after which the inherited implementation runs against exactly the # structure it expects — no forked decode logic. + #' @description Enrichment results of one contrast and kind: reads the contrast's enrichment payload files on + #' first use, then defers to the `.h5ad` backend's implementation. + #' @param contrast Contrast name, one of `contrasts()`. + #' @param kind `"ora"` or `"gsea"`. enrichment = function(contrast, kind) { private$.hydrate_enrichment(contrast) super$enrichment(contrast, kind) }, # The manifest as written, for diagnostics. + #' @description The parsed `manifest.json` of the parquet directory. manifest = function() private$.manifest, # Where the Rust process put the files. Useful for diagnostics and for the # app to clean up its temp dir on exit. + #' @description Path of the parquet directory. source_dir = function() private$.dir, # Full content check against the source .h5ad, as opposed to the cheap # size/mtime comparison done at load. Returns TRUE when the recorded md5 # still matches, FALSE when it does not, and NA when there is nothing to # check against (a live AnnData was exported, or the source has moved). + #' @description Compare the md5 of the source `.h5ad` with the one recorded in the manifest: `TRUE` when it + #' matches, `FALSE` when not, `NA` when there is nothing to check against. + #' @param path Path to the source `.h5ad`; `NULL` (default) uses the path recorded in the manifest. verify_source = function(path = NULL) { src <- private$.manifest$source %||% list() p <- path %||% src$path @@ -207,6 +221,7 @@ ExploreDatasetParquet <- R6::R6Class( # the package is there (this class also runs on the cluster, under test) # and an empty vector when it is not, which is what the callers already # treat as "this dataset has no GO annotation". + #' @description GO terms as in the base class, but an empty vector when clusterProfiler is not installed. all_pathways = function() { if (!requireNamespace("clusterProfiler", quietly = TRUE)) { return(character(0)) diff --git a/R/ExploreDatasetSE.R b/R/ExploreDatasetSE.R index df507e9..190c92c 100644 --- a/R/ExploreDatasetSE.R +++ b/R/ExploreDatasetSE.R @@ -20,6 +20,10 @@ ExploreDatasetSE <- R6::R6Class( inherit = ExploreDataset, public = list( + #' @description Wrap a `SummarizedExperiment`: store it, build the config from it unless one is given, and + #' prepare the feature and DE tables. + #' @param se A `SummarizedExperiment`. + #' @param config Optional pre-built config list; built from `se` by the subclass when `NULL`. initialize = function(se, config = NULL) { stopifnot(inherits(se, "SummarizedExperiment")) private$.se <- se @@ -28,7 +32,9 @@ ExploreDatasetSE <- R6::R6Class( invisible(self) }, + #' @description The wrapped `SummarizedExperiment`. backend = function() private$.se, + #' @description Returns `"se"`. backend_kind = function() "se", # samples(): uniform colData read. SUSHI's `[Factor]` suffix is stripped @@ -39,6 +45,8 @@ ExploreDatasetSE <- R6::R6Class( # A `Name` column is added matching the legacy converters: factor-typed # for genomics, plain character for proteomics. Rownames are colnames(se) # where available, else cd$Name / cd$name fallback. + #' @description Sample metadata from `colData()`, with the SUSHI ` [Factor]` suffix stripped from column names, + #' rownames set to sample IDs, and a `Name` column added. samples = function() { cd <- data.frame(SummarizedExperiment::colData(private$.se), check.names = FALSE, stringsAsFactors = FALSE) colnames(cd) <- gsub(" \\[.*", "", colnames(cd)) @@ -85,13 +93,19 @@ ExploreDatasetSE <- R6::R6Class( cd }, + #' @description Feature annotation table, prepared from `rowData()` by the subclass. features = function() private$.features_df, + #' @description DE table of one contrast, prepared from `rowData()` by the subclass; an empty data.frame when + #' none was prepared. Errors on an unknown contrast. + #' @param contrast Contrast name, one of `contrasts()`. de = function(contrast) { stopifnot(contrast %in% self$contrasts()) private$.de_dfs[[contrast]] %||% data.frame() }, + #' @description Canonical assay names from the config's assay map whose SE assay exists; computed assays are + #' always included. assay_names = function() { backend_keys <- SummarizedExperiment::assayNames(private$.se) keys <- names(private$.config$assay_map %||% list()) @@ -105,6 +119,11 @@ ExploreDatasetSE <- R6::R6Class( )] }, + #' @description 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. + #' @param name Canonical assay name, one of `assay_names()`. + #' @param features Feature IDs (rows) to keep; `NULL` keeps all. + #' @param samples Sample IDs (columns) to keep; `NULL` keeps all. assay = function(name, features = NULL, samples = NULL) { v <- private$.config$assay_map[[name]] m <- if (!is.null(v)) { @@ -140,6 +159,10 @@ ExploreDatasetSE <- R6::R6Class( m }, + #' @description Enrichment results of one kind, read from `metadata(se)` and flattened to a named list; an empty + #' list when absent. `contrast` is not used. + #' @param contrast Contrast name; not used by this backend. + #' @param kind `"ora"` or `"gsea"`. enrichment = function(contrast, kind) { stopifnot(kind %in% c("ora", "gsea")) loc <- private$.config$enrichment_locator[[kind]]$se @@ -153,6 +176,9 @@ ExploreDatasetSE <- R6::R6Class( eds_flatten_cp_results(obj) }, + #' @description Enrichment inputs read from `metadata(se)$enrichInput`, with `NULL` fields and no selections when + #' absent. `contrast` is not used. + #' @param contrast Contrast name; not used by this backend. enrichment_input = function(contrast) { ei <- S4Vectors::metadata(private$.se)$enrichInput if (is.null(ei)) { diff --git a/R/banana_mode.R b/R/banana_mode.R index dece314..c197aca 100644 --- a/R/banana_mode.R +++ b/R/banana_mode.R @@ -311,7 +311,7 @@ banana_layer <- function(data, x, y, fdr_col, facet_col = "Feature", px = 16L) { d$bx <- x ggtext::geom_richtext( data = d, - mapping = ggplot2::aes(x = bx, y = by, label = md), + mapping = ggplot2::aes(x = .data$bx, y = .data$by, label = .data$md), vjust = -0.1, inherit.aes = FALSE, fill = NA, diff --git a/R/build_explore_h5ad.R b/R/build_explore_h5ad.R index 64df05d..ee22eac 100644 --- a/R/build_explore_h5ad.R +++ b/R/build_explore_h5ad.R @@ -389,7 +389,7 @@ # feature_level: detection-with-override, then level-aware feature_id. level <- .resolve_feature_level(omics_type, rd, feature_level) fid <- .build_fid_for_level(level, base_ids, gid, sym, rd, id_col = explicit_id_col) - id2fid <- setNames(fid, base_ids) # user identifiers -> canonical fid + id2fid <- stats::setNames(fid, base_ids) # user identifiers -> canonical fid # -- obs (samples) : factors get "factor_" prefix; others carried plain ----- obs <- .as_df_keep_names(coldata) @@ -655,19 +655,19 @@ for (rn in names(results)) { obj <- results[[rn]] if (is.data.frame(obj)) { - enr_tidy[[slot]] <- c(enr_tidy[[slot]], setNames(list(obj), rn)) + enr_tidy[[slot]] <- c(enr_tidy[[slot]], stats::setNames(list(obj), rn)) } else if (!.contains_native_cp(obj)) { tidy <- .enr_tidy_from_native(obj, method = rn) if (!is.null(tidy)) { - enr_tidy[[slot]] <- c(enr_tidy[[slot]], setNames(list(tidy), rn)) + enr_tidy[[slot]] <- c(enr_tidy[[slot]], stats::setNames(list(tidy), rn)) } } else { tidy <- .enr_tidy_from_native(obj, method = rn, padj_max = .padj_max_for(enrichment_padj_max, rn)) if (!is.null(tidy)) { - enr_tidy[[slot]] <- c(enr_tidy[[slot]], setNames(list(tidy), rn)) + enr_tidy[[slot]] <- c(enr_tidy[[slot]], stats::setNames(list(tidy), rn)) sup <- .enr_support_from_native(obj, tidy) if (!is.null(sup)) { - enr_support[[slot]] <- c(enr_support[[slot]], setNames(list(sup), rn)) + enr_support[[slot]] <- c(enr_support[[slot]], stats::setNames(list(sup), rn)) } } } diff --git a/R/downloadHelpers.R b/R/downloadHelpers.R index 732fe42..00a0ca7 100644 --- a/R/downloadHelpers.R +++ b/R/downloadHelpers.R @@ -58,14 +58,14 @@ export_plot_standard <- function(plot_object, filename, format = "pdf", dpi = 30 # Greek in rich level labels is rewritten to the Symbol font for it. if (format == "pdf") { plot_object <- prepare_plot_for_pdf(plot_object) - pdf(file = filename, width = width, height = height) + grDevices::pdf(file = filename, width = width, height = height) } else if (format == "svg") { - svg(file = filename, width = width, height = height) + grDevices::svg(file = filename, width = width, height = height) } else if (format == "png") { - png(filename = filename, width = width, height = height, units = "in", res = as.numeric(dpi)) + grDevices::png(filename = filename, width = width, height = height, units = "in", res = as.numeric(dpi)) } else { warning("Unknown format '", format, "'. Defaulting to PDF.") - pdf(file = filename, width = width, height = height) + grDevices::pdf(file = filename, width = width, height = height) } # Print/Draw the plot @@ -82,7 +82,7 @@ export_plot_standard <- function(plot_object, filename, format = "pdf", dpi = 30 }, finally = { # Ensure device is closed even if printing fails - dev.off() + grDevices::dev.off() } ) } diff --git a/R/exploreDE-package.R b/R/exploreDE-package.R new file mode 100644 index 0000000..a21f0a8 --- /dev/null +++ b/R/exploreDE-package.R @@ -0,0 +1,4 @@ +#' @importFrom dplyr %>% +#' @importFrom R6 R6Class +#' @importFrom rlang .data +NULL diff --git a/R/helperFunctions.R b/R/helperFunctions.R index 9a7077c..649c449 100644 --- a/R/helperFunctions.R +++ b/R/helperFunctions.R @@ -346,8 +346,8 @@ dataSummary <- function(data, varname, groupnames) { summary_func <- function(x, col) { c( mean = mean(x[[col]], na.rm = TRUE), - sd = sd(x[[col]], na.rm = TRUE), - se = sd(x[[col]], na.rm = TRUE) / sqrt(sum(!is.na(x[[col]]))) + sd = stats::sd(x[[col]], na.rm = TRUE), + se = stats::sd(x[[col]], na.rm = TRUE) / sqrt(sum(!is.na(x[[col]]))) ) } data_sum <- plyr::ddply( @@ -373,8 +373,8 @@ dataSummary <- function(data, varname, groupnames) { #' @return Character vector of rownames for the top features #' @noRd select_genes_by_sd <- function(counts, top_n = 2000) { - gene_sds <- apply(counts, 1, sd, na.rm = TRUE) - top_genes <- names(head(sort(gene_sds, decreasing = TRUE), n = top_n)) + gene_sds <- apply(counts, 1, stats::sd, na.rm = TRUE) + top_genes <- names(utils::head(sort(gene_sds, decreasing = TRUE), n = top_n)) return(top_genes) } @@ -395,6 +395,9 @@ bind_to_scope <- function(fn, env = parent.frame()) { fn } +# Session objects the bound helpers below read from the server scope +utils::globalVariables(c("eds", "input", "seqAnnoReactive")) + # ============================================================================= # Feature bucket API (used by server-featureBucket.R, bound there with bind_to_scope()) # NOTE: bucket_add/remove/clear and resolve_features reference the Shiny @@ -421,11 +424,11 @@ bucket_add <- function(new_features, source = "unknown") { valid_ids <- c(valid_ids, unique(sg)) } valid <- new_features[new_features %in% valid_ids & new_features != ""] - current <- isolate(featureBucket$features) + current <- shiny::isolate(featureBucket$features) to_add <- setdiff(valid, current) if (length(to_add) > 0) { featureBucket$features <- c(current, to_add) - featureBucket$version <- isolate(featureBucket$version) + 1L + featureBucket$version <- shiny::isolate(featureBucket$version) + 1L } } @@ -435,11 +438,11 @@ bucket_add <- function(new_features, source = "unknown") { #' @param source Label for telemetry #' @noRd bucket_remove <- function(to_remove, source = "unknown") { - current <- isolate(featureBucket$features) + current <- shiny::isolate(featureBucket$features) remaining <- current[!current %in% to_remove] if (length(remaining) != length(current)) { featureBucket$features <- remaining - featureBucket$version <- isolate(featureBucket$version) + 1L + featureBucket$version <- shiny::isolate(featureBucket$version) + 1L } } @@ -449,7 +452,7 @@ bucket_remove <- function(to_remove, source = "unknown") { #' @noRd bucket_clear <- function(source = "unknown") { featureBucket$features <- character(0) - featureBucket$version <- isolate(featureBucket$version) + 1L + featureBucket$version <- shiny::isolate(featureBucket$version) + 1L } #' parse_gene_text @@ -499,13 +502,13 @@ resolve_features <- function(input_genes, search_mode = "feature_id") { #' @param title_suffix String appended to heatmap title #' @noRd make_rep_heatmap <- function(data, title_suffix = "") { - req(data) + shiny::req(data) # Prepare annotations ha_top <- NULL ha_left <- NULL - row_names_gp <- gpar(fontsize = input$replicabilityTextSize) - column_names_gp <- gpar(fontsize = input$replicabilityTextSize) + row_names_gp <- grid::gpar(fontsize = input$replicabilityTextSize) + column_names_gp <- grid::gpar(fontsize = input$replicabilityTextSize) if (!is.null(input$replicabilityFactors)) { dataset <- data$dataset @@ -522,14 +525,14 @@ make_rep_heatmap <- function(data, title_suffix = "") { if (is.null(col_input)) { return("#808080FF") } - tryCatch(paste0(col2hex(col_input), "FF"), error = function(e) "#808080FF") + tryCatch(paste0(gplots::col2hex(col_input), "FF"), error = function(e) "#808080FF") }, character(1) ) names(colors) <- levs return(colors) }) %>% - setNames(input$replicabilityFactors) + stats::setNames(input$replicabilityFactors) # Color labels based on the first selected factor factor_col <- input$replicabilityFactors[1] @@ -541,7 +544,7 @@ make_rep_heatmap <- function(data, title_suffix = "") { if (is.null(col_input)) { return("#808080FF") } - tryCatch(paste0(col2hex(col_input), "FF"), error = function(e) "#808080FF") + tryCatch(paste0(gplots::col2hex(col_input), "FF"), error = function(e) "#808080FF") }, character(1) ) @@ -549,8 +552,8 @@ make_rep_heatmap <- function(data, title_suffix = "") { sample_colors <- colors[as.character(dataset[[factor_col]])] names(sample_colors) <- dataset$Name - row_names_gp <- gpar(fontsize = input$replicabilityTextSize, col = sample_colors) - column_names_gp <- gpar(fontsize = input$replicabilityTextSize, col = sample_colors) + row_names_gp <- grid::gpar(fontsize = input$replicabilityTextSize, col = sample_colors) + column_names_gp <- grid::gpar(fontsize = input$replicabilityTextSize, col = sample_colors) anno_df <- dataset[, input$replicabilityFactors, drop = FALSE] @@ -567,15 +570,15 @@ make_rep_heatmap <- function(data, title_suffix = "") { levs <- names(colourList[[f]]) list(at = levs, labels = unname(level_labels(input, f, levs, mode = "plain"))) }) %>% - setNames(input$replicabilityFactors) + stats::setNames(input$replicabilityFactors) - ha_top <- HeatmapAnnotation( + ha_top <- ComplexHeatmap::HeatmapAnnotation( df = anno_df, col = colourList, show_legend = !repRich, annotation_legend_param = annoLegendParam, - annotation_name_gp = gpar(fontsize = input$replicabilityTextSize, fontface = "bold"), - gp = gpar(col = input$replicabilityBorderColor1, lwd = input$replicabilityBorderSize1 / 10) + annotation_name_gp = grid::gpar(fontsize = input$replicabilityTextSize, fontface = "bold"), + gp = grid::gpar(col = input$replicabilityBorderColor1, lwd = input$replicabilityBorderSize1 / 10) ) if (repRich) { attr(ha_top, "rich_legends") <- lapply(input$replicabilityFactors, function(f) { @@ -583,18 +586,18 @@ make_rep_heatmap <- function(data, title_suffix = "") { title = f, labels = level_labels(input, f, names(colourList[[f]]), force_rich = TRUE), fill = colourList[[f]], - title_gp = gpar(fontsize = input$replicabilityTextSize, fontface = "bold"), - labels_gp = gpar(fontsize = input$replicabilityTextSize) + title_gp = grid::gpar(fontsize = input$replicabilityTextSize, fontface = "bold"), + labels_gp = grid::gpar(fontsize = input$replicabilityTextSize) ) }) } - ha_left <- rowAnnotation( + ha_left <- ComplexHeatmap::rowAnnotation( df = anno_df, col = colourList, show_legend = FALSE, - annotation_name_gp = gpar(fontsize = input$replicabilityTextSize, fontface = "bold"), - gp = gpar(col = input$replicabilityBorderColor1, lwd = input$replicabilityBorderSize1 / 10) + annotation_name_gp = grid::gpar(fontsize = input$replicabilityTextSize, fontface = "bold"), + gp = grid::gpar(col = input$replicabilityBorderColor1, lwd = input$replicabilityBorderSize1 / 10) ) } @@ -603,15 +606,15 @@ make_rep_heatmap <- function(data, title_suffix = "") { # Determine color scheme - use palette if selected, otherwise use manual colors if (!is.null(input$replicabilityPalette) && input$replicabilityPalette != "None") { - palette_colours <- brewer.pal(9, input$replicabilityPalette) + palette_colours <- RColorBrewer::brewer.pal(9, input$replicabilityPalette) selected_colours <- palette_colours[c(1, 5, 9)] if (input$replicabilityPaletteRev) { - heatmap_colours <- colorRamp2(at, selected_colours) + heatmap_colours <- circlize::colorRamp2(at, selected_colours) } else { - heatmap_colours <- colorRamp2(at, rev(selected_colours)) + heatmap_colours <- circlize::colorRamp2(at, rev(selected_colours)) } } else { - heatmap_colours <- colorRamp2( + heatmap_colours <- circlize::colorRamp2( at, c(input$replicabilityColorLow, input$replicabilityColorMid, input$replicabilityColorHigh) ) @@ -627,16 +630,16 @@ make_rep_heatmap <- function(data, title_suffix = "") { show_column_names = input$replicabilityShowNames, row_names_gp = row_names_gp, column_names_gp = column_names_gp, - heatmap_legend_param = list(title_gp = gpar(fontsize = input$replicabilityTextSize, fontface = "bold")), - rect_gp = gpar(col = input$replicabilityBorderColor2, lwd = input$replicabilityBorderSize2 / 10), + heatmap_legend_param = list(title_gp = grid::gpar(fontsize = input$replicabilityTextSize, fontface = "bold")), + rect_gp = grid::gpar(col = input$replicabilityBorderColor2, lwd = input$replicabilityBorderSize2 / 10), column_title = paste0("Correlation Heatmap: ", title_suffix), - column_title_gp = gpar(fontsize = input$replicabilityTextSize + 2, fontface = "bold") + column_title_gp = grid::gpar(fontsize = input$replicabilityTextSize + 2, fontface = "bold") ) draw_heatmap( hm, merge_legend = TRUE, - padding = unit(c(10, 10, 10, 10), "mm"), + padding = grid::unit(c(10, 10, 10, 10), "mm"), legend_dx = input$replicabilityLegendDX, legend_dy = input$replicabilityLegendDY ) @@ -648,8 +651,8 @@ make_rep_heatmap <- function(data, title_suffix = "") { #' @param title_suffix String appended to title #' @noRd make_rep_dendrogram <- function(data, title_suffix = "") { - req(data) - dend <- as.dendrogram(data$hclust) + shiny::req(data) + dend <- stats::as.dendrogram(data$hclust) if (!is.null(input$replicabilityFactors)) { dataset <- data$dataset @@ -662,14 +665,14 @@ make_rep_dendrogram <- function(data, title_suffix = "") { if (is.null(col_input)) { return("#808080FF") } - tryCatch(paste0(col2hex(col_input), "FF"), error = function(e) "#808080FF") + tryCatch(paste0(gplots::col2hex(col_input), "FF"), error = function(e) "#808080FF") }, character(1) ) sample_colors <- colors[as.character(dataset[[factor_col]])] names(sample_colors) <- dataset$Name - labels_colors(dend) <- sample_colors[labels(dend)] + dendextend::labels_colors(dend) <- sample_colors[labels(dend)] colors_mat <- as.data.frame(dataset[, input$replicabilityFactors, drop = FALSE]) for (f in input$replicabilityFactors) { @@ -680,7 +683,7 @@ make_rep_dendrogram <- function(data, title_suffix = "") { if (is.null(col_input)) { return("#808080FF") } - tryCatch(paste0(col2hex(col_input), "FF"), error = function(e) "#808080FF") + tryCatch(paste0(gplots::col2hex(col_input), "FF"), error = function(e) "#808080FF") }, character(1) ) @@ -688,7 +691,7 @@ make_rep_dendrogram <- function(data, title_suffix = "") { colors_mat <- colors_mat[match(labels(dend), dataset$Name), , drop = FALSE] } - par(mar = c(20, 8, 6, 4)) + graphics::par(mar = c(20, 8, 6, 4)) plot( dend, main = paste0( @@ -705,7 +708,7 @@ make_rep_dendrogram <- function(data, title_suffix = "") { ) if (!is.null(input$replicabilityFactors)) { - colored_bars(colors = colors_mat, dend = dend, sort_by_labels_order = FALSE) + dendextend::colored_bars(colors = colors_mat, dend = dend, sort_by_labels_order = FALSE) } } @@ -906,7 +909,7 @@ getPackageVersions <- function(packages) { versions <- sapply(packages, function(pkg) { tryCatch( { - as.character(packageVersion(pkg)) + as.character(utils::packageVersion(pkg)) }, error = function(e) { "version unavailable" @@ -992,7 +995,7 @@ generateMethodsText <- function(param, aligner, de_method, fastp_version, pkg_ve if (!is.null(se)) { tryCatch( { - lib_sizes <- colSums(assay(se, "counts")) + lib_sizes <- colSums(SummarizedExperiment::assay(se, "counts")) min_size <- round(min(lib_sizes) / 1e6, 1) max_size <- round(max(lib_sizes) / 1e6, 1) final_reads_info <- paste0( @@ -1195,7 +1198,7 @@ generateMethodsText <- function(param, aligner, de_method, fastp_version, pkg_ve #' @noRd calculate_pca <- function(counts, center = TRUE, scale = FALSE) { # Remove samples with missing values - completeCases <- complete.cases(counts) + completeCases <- stats::complete.cases(counts) counts_clean <- counts[completeCases, ] if (nrow(counts_clean) < 3 || ncol(counts_clean) < 3) { @@ -1205,7 +1208,7 @@ calculate_pca <- function(counts, center = TRUE, scale = FALSE) { # Run PCA pca_result <- tryCatch( { - prcomp(counts_clean, center = center, scale. = scale) + stats::prcomp(counts_clean, center = center, scale. = scale) }, error = function(e) { return(NULL) @@ -1238,7 +1241,7 @@ calculate_pca <- function(counts, center = TRUE, scale = FALSE) { #' @noRd calculate_pcoa <- function(counts, method = "euclidean", nmds = FALSE) { # Remove samples with missing values - completeCases <- complete.cases(counts) + completeCases <- stats::complete.cases(counts) counts_clean <- counts[completeCases, ] if (nrow(counts_clean) < 3 || ncol(counts_clean) < 3) { @@ -1293,7 +1296,7 @@ calculate_pcoa <- function(counts, method = "euclidean", nmds = FALSE) { # Classical PCoA pcoa_result <- tryCatch( { - cmdscale(dist_mat, k = min(10, nrow(counts_clean) - 1), eig = TRUE) + stats::cmdscale(dist_mat, k = min(10, nrow(counts_clean) - 1), eig = TRUE) }, error = function(e) { return(NULL) @@ -1426,7 +1429,7 @@ prepare_biplot_data <- function( # Manual selection: use custom_genes if (!is.null(custom_genes) && length(custom_genes) > 0) { genes_to_plot <- loadings_subset %>% - dplyr::filter(gene %in% custom_genes) + dplyr::filter(.data$gene %in% custom_genes) } else { genes_to_plot <- loadings_subset[0, ] # Empty tibble if no genes specified } @@ -1434,22 +1437,22 @@ prepare_biplot_data <- function( # Per-PC selection: top N from each PC separately top_x <- loadings_subset %>% dplyr::arrange(dplyr::desc(abs(.data[[pc_x_name]]))) %>% - head(top_n) %>% + utils::head(top_n) %>% dplyr::mutate(pc_source = pc_x_name) top_y <- loadings_subset %>% dplyr::arrange(dplyr::desc(abs(.data[[pc_y_name]]))) %>% - head(top_n) %>% + utils::head(top_n) %>% dplyr::mutate(pc_source = pc_y_name) # Combine and deduplicate - keep first occurrence (prioritize PC X if gene is in both) genes_to_plot <- dplyr::bind_rows(top_x, top_y) %>% - dplyr::distinct(gene, .keep_all = TRUE) + dplyr::distinct(.data$gene, .keep_all = TRUE) } else { # Overall selection: top N by combined magnitude (default behavior) genes_to_plot <- loadings_subset %>% - dplyr::arrange(dplyr::desc(magnitude)) %>% - head(top_n) + dplyr::arrange(dplyr::desc(.data$magnitude)) %>% + utils::head(top_n) } list( @@ -1498,7 +1501,11 @@ step_log2 <- function(counts, dataset, counts_type) { step_batch_correction <- function(counts, dataset, batch_column, design_column = "None") { if (!is.null(batch_column) && nzchar(batch_column) && batch_column != "None") { if (any(is.na(dataset[[batch_column]]))) { - showNotification("Batch correction skipped: batch column contains NA values", type = "warning", duration = 8) + shiny::showNotification( + "Batch correction skipped: batch column contains NA values", + type = "warning", + duration = 8 + ) } else { counts <- apply_batch_correction( counts = counts, @@ -1517,8 +1524,8 @@ step_batch_correction <- function(counts, dataset, batch_column, design_column = step_top_n_sd <- function(counts, dataset, top_n) { top_n <- min(top_n, nrow(counts)) if (nrow(counts) > top_n) { - sds <- apply(counts, 1, sd, na.rm = FALSE) - top_features <- names(head(sort(sds, decreasing = TRUE), n = top_n)) + sds <- apply(counts, 1, stats::sd, na.rm = FALSE) + top_features <- names(utils::head(sort(sds, decreasing = TRUE), n = top_n)) counts <- counts[top_features, , drop = FALSE] } list(counts = counts, dataset = dataset) @@ -1534,36 +1541,37 @@ plot_ordination_samples <- function(ordination_result, pc_scores, input, colours pc_y <- input$pcaY # Base plot - p <- ggplot(pc_scores, aes(x = .data[[pc_x]], y = .data[[pc_y]], fill = .data[[input$pcaFactor1]])) + p <- ggplot2::ggplot(pc_scores, ggplot2::aes(x = .data[[pc_x]], y = .data[[pc_y]], fill = .data[[input$pcaFactor1]])) if (input$pcaAddEllipses) { p <- p + - stat_ellipse( - aes(colour = .data[[input$pcaFactor1]], fill = .data[[input$pcaFactor1]]), + ggplot2::stat_ellipse( + ggplot2::aes(colour = .data[[input$pcaFactor1]], fill = .data[[input$pcaFactor1]]), geom = "polygon", alpha = input$pcaEllipsesAlpha, show.legend = FALSE ) - p <- p + scale_colour_manual(breaks = names(coloursPCA), values = as.character(coloursPCA)) + p <- p + ggplot2::scale_colour_manual(breaks = names(coloursPCA), values = as.character(coloursPCA)) } if (input$pcaFactor2 == "None") { - p <- p + geom_point(size = input$dotSizePCA, alpha = input$alphaPCA, shape = 21, stroke = input$dotBorderPCA) + p <- p + + ggplot2::geom_point(size = input$dotSizePCA, alpha = input$alphaPCA, shape = 21, stroke = input$dotBorderPCA) } else { p <- p + - geom_point( - aes(shape = .data[[input$pcaFactor2]]), + ggplot2::geom_point( + ggplot2::aes(shape = .data[[input$pcaFactor2]]), size = input$dotSizePCA, alpha = input$alphaPCA, stroke = input$dotBorderPCA ) - p <- p + scale_shape_manual(values = c(21, 22, 23, 24, 25, 8, 3, 4), labels = shapeLabels) + p <- p + ggplot2::scale_shape_manual(values = c(21, 22, 23, 24, 25, 8, 3, 4), labels = shapeLabels) } if (input$pcaShowNames) { p <- p + - geom_label_repel( - aes(label = Name, fill = .data[[input$pcaFactor1]]), + ggrepel::geom_label_repel( + ggplot2::aes(label = .data$Name, fill = .data[[input$pcaFactor1]]), force = 2, nudge_y = as.numeric(input$geneLabelNudgePCAY) / 10, nudge_x = as.numeric(input$geneLabelNudgePCAX) / 10, @@ -1589,18 +1597,20 @@ plot_ordination_samples <- function(ordination_result, pc_scores, input, colours y_lab <- pc_y } - p <- p + labs(x = x_lab, y = y_lab, fill = input$pcaFactor1) + p <- p + ggplot2::labs(x = x_lab, y = y_lab, fill = input$pcaFactor1) if (input$pcaAxesProp && !is.null(ordination_result$variance)) { pc_x_num <- as.numeric(gsub("\\D", "", pc_x)) pc_y_num <- as.numeric(gsub("\\D", "", pc_y)) - p <- p + coord_fixed(ratio = ordination_result$variance[pc_y_num] / ordination_result$variance[pc_x_num]) + p <- p + ggplot2::coord_fixed(ratio = ordination_result$variance[pc_y_num] / ordination_result$variance[pc_x_num]) } - p <- p + scale_fill_manual(breaks = names(coloursPCA), values = as.character(coloursPCA), labels = fillLabels) - p <- p + theme_bw(base_size = input$textSizePCA) + p <- p + + ggplot2::scale_fill_manual(breaks = names(coloursPCA), values = as.character(coloursPCA), labels = fillLabels) + p <- p + ggplot2::theme_bw(base_size = input$textSizePCA) face <- switch(input$boldPCA, "TRUE" = "bold", "FALSE" = "plain") - p <- p + theme(axis.text = element_text(face = face), axis.title = element_text(face = face)) + p <- p + + ggplot2::theme(axis.text = ggplot2::element_text(face = face), axis.title = ggplot2::element_text(face = face)) if (isTRUE(levelLabels$rich)) { p <- p + rich_label_theme(legend = TRUE) } @@ -1608,25 +1618,25 @@ plot_ordination_samples <- function(ordination_result, pc_scores, input, colours # Conditionally hide grid lines if (!input$showLinesPCA) { p <- p + - theme( - panel.grid.major.x = element_blank(), - panel.grid.minor.x = element_blank(), - panel.grid.major.y = element_blank(), - panel.grid.minor.y = element_blank() + ggplot2::theme( + panel.grid.major.x = ggplot2::element_blank(), + panel.grid.minor.x = ggplot2::element_blank(), + panel.grid.major.y = ggplot2::element_blank(), + panel.grid.minor.y = ggplot2::element_blank() ) } # Conditionally hide axes if (!input$showAxesPCA) { p <- p + - theme( - axis.line = element_blank(), - axis.text.x = element_blank(), - axis.text.y = element_blank(), - axis.ticks = element_blank(), - axis.title.x = element_blank(), - axis.title.y = element_blank(), - panel.border = element_blank() + ggplot2::theme( + axis.line = ggplot2::element_blank(), + axis.text.x = ggplot2::element_blank(), + axis.text.y = ggplot2::element_blank(), + axis.ticks = ggplot2::element_blank(), + axis.title.x = ggplot2::element_blank(), + axis.title.y = ggplot2::element_blank(), + panel.border = ggplot2::element_blank() ) } @@ -1662,27 +1672,27 @@ plot_ordination_biplot <- function( # Add arrow color column for per_pc mode if (selection_method == "per_pc" && "pc_source" %in% names(biplot_data$gene_data)) { biplot_data$gene_data <- biplot_data$gene_data %>% - dplyr::mutate(arrow_color = ifelse(pc_source == pc_x, arrow_colour$x, arrow_colour$y)) + dplyr::mutate(arrow_color = ifelse(.data$pc_source == pc_x, arrow_colour$x, arrow_colour$y)) } else { # Single color for all arrows biplot_data$gene_data$arrow_color <- if (is.list(arrow_colour)) arrow_colour$x else arrow_colour } - p <- ggplot() + p <- ggplot2::ggplot() p <- p + - geom_point( + ggplot2::geom_point( data = pc_scores, - aes(x = .data[[pc_x]], y = .data[[pc_y]], fill = .data[[input$pcaFactor1]]), + ggplot2::aes(x = .data[[pc_x]], y = .data[[pc_y]], fill = .data[[input$pcaFactor1]]), size = input$dotSizePCA, alpha = input$alphaPCA, shape = 21, stroke = input$dotBorderPCA ) p <- p + - geom_segment( + ggplot2::geom_segment( data = biplot_data$gene_data, - aes(x = 0, y = 0, xend = pc_x_scaled, yend = pc_y_scaled, colour = arrow_color), - arrow = arrow(length = unit(0.2, "cm"), type = "closed"), + ggplot2::aes(x = 0, y = 0, xend = .data$pc_x_scaled, yend = .data$pc_y_scaled, colour = .data$arrow_color), + arrow = grid::arrow(length = grid::unit(0.2, "cm"), type = "closed"), linewidth = 0.5, alpha = 0.7 ) @@ -1691,14 +1701,14 @@ plot_ordination_biplot <- function( biplot_data$gene_data$label <- biplot_data$gene_data$gene } p <- p + - geom_text_repel( + ggrepel::geom_text_repel( data = biplot_data$gene_data, - aes(x = pc_x_scaled, y = pc_y_scaled, label = label, colour = arrow_color), + ggplot2::aes(x = .data$pc_x_scaled, y = .data$pc_y_scaled, label = .data$label, colour = .data$arrow_color), size = input$textSizePCA / 4, fontface = "bold", max.overlaps = 20 ) - p <- p + scale_colour_identity() # Use the actual color values + p <- p + ggplot2::scale_colour_identity() # Use the actual color values # Axes if (!is.null(ordination_result$variance)) { @@ -1711,11 +1721,13 @@ plot_ordination_biplot <- function( y_lab <- pc_y } - p <- p + labs(x = x_lab, y = y_lab, fill = input$pcaFactor1) - p <- p + scale_fill_manual(breaks = names(coloursPCA), values = as.character(coloursPCA), labels = fillLabels) - p <- p + theme_bw(base_size = input$textSizePCA) + p <- p + ggplot2::labs(x = x_lab, y = y_lab, fill = input$pcaFactor1) + p <- p + + ggplot2::scale_fill_manual(breaks = names(coloursPCA), values = as.character(coloursPCA), labels = fillLabels) + p <- p + ggplot2::theme_bw(base_size = input$textSizePCA) face <- switch(input$boldPCA, "TRUE" = "bold", "FALSE" = "plain") - p <- p + theme(axis.text = element_text(face = face), axis.title = element_text(face = face)) + p <- p + + ggplot2::theme(axis.text = ggplot2::element_text(face = face), axis.title = ggplot2::element_text(face = face)) if (isTRUE(levelLabels$rich)) { p <- p + rich_label_theme(legend = TRUE) } @@ -1723,25 +1735,25 @@ plot_ordination_biplot <- function( # Conditionally hide grid lines if (!input$showLinesPCA) { p <- p + - theme( - panel.grid.major.x = element_blank(), - panel.grid.minor.x = element_blank(), - panel.grid.major.y = element_blank(), - panel.grid.minor.y = element_blank() + ggplot2::theme( + panel.grid.major.x = ggplot2::element_blank(), + panel.grid.minor.x = ggplot2::element_blank(), + panel.grid.major.y = ggplot2::element_blank(), + panel.grid.minor.y = ggplot2::element_blank() ) } # Conditionally hide axes if (!input$showAxesPCA) { p <- p + - theme( - axis.line = element_blank(), - axis.text.x = element_blank(), - axis.text.y = element_blank(), - axis.ticks = element_blank(), - axis.title.x = element_blank(), - axis.title.y = element_blank(), - panel.border = element_blank() + ggplot2::theme( + axis.line = ggplot2::element_blank(), + axis.text.x = ggplot2::element_blank(), + axis.text.y = ggplot2::element_blank(), + axis.ticks = ggplot2::element_blank(), + axis.title.x = ggplot2::element_blank(), + axis.title.y = ggplot2::element_blank(), + panel.border = ggplot2::element_blank() ) } @@ -1804,7 +1816,7 @@ make_qc_scatter <- function( df$types <- factor(df$types, levels = draw_order) df <- df[order(df$types), , drop = FALSE] - p <- ggplot2::ggplot(df, ggplot2::aes(x = x, y = y, colour = types)) + + p <- ggplot2::ggplot(df, ggplot2::aes(x = x, y = y, colour = .data$types)) + ggplot2::geom_point(size = point_size, alpha = alpha) + ggplot2::scale_color_manual(values = types_colours) if (isTRUE(log_scale)) { diff --git a/R/legacy_glue.R b/R/legacy_glue.R index 91e9338..6029a5f 100644 --- a/R/legacy_glue.R +++ b/R/legacy_glue.R @@ -69,7 +69,7 @@ legacy_gStoreList_from_eds <- function(eds, se = NULL, dataDir = NULL, param = N factors_raw <- colnames(colData_raw)[grep("\\[Factor]", colnames(colData_raw))] factors <- gsub(" \\[.*", "", factors_raw) factors <- gsub(" ", "_", factors) - factorLevels <- setNames( + factorLevels <- stats::setNames( lapply(factors, function(f) levels(as.factor(dataset[[f]]))), factors ) @@ -112,9 +112,7 @@ legacy_gStoreList_from_eds <- function(eds, se = NULL, dataDir = NULL, param = N if (isTRUE(param$featureLevel == "isoform")) { idOrder <- intersect(rd$transcript_id, rownames(countList[[i]])) countList[[i]] <- countList[[i]][idOrder, ] - rownames(countList[[i]]) <- rd$feature_id %>% - gsub("[:/()-]", ".", .) %>% - gsub(" ", ".", .) + rownames(countList[[i]]) <- gsub(" ", ".", gsub("[:/()-]", ".", rd$feature_id)) } else { idOrder <- intersect(rd$gene_id, rownames(countList[[i]])) countList[[i]] <- countList[[i]][idOrder, ] @@ -167,7 +165,7 @@ legacy_gStoreList_from_eds <- function(eds, se = NULL, dataDir = NULL, param = N gStoreList$design <- dataTypeGStore gStoreList$designLevels <- NULL if (dataTypeGStore == "CrisprCountQC") { - gStoreList$sgRNA_to_gene <- setNames( + gStoreList$sgRNA_to_gene <- stats::setNames( gsub("_((sgrna)?[0-9]+|[+-]_[^_]+)_[ACGTN]+$", "", rd$feature_id, ignore.case = TRUE), rd$feature_id ) @@ -383,7 +381,7 @@ legacy_multi_contrast_from_eds <- function(eds, contrast) { } factors <- eds$factor_names() - factorLevels <- setNames(lapply(factors, function(f) eds$factor_levels(f)), factors) + factorLevels <- stats::setNames(lapply(factors, function(f) eds$factor_levels(f)), factors) # ---- seqAnno = feature annotation + this contrast's DE stats ------------ de <- eds$de(contrast) # feature_id, log2Ratio, pValue, fdr, gene_name, ... @@ -469,14 +467,14 @@ legacy_multi_contrast_from_eds <- function(eds, contrast) { ] contrasts <- gsub("constrast_", "", contrasts) - contrast_dfs <- setNames( + contrast_dfs <- stats::setNames( lapply(contrasts, function(con) { as.data.frame(SummarizedExperiment::rowData(se)[[paste0("constrast_", con)]]) }), contrasts ) - seqAnnoList <- setNames( + seqAnnoList <- stats::setNames( lapply(contrasts, function(con) { # .saint_standardise_de maps SAINT's log2_EFCs/BFDR -> log2Ratio/fdr and # adds an all-NA pValue (no-op for standard prolfqua frames); .de_order_idx @@ -510,7 +508,7 @@ legacy_multi_contrast_from_eds <- function(eds, contrast) { factors <- colnames(dataset)[ grep("Sample|Name|names|channel|raw\\.file", colnames(dataset), invert = TRUE, ignore.case = TRUE) ] - factorLevels <- setNames( + factorLevels <- stats::setNames( lapply(factors, function(f) levels(as.factor(dataset[[f]]))), factors ) @@ -522,9 +520,9 @@ legacy_multi_contrast_from_eds <- function(eds, contrast) { unsorted_sa <- standardise_columns(contrast_dfs[[contrasts[1]]]) unsorted_sa$feature_id <- build_feature_id(unsorted_sa) raw_rn <- rownames(contrast_dfs[[contrasts[1]]]) - fid_lookup <- setNames(unsorted_sa$feature_id, raw_rn) + fid_lookup <- stats::setNames(unsorted_sa$feature_id, raw_rn) - countList <- setNames( + countList <- stats::setNames( lapply(names(SummarizedExperiment::assays(se)), function(ass) { x <- SummarizedExperiment::assay(se, ass) mapped <- fid_lookup[rownames(x)] diff --git a/R/utils_explore_dataset.R b/R/utils_explore_dataset.R index bf86ba4..d303ee8 100644 --- a/R/utils_explore_dataset.R +++ b/R/utils_explore_dataset.R @@ -204,7 +204,7 @@ eds_infer_organism <- function(param) { eds_flatten_cp_results <- function(x, prefix = "") { if (inherits(x, c("enrichResult", "gseaResult")) || is.data.frame(x)) { nm <- if (nzchar(prefix)) prefix else "default" - return(setNames(list(x), nm)) + return(stats::setNames(list(x), nm)) } if (is.list(x) && length(x)) { out <- list() @@ -423,7 +423,7 @@ eds_load_se <- function(input) { lists <- Filter(function(gl) length(gl) > 0L, lists) if (length(lists)) { shared <- all(vapply(lists, identical, logical(1), lists[[1]])) - use <- if (shared) setNames(lists[1], "*") else lists + use <- if (shared) stats::setNames(lists[1], "*") else lists out$gene_list <- do.call( rbind, lapply(names(use), function(ont) { @@ -449,7 +449,7 @@ eds_load_se <- function(input) { } gsea <- identical(support$class, "gseaResult") onts <- unique(tidy$ontology) - setNames( + stats::setNames( lapply(onts, function(ont) { r <- tidy[tidy$ontology == ont, setdiff(colnames(tidy), c("method", "ontology")), drop = FALSE] r <- r[, vapply(r, function(col) !all(is.na(col)), logical(1)), drop = FALSE] # rbind.fill padding diff --git a/man/ExploreDataset.Rd b/man/ExploreDataset.Rd index 303aab2..adffbad 100644 --- a/man/ExploreDataset.Rd +++ b/man/ExploreDataset.Rd @@ -8,8 +8,7 @@ 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. -} -\details{ + 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 @@ -17,515 +16,800 @@ Methods that touch the storage backend are virtual } \section{Methods}{ \subsection{Public methods}{ -\itemize{ -\item \href{#method-ExploreDataset-new}{\code{ExploreDataset$new()}} -\item \href{#method-ExploreDataset-omics_class}{\code{ExploreDataset$omics_class()}} -\item \href{#method-ExploreDataset-data_type}{\code{ExploreDataset$data_type()}} -\item \href{#method-ExploreDataset-has_de}{\code{ExploreDataset$has_de()}} -\item \href{#method-ExploreDataset-has_enrichment}{\code{ExploreDataset$has_enrichment()}} -\item \href{#method-ExploreDataset-organism}{\code{ExploreDataset$organism()}} -\item \href{#method-ExploreDataset-ref_build}{\code{ExploreDataset$ref_build()}} -\item \href{#method-ExploreDataset-feature_id_kind}{\code{ExploreDataset$feature_id_kind()}} -\item \href{#method-ExploreDataset-background_expression}{\code{ExploreDataset$background_expression()}} -\item \href{#method-ExploreDataset-backend_kind}{\code{ExploreDataset$backend_kind()}} -\item \href{#method-ExploreDataset-backend}{\code{ExploreDataset$backend()}} -\item \href{#method-ExploreDataset-samples}{\code{ExploreDataset$samples()}} -\item \href{#method-ExploreDataset-sample_ids}{\code{ExploreDataset$sample_ids()}} -\item \href{#method-ExploreDataset-n_samples}{\code{ExploreDataset$n_samples()}} -\item \href{#method-ExploreDataset-factor_names}{\code{ExploreDataset$factor_names()}} -\item \href{#method-ExploreDataset-factor_levels}{\code{ExploreDataset$factor_levels()}} -\item \href{#method-ExploreDataset-primary_grouping}{\code{ExploreDataset$primary_grouping()}} -\item \href{#method-ExploreDataset-secondary_grouping}{\code{ExploreDataset$secondary_grouping()}} -\item \href{#method-ExploreDataset-sample_factor}{\code{ExploreDataset$sample_factor()}} -\item \href{#method-ExploreDataset-features}{\code{ExploreDataset$features()}} -\item \href{#method-ExploreDataset-feature_ids}{\code{ExploreDataset$feature_ids()}} -\item \href{#method-ExploreDataset-n_features}{\code{ExploreDataset$n_features()}} -\item \href{#method-ExploreDataset-feature_display}{\code{ExploreDataset$feature_display()}} -\item \href{#method-ExploreDataset-assay_names}{\code{ExploreDataset$assay_names()}} -\item \href{#method-ExploreDataset-has_assay}{\code{ExploreDataset$has_assay()}} -\item \href{#method-ExploreDataset-assay}{\code{ExploreDataset$assay()}} -\item \href{#method-ExploreDataset-assay_label}{\code{ExploreDataset$assay_label()}} -\item \href{#method-ExploreDataset-raw_assay_name}{\code{ExploreDataset$raw_assay_name()}} -\item \href{#method-ExploreDataset-primary_assay_name}{\code{ExploreDataset$primary_assay_name()}} -\item \href{#method-ExploreDataset-raw_assay}{\code{ExploreDataset$raw_assay()}} -\item \href{#method-ExploreDataset-primary_assay}{\code{ExploreDataset$primary_assay()}} -\item \href{#method-ExploreDataset-contrasts}{\code{ExploreDataset$contrasts()}} -\item \href{#method-ExploreDataset-primary_contrast}{\code{ExploreDataset$primary_contrast()}} -\item \href{#method-ExploreDataset-de}{\code{ExploreDataset$de()}} -\item \href{#method-ExploreDataset-de_all}{\code{ExploreDataset$de_all()}} -\item \href{#method-ExploreDataset-contrast_meta}{\code{ExploreDataset$contrast_meta()}} -\item \href{#method-ExploreDataset-contrast_label}{\code{ExploreDataset$contrast_label()}} -\item \href{#method-ExploreDataset-de_display_extras}{\code{ExploreDataset$de_display_extras()}} -\item \href{#method-ExploreDataset-has_pvalue}{\code{ExploreDataset$has_pvalue()}} -\item \href{#method-ExploreDataset-enrichment_kinds}{\code{ExploreDataset$enrichment_kinds()}} -\item \href{#method-ExploreDataset-enrichment}{\code{ExploreDataset$enrichment()}} -\item \href{#method-ExploreDataset-enrichment_input}{\code{ExploreDataset$enrichment_input()}} -\item \href{#method-ExploreDataset-enrichment_table}{\code{ExploreDataset$enrichment_table()}} -\item \href{#method-ExploreDataset-enrichment_filter}{\code{ExploreDataset$enrichment_filter()}} -\item \href{#method-ExploreDataset-sgrna_to_gene}{\code{ExploreDataset$sgrna_to_gene()}} -\item \href{#method-ExploreDataset-proteomics_choices}{\code{ExploreDataset$proteomics_choices()}} -\item \href{#method-ExploreDataset-all_pathways}{\code{ExploreDataset$all_pathways()}} -\item \href{#method-ExploreDataset-source}{\code{ExploreDataset$source()}} -\item \href{#method-ExploreDataset-print}{\code{ExploreDataset$print()}} -\item \href{#method-ExploreDataset-clone}{\code{ExploreDataset$clone()}} -} -} -\if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-ExploreDataset-new}{}}} -\subsection{Method \code{new()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$new(...)}\if{html}{\out{
}} + \itemize{ + \item \href{#method-ExploreDataset-initialize}{\code{ExploreDataset$new()}} + \item \href{#method-ExploreDataset-omics_class}{\code{ExploreDataset$omics_class()}} + \item \href{#method-ExploreDataset-data_type}{\code{ExploreDataset$data_type()}} + \item \href{#method-ExploreDataset-has_de}{\code{ExploreDataset$has_de()}} + \item \href{#method-ExploreDataset-has_enrichment}{\code{ExploreDataset$has_enrichment()}} + \item \href{#method-ExploreDataset-organism}{\code{ExploreDataset$organism()}} + \item \href{#method-ExploreDataset-ref_build}{\code{ExploreDataset$ref_build()}} + \item \href{#method-ExploreDataset-feature_id_kind}{\code{ExploreDataset$feature_id_kind()}} + \item \href{#method-ExploreDataset-background_expression}{\code{ExploreDataset$background_expression()}} + \item \href{#method-ExploreDataset-backend_kind}{\code{ExploreDataset$backend_kind()}} + \item \href{#method-ExploreDataset-backend}{\code{ExploreDataset$backend()}} + \item \href{#method-ExploreDataset-samples}{\code{ExploreDataset$samples()}} + \item \href{#method-ExploreDataset-sample_ids}{\code{ExploreDataset$sample_ids()}} + \item \href{#method-ExploreDataset-n_samples}{\code{ExploreDataset$n_samples()}} + \item \href{#method-ExploreDataset-factor_names}{\code{ExploreDataset$factor_names()}} + \item \href{#method-ExploreDataset-factor_levels}{\code{ExploreDataset$factor_levels()}} + \item \href{#method-ExploreDataset-primary_grouping}{\code{ExploreDataset$primary_grouping()}} + \item \href{#method-ExploreDataset-secondary_grouping}{\code{ExploreDataset$secondary_grouping()}} + \item \href{#method-ExploreDataset-sample_factor}{\code{ExploreDataset$sample_factor()}} + \item \href{#method-ExploreDataset-features}{\code{ExploreDataset$features()}} + \item \href{#method-ExploreDataset-feature_ids}{\code{ExploreDataset$feature_ids()}} + \item \href{#method-ExploreDataset-n_features}{\code{ExploreDataset$n_features()}} + \item \href{#method-ExploreDataset-feature_display}{\code{ExploreDataset$feature_display()}} + \item \href{#method-ExploreDataset-assay_names}{\code{ExploreDataset$assay_names()}} + \item \href{#method-ExploreDataset-has_assay}{\code{ExploreDataset$has_assay()}} + \item \href{#method-ExploreDataset-assay}{\code{ExploreDataset$assay()}} + \item \href{#method-ExploreDataset-assay_label}{\code{ExploreDataset$assay_label()}} + \item \href{#method-ExploreDataset-raw_assay_name}{\code{ExploreDataset$raw_assay_name()}} + \item \href{#method-ExploreDataset-primary_assay_name}{\code{ExploreDataset$primary_assay_name()}} + \item \href{#method-ExploreDataset-raw_assay}{\code{ExploreDataset$raw_assay()}} + \item \href{#method-ExploreDataset-primary_assay}{\code{ExploreDataset$primary_assay()}} + \item \href{#method-ExploreDataset-contrasts}{\code{ExploreDataset$contrasts()}} + \item \href{#method-ExploreDataset-primary_contrast}{\code{ExploreDataset$primary_contrast()}} + \item \href{#method-ExploreDataset-de}{\code{ExploreDataset$de()}} + \item \href{#method-ExploreDataset-de_all}{\code{ExploreDataset$de_all()}} + \item \href{#method-ExploreDataset-contrast_meta}{\code{ExploreDataset$contrast_meta()}} + \item \href{#method-ExploreDataset-contrast_label}{\code{ExploreDataset$contrast_label()}} + \item \href{#method-ExploreDataset-de_display_extras}{\code{ExploreDataset$de_display_extras()}} + \item \href{#method-ExploreDataset-has_pvalue}{\code{ExploreDataset$has_pvalue()}} + \item \href{#method-ExploreDataset-enrichment_kinds}{\code{ExploreDataset$enrichment_kinds()}} + \item \href{#method-ExploreDataset-enrichment}{\code{ExploreDataset$enrichment()}} + \item \href{#method-ExploreDataset-enrichment_input}{\code{ExploreDataset$enrichment_input()}} + \item \href{#method-ExploreDataset-enrichment_table}{\code{ExploreDataset$enrichment_table()}} + \item \href{#method-ExploreDataset-enrichment_filter}{\code{ExploreDataset$enrichment_filter()}} + \item \href{#method-ExploreDataset-sgrna_to_gene}{\code{ExploreDataset$sgrna_to_gene()}} + \item \href{#method-ExploreDataset-proteomics_choices}{\code{ExploreDataset$proteomics_choices()}} + \item \href{#method-ExploreDataset-all_pathways}{\code{ExploreDataset$all_pathways()}} + \item \href{#method-ExploreDataset-source}{\code{ExploreDataset$source()}} + \item \href{#method-ExploreDataset-print}{\code{ExploreDataset$print()}} + \item \href{#method-ExploreDataset-clone}{\code{ExploreDataset$clone()}} + } +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ExploreDataset-initialize}{}}} +\subsection{\code{ExploreDataset$new()}}{ + Always errors: the base class is abstract. Use [new_explore_dataset()] or a concrete subclass. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$new(...)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{...}}{Ignored.} + } + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-omics_class}{}}} -\subsection{Method \code{omics_class()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$omics_class()}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$omics_class()}}{ + Omics class from the config: `"genomics"` or `"proteomics"`. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$omics_class()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-data_type}{}}} -\subsection{Method \code{data_type()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$data_type()}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$data_type()}}{ + Dataset type from the config, e.g. `"RNASeq"`, `"CountQC"`, `"CrisprCountQC"` or `"proteomics"`. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$data_type()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-has_de}{}}} -\subsection{Method \code{has_de()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$has_de()}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$has_de()}}{ + `TRUE` when the dataset has at least one contrast. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$has_de()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-has_enrichment}{}}} -\subsection{Method \code{has_enrichment()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$has_enrichment()}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$has_enrichment()}}{ + `TRUE` when the config lists at least one enrichment kind. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$has_enrichment()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-organism}{}}} -\subsection{Method \code{organism()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$organism()}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$organism()}}{ + Organism from the config, or `NA` when unknown. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$organism()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-ref_build}{}}} -\subsection{Method \code{ref_build()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$ref_build()}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$ref_build()}}{ + Reference genome build from the config, or `NA` when unknown. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$ref_build()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-feature_id_kind}{}}} -\subsection{Method \code{feature_id_kind()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$feature_id_kind()}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$feature_id_kind()}}{ + What a feature ID denotes, from the config, e.g. `"gene"`, `"isoform"`, `"protein"`, + `"peptide"`, `"phospho"` or `"guide"`. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$feature_id_kind()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-background_expression}{}}} -\subsection{Method \code{background_expression()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$background_expression()}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$background_expression()}}{ + Low-signal offset added to expression values before taking log2; from the config, default 10. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$background_expression()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-backend_kind}{}}} -\subsection{Method \code{backend_kind()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$backend_kind()}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$backend_kind()}}{ + Short tag naming the storage backend (`"se"`, `"h5ad"` or `"parquet"`). Implemented by subclasses. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$backend_kind()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-backend}{}}} -\subsection{Method \code{backend()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$backend()}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$backend()}}{ + The underlying storage object. Implemented by subclasses. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$backend()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-samples}{}}} -\subsection{Method \code{samples()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$samples()}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$samples()}}{ + Sample metadata as a data.frame, one row per sample, rownames are sample IDs. + Implemented by subclasses. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$samples()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-sample_ids}{}}} -\subsection{Method \code{sample_ids()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$sample_ids()}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$sample_ids()}}{ + Sample IDs: the rownames of `samples()`. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$sample_ids()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-n_samples}{}}} -\subsection{Method \code{n_samples()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$n_samples()}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$n_samples()}}{ + Number of samples: the number of rows of `samples()`. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$n_samples()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-factor_names}{}}} -\subsection{Method \code{factor_names()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$factor_names()}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$factor_names()}}{ + Names of the experimental factors from the config; empty when there are none. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$factor_names()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-factor_levels}{}}} -\subsection{Method \code{factor_levels()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$factor_levels(factor)}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$factor_levels()}}{ + Levels of one experimental factor, from the config. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$factor_levels(factor)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{factor}}{Factor name, one of `factor_names()`.} + } + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-primary_grouping}{}}} -\subsection{Method \code{primary_grouping()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$primary_grouping()}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$primary_grouping()}}{ + Name of the factor used as the primary sample grouping, from the config. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$primary_grouping()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-secondary_grouping}{}}} -\subsection{Method \code{secondary_grouping()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$secondary_grouping()}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$secondary_grouping()}}{ + Name of the secondary grouping factor, or `NA` when there is none. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$secondary_grouping()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-sample_factor}{}}} -\subsection{Method \code{sample_factor()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$sample_factor(factor)}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$sample_factor()}}{ + One column of `samples()`: the values of a factor, one per sample. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$sample_factor(factor)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{factor}}{Column name in `samples()`, usually one of `factor_names()`.} + } + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-features}{}}} -\subsection{Method \code{features()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$features()}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$features()}}{ + Feature annotation as a data.frame, one row per feature, rownames are feature IDs, with a + `display_name` column. Implemented by subclasses. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$features()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-feature_ids}{}}} -\subsection{Method \code{feature_ids()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$feature_ids()}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$feature_ids()}}{ + Feature IDs: the rownames of `features()`. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$feature_ids()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-n_features}{}}} -\subsection{Method \code{n_features()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$n_features()}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$n_features()}}{ + Number of features: the number of rows of `features()`. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$n_features()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-feature_display}{}}} -\subsection{Method \code{feature_display()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$feature_display(ids = NULL)}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$feature_display()}}{ + Display names of features, named by feature ID. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$feature_display(ids = NULL)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{ids}}{Feature IDs to look up; `NULL` (default) returns all features.} + } + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-assay_names}{}}} -\subsection{Method \code{assay_names()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$assay_names()}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$assay_names()}}{ + Canonical names of the assays this dataset provides. Implemented by subclasses. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$assay_names()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-has_assay}{}}} -\subsection{Method \code{has_assay()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$has_assay(name)}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$has_assay()}}{ + `TRUE` when `name` is one of `assay_names()`. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$has_assay(name)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{name}}{Canonical assay name.} + } + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-assay}{}}} -\subsection{Method \code{assay()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$assay(name, features = NULL, samples = NULL)}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$assay()}}{ + One assay as a features x samples matrix, optionally subset. Implemented by subclasses. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$assay(name, features = NULL, samples = NULL)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{name}}{Canonical assay name, one of `assay_names()`.} + \item{\code{features}}{Feature IDs (rows) to keep; `NULL` keeps all.} + \item{\code{samples}}{Sample IDs (columns) to keep; `NULL` keeps all.} + } + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-assay_label}{}}} -\subsection{Method \code{assay_label()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$assay_label(name)}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$assay_label()}}{ + Human-readable label for an assay, from the config; `name` itself when no label is registered. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$assay_label(name)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{name}}{Canonical assay name.} + } + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-raw_assay_name}{}}} -\subsection{Method \code{raw_assay_name()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$raw_assay_name()}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$raw_assay_name()}}{ + Canonical name of the raw assay, from the config. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$raw_assay_name()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-primary_assay_name}{}}} -\subsection{Method \code{primary_assay_name()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$primary_assay_name()}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$primary_assay_name()}}{ + Canonical name of the primary assay, from the config. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$primary_assay_name()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-raw_assay}{}}} -\subsection{Method \code{raw_assay()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$raw_assay(...)}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$raw_assay()}}{ + The raw assay: shortcut for `assay(raw_assay_name(), ...)`. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$raw_assay(...)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{...}}{Passed to `assay()`: `features`, `samples`.} + } + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-primary_assay}{}}} -\subsection{Method \code{primary_assay()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$primary_assay(...)}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$primary_assay()}}{ + The primary assay: shortcut for `assay(primary_assay_name(), ...)`. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$primary_assay(...)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{...}}{Passed to `assay()`: `features`, `samples`.} + } + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-contrasts}{}}} -\subsection{Method \code{contrasts()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$contrasts()}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$contrasts()}}{ + Names of the DE contrasts, from the config; empty when the dataset has no DE results. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$contrasts()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-primary_contrast}{}}} -\subsection{Method \code{primary_contrast()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$primary_contrast()}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$primary_contrast()}}{ + Name of the primary contrast, from the config; `NA` when there are no contrasts. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$primary_contrast()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-de}{}}} -\subsection{Method \code{de()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$de(contrast)}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$de()}}{ + DE result table for one contrast, as a data.frame. Implemented by subclasses. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$de(contrast)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{contrast}}{Contrast name, one of `contrasts()`.} + } + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-de_all}{}}} -\subsection{Method \code{de_all()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$de_all()}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$de_all()}}{ + DE result tables of all contrasts, as a list named by contrast. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$de_all()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-contrast_meta}{}}} -\subsection{Method \code{contrast_meta()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$contrast_meta(contrast)}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$contrast_meta()}}{ + Metadata list of one contrast from the config: test and reference group, factor, method, + thresholds. Errors on an unknown contrast. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$contrast_meta(contrast)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{contrast}}{Contrast name, one of `contrasts()`.} + } + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-contrast_label}{}}} -\subsection{Method \code{contrast_label()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$contrast_label(contrast)}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$contrast_label()}}{ + Display label of a contrast: currently the contrast name itself. Errors on an unknown contrast. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$contrast_label(contrast)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{contrast}}{Contrast name, one of `contrasts()`.} + } + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-de_display_extras}{}}} -\subsection{Method \code{de_display_extras()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$de_display_extras()}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$de_display_extras()}}{ + Names of extra DE columns shown for display only (e.g. `SaintScore`), from the config; + empty by default. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$de_display_extras()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-has_pvalue}{}}} -\subsection{Method \code{has_pvalue()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$has_pvalue()}\if{html}{\out{
}} +\subsection{\code{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. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$has_pvalue()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-enrichment_kinds}{}}} -\subsection{Method \code{enrichment_kinds()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$enrichment_kinds()}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$enrichment_kinds()}}{ + Enrichment kinds available, from the config: any of `"ora"` and `"gsea"`. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$enrichment_kinds()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-enrichment}{}}} -\subsection{Method \code{enrichment()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$enrichment(contrast, kind)}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$enrichment()}}{ + Enrichment results of one contrast and kind, as a flat named list of clusterProfiler results. + Implemented by subclasses. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$enrichment(contrast, kind)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{contrast}}{Contrast name, one of `contrasts()`.} + \item{\code{kind}}{`"ora"` or `"gsea"`.} + } + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-enrichment_input}{}}} -\subsection{Method \code{enrichment_input()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$enrichment_input(contrast)}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$enrichment_input()}}{ + Inputs for enrichment of one contrast: `list(seq_anno, ranked_l2fc, selections)`. + Implemented by subclasses. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$enrichment_input(contrast)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{contrast}}{Contrast name, one of `contrasts()`.} + } + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-enrichment_table}{}}} -\subsection{Method \code{enrichment_table()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$enrichment_table(contrast, kind)}\if{html}{\out{
}} +\subsection{\code{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. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$enrichment_table(contrast, kind)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{contrast}}{Contrast name, one of `contrasts()`.} + \item{\code{kind}}{`"ora"` or `"gsea"`.} + } + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-enrichment_filter}{}}} -\subsection{Method \code{enrichment_filter()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$enrichment_filter()}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$enrichment_filter()}}{ + The `p.adjust` cut-off applied to the stored enrichment tables, from the config; + `NA` when none was applied. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$enrichment_filter()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-sgrna_to_gene}{}}} -\subsection{Method \code{sgrna_to_gene()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$sgrna_to_gene()}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$sgrna_to_gene()}}{ + Named character vector mapping sgRNA IDs to gene names (CRISPR datasets); `NULL` otherwise. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$sgrna_to_gene()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-proteomics_choices}{}}} -\subsection{Method \code{proteomics_choices()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$proteomics_choices(kind = c("gene", "protein"))}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$proteomics_choices()}}{ + Choices and lookup for the proteomics feature picker, `list(choices, lookup)`; `NULL` when the + dataset has none. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$proteomics_choices(kind = c("gene", "protein"))} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{kind}}{`"gene"` (default) or `"protein"`.} + } + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-all_pathways}{}}} -\subsection{Method \code{all_pathways()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$all_pathways()}\if{html}{\out{
}} +\subsection{\code{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. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$all_pathways()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-source}{}}} -\subsection{Method \code{source()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$source()}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$source()}}{ + Provenance list from the config: backend kind, schema version and build time. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$source()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-print}{}}} -\subsection{Method \code{print()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$print(...)}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$print()}}{ + Print a summary of the dataset (type, dimensions, factors, contrasts, assays, enrichment) + and return the object invisibly. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$print(...)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{...}}{Ignored.} + } + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDataset-clone}{}}} -\subsection{Method \code{clone()}}{ -The objects of this class are cloneable with this method. -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDataset$clone(deep = FALSE)}\if{html}{\out{
}} +\subsection{\code{ExploreDataset$clone()}}{ + The objects of this class are cloneable with this method. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDataset$clone(deep = FALSE)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{deep}}{Whether to make a deep clone.} + } + \if{html}{\out{
}} + } } -\subsection{Arguments}{ -\if{html}{\out{
}} -\describe{ -\item{\code{deep}}{Whether to make a deep clone.} -} -\if{html}{\out{
}} -} -} } diff --git a/man/ExploreDatasetH5AD.Rd b/man/ExploreDatasetH5AD.Rd index 1ac38e1..5790025 100644 --- a/man/ExploreDatasetH5AD.Rd +++ b/man/ExploreDatasetH5AD.Rd @@ -11,183 +11,273 @@ data ("bring your own data") and the eventual single backend once producers emit canonical `.h5ad` directly. } \section{Super class}{ -\code{\link[exploreDE:ExploreDataset]{exploreDE::ExploreDataset}} -> \code{ExploreDatasetH5AD} +\code{\link[exploreDE:ExploreDataset]{ExploreDataset}} -> \code{ExploreDatasetH5AD} } \section{Methods}{ \subsection{Public methods}{ -\itemize{ -\item \href{#method-ExploreDatasetH5AD-new}{\code{ExploreDatasetH5AD$new()}} -\item \href{#method-ExploreDatasetH5AD-backend}{\code{ExploreDatasetH5AD$backend()}} -\item \href{#method-ExploreDatasetH5AD-backend_kind}{\code{ExploreDatasetH5AD$backend_kind()}} -\item \href{#method-ExploreDatasetH5AD-samples}{\code{ExploreDatasetH5AD$samples()}} -\item \href{#method-ExploreDatasetH5AD-features}{\code{ExploreDatasetH5AD$features()}} -\item \href{#method-ExploreDatasetH5AD-de}{\code{ExploreDatasetH5AD$de()}} -\item \href{#method-ExploreDatasetH5AD-assay_names}{\code{ExploreDatasetH5AD$assay_names()}} -\item \href{#method-ExploreDatasetH5AD-assay}{\code{ExploreDatasetH5AD$assay()}} -\item \href{#method-ExploreDatasetH5AD-enrichment}{\code{ExploreDatasetH5AD$enrichment()}} -\item \href{#method-ExploreDatasetH5AD-enrichment_table}{\code{ExploreDatasetH5AD$enrichment_table()}} -\item \href{#method-ExploreDatasetH5AD-enrichment_input}{\code{ExploreDatasetH5AD$enrichment_input()}} -\item \href{#method-ExploreDatasetH5AD-clone}{\code{ExploreDatasetH5AD$clone()}} -} -} -\if{html}{\out{ -
Inherited methods + \itemize{ + \item \href{#method-ExploreDatasetH5AD-initialize}{\code{ExploreDatasetH5AD$new()}} + \item \href{#method-ExploreDatasetH5AD-backend}{\code{ExploreDatasetH5AD$backend()}} + \item \href{#method-ExploreDatasetH5AD-backend_kind}{\code{ExploreDatasetH5AD$backend_kind()}} + \item \href{#method-ExploreDatasetH5AD-samples}{\code{ExploreDatasetH5AD$samples()}} + \item \href{#method-ExploreDatasetH5AD-features}{\code{ExploreDatasetH5AD$features()}} + \item \href{#method-ExploreDatasetH5AD-de}{\code{ExploreDatasetH5AD$de()}} + \item \href{#method-ExploreDatasetH5AD-assay_names}{\code{ExploreDatasetH5AD$assay_names()}} + \item \href{#method-ExploreDatasetH5AD-assay}{\code{ExploreDatasetH5AD$assay()}} + \item \href{#method-ExploreDatasetH5AD-enrichment}{\code{ExploreDatasetH5AD$enrichment()}} + \item \href{#method-ExploreDatasetH5AD-enrichment_table}{\code{ExploreDatasetH5AD$enrichment_table()}} + \item \href{#method-ExploreDatasetH5AD-enrichment_input}{\code{ExploreDatasetH5AD$enrichment_input()}} + \item \href{#method-ExploreDatasetH5AD-clone}{\code{ExploreDatasetH5AD$clone()}} + } +} +\if{html}{\out{
Inherited methods -
-}} +
}} \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-ExploreDatasetH5AD-new}{}}} -\subsection{Method \code{new()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetH5AD$new(input, config = NULL)}\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ExploreDatasetH5AD-initialize}{}}} +\subsection{\code{ExploreDatasetH5AD$new()}}{ + Read a canonical `.h5ad` or take a live AnnData, build the config from it unless one is given, + and prepare the feature and DE tables. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetH5AD$new(input, config = NULL)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{input}}{An `anndataR` AnnData object, or a path to an existing `.h5ad` file.} + \item{\code{config}}{Optional pre-built config list; built from the AnnData when `NULL`.} + } + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetH5AD-backend}{}}} -\subsection{Method \code{backend()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetH5AD$backend()}\if{html}{\out{
}} +\subsection{\code{ExploreDatasetH5AD$backend()}}{ + The AnnData parts read at construction, as `list(obs, var, layers, varm, uns)` of plain R + objects. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetH5AD$backend()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetH5AD-backend_kind}{}}} -\subsection{Method \code{backend_kind()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetH5AD$backend_kind()}\if{html}{\out{
}} +\subsection{\code{ExploreDatasetH5AD$backend_kind()}}{ + Returns `"h5ad"`. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetH5AD$backend_kind()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetH5AD-samples}{}}} -\subsection{Method \code{samples()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetH5AD$samples()}\if{html}{\out{
}} +\subsection{\code{ExploreDatasetH5AD$samples()}}{ + Sample metadata from `obs`, with the `factor_` prefix stripped from column names and a `Name` + column added when missing. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetH5AD$samples()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetH5AD-features}{}}} -\subsection{Method \code{features()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetH5AD$features()}\if{html}{\out{
}} +\subsection{\code{ExploreDatasetH5AD$features()}}{ + Feature annotation from `var`, with `feature_id` and `display_name` columns, ordered by the + p-value of the primary contrast. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetH5AD$features()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetH5AD-de}{}}} -\subsection{Method \code{de()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetH5AD$de(contrast)}\if{html}{\out{
}} +\subsection{\code{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. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetH5AD$de(contrast)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{contrast}}{Contrast name, one of `contrasts()`.} + } + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetH5AD-assay_names}{}}} -\subsection{Method \code{assay_names()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetH5AD$assay_names()}\if{html}{\out{
}} +\subsection{\code{ExploreDatasetH5AD$assay_names()}}{ + Canonical assay names from the config's assay map whose layer exists; computed assays are + always included. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetH5AD$assay_names()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetH5AD-assay}{}}} -\subsection{Method \code{assay()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetH5AD$assay(name, features = NULL, samples = NULL)}\if{html}{\out{
}} +\subsection{\code{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. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetH5AD$assay(name, features = NULL, samples = NULL)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{name}}{Canonical assay name, one of `assay_names()`.} + \item{\code{features}}{Feature IDs (rows) to keep; `NULL` keeps all.} + \item{\code{samples}}{Sample IDs (columns) to keep; `NULL` keeps all.} + } + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetH5AD-enrichment}{}}} -\subsection{Method \code{enrichment()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetH5AD$enrichment(contrast, kind)}\if{html}{\out{
}} +\subsection{\code{ExploreDatasetH5AD$enrichment()}}{ + Enrichment results of one contrast and kind: decoded from the serialised objects in older files, + otherwise rebuilt from `uns$enrichment` and `uns$enrichment_support`. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetH5AD$enrichment(contrast, kind)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{contrast}}{Contrast name, one of `contrasts()`.} + \item{\code{kind}}{`"ora"` or `"gsea"`.} + } + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetH5AD-enrichment_table}{}}} -\subsection{Method \code{enrichment_table()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetH5AD$enrichment_table(contrast, kind)}\if{html}{\out{
}} +\subsection{\code{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. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetH5AD$enrichment_table(contrast, kind)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{contrast}}{Contrast name, one of `contrasts()`.} + \item{\code{kind}}{`"ora"` or `"gsea"`.} + } + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetH5AD-enrichment_input}{}}} -\subsection{Method \code{enrichment_input()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetH5AD$enrichment_input(contrast)}\if{html}{\out{
}} +\subsection{\code{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. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetH5AD$enrichment_input(contrast)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{contrast}}{Contrast name, one of `contrasts()`.} + } + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetH5AD-clone}{}}} -\subsection{Method \code{clone()}}{ -The objects of this class are cloneable with this method. -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetH5AD$clone(deep = FALSE)}\if{html}{\out{
}} +\subsection{\code{ExploreDatasetH5AD$clone()}}{ + The objects of this class are cloneable with this method. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetH5AD$clone(deep = FALSE)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{deep}}{Whether to make a deep clone.} + } + \if{html}{\out{
}} + } } -\subsection{Arguments}{ -\if{html}{\out{
}} -\describe{ -\item{\code{deep}}{Whether to make a deep clone.} -} -\if{html}{\out{
}} -} -} } diff --git a/man/ExploreDatasetParquet.Rd b/man/ExploreDatasetParquet.Rd index 201684a..e0854b1 100644 --- a/man/ExploreDatasetParquet.Rd +++ b/man/ExploreDatasetParquet.Rd @@ -12,160 +12,197 @@ differs. } \keyword{internal} \section{Super classes}{ -\code{\link[exploreDE:ExploreDataset]{exploreDE::ExploreDataset}} -> \code{\link[exploreDE:ExploreDatasetH5AD]{exploreDE::ExploreDatasetH5AD}} -> \code{ExploreDatasetParquet} +\code{\link[exploreDE:ExploreDataset]{ExploreDataset}} -> \code{\link[exploreDE:ExploreDatasetH5AD]{ExploreDatasetH5AD}} -> \code{ExploreDatasetParquet} } \section{Methods}{ \subsection{Public methods}{ -\itemize{ -\item \href{#method-ExploreDatasetParquet-new}{\code{ExploreDatasetParquet$new()}} -\item \href{#method-ExploreDatasetParquet-backend_kind}{\code{ExploreDatasetParquet$backend_kind()}} -\item \href{#method-ExploreDatasetParquet-enrichment}{\code{ExploreDatasetParquet$enrichment()}} -\item \href{#method-ExploreDatasetParquet-manifest}{\code{ExploreDatasetParquet$manifest()}} -\item \href{#method-ExploreDatasetParquet-source_dir}{\code{ExploreDatasetParquet$source_dir()}} -\item \href{#method-ExploreDatasetParquet-verify_source}{\code{ExploreDatasetParquet$verify_source()}} -\item \href{#method-ExploreDatasetParquet-all_pathways}{\code{ExploreDatasetParquet$all_pathways()}} -\item \href{#method-ExploreDatasetParquet-clone}{\code{ExploreDatasetParquet$clone()}} -} -} -\if{html}{\out{ -
Inherited methods + \itemize{ + \item \href{#method-ExploreDatasetParquet-initialize}{\code{ExploreDatasetParquet$new()}} + \item \href{#method-ExploreDatasetParquet-backend_kind}{\code{ExploreDatasetParquet$backend_kind()}} + \item \href{#method-ExploreDatasetParquet-enrichment}{\code{ExploreDatasetParquet$enrichment()}} + \item \href{#method-ExploreDatasetParquet-manifest}{\code{ExploreDatasetParquet$manifest()}} + \item \href{#method-ExploreDatasetParquet-source_dir}{\code{ExploreDatasetParquet$source_dir()}} + \item \href{#method-ExploreDatasetParquet-verify_source}{\code{ExploreDatasetParquet$verify_source()}} + \item \href{#method-ExploreDatasetParquet-all_pathways}{\code{ExploreDatasetParquet$all_pathways()}} + \item \href{#method-ExploreDatasetParquet-clone}{\code{ExploreDatasetParquet$clone()}} + } +} +\if{html}{\out{
Inherited methods -
-}} +
}} \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-ExploreDatasetParquet-new}{}}} -\subsection{Method \code{new()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetParquet$new(input, config = NULL)}\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ExploreDatasetParquet-initialize}{}}} +\subsection{\code{ExploreDatasetParquet$new()}}{ + Read the parquet directory (manifest, obs, var, layers, varm, uns), build the config unless one + is given, prepare the feature and DE tables, and warn when the source `.h5ad` has changed since export. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetParquet$new(input, config = NULL)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{input}}{Path to the parquet directory.} + \item{\code{config}}{Optional pre-built config list; derived from `uns.json` when omitted.} + } + \if{html}{\out{
}} + } } -\subsection{Arguments}{ -\if{html}{\out{
}} -\describe{ -\item{\code{input}}{Path to the parquet directory.} - -\item{\code{config}}{Optional pre-built config list; derived from `uns.json` when -omitted.} -} -\if{html}{\out{
}} -} -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetParquet-backend_kind}{}}} -\subsection{Method \code{backend_kind()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetParquet$backend_kind()}\if{html}{\out{
}} +\subsection{\code{ExploreDatasetParquet$backend_kind()}}{ + Returns `"parquet"`. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetParquet$backend_kind()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetParquet-enrichment}{}}} -\subsection{Method \code{enrichment()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetParquet$enrichment(contrast, kind)}\if{html}{\out{
}} +\subsection{\code{ExploreDatasetParquet$enrichment()}}{ + Enrichment results of one contrast and kind: reads the contrast's enrichment payload files on + first use, then defers to the `.h5ad` backend's implementation. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetParquet$enrichment(contrast, kind)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{contrast}}{Contrast name, one of `contrasts()`.} + \item{\code{kind}}{`"ora"` or `"gsea"`.} + } + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetParquet-manifest}{}}} -\subsection{Method \code{manifest()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetParquet$manifest()}\if{html}{\out{
}} +\subsection{\code{ExploreDatasetParquet$manifest()}}{ + The parsed `manifest.json` of the parquet directory. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetParquet$manifest()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetParquet-source_dir}{}}} -\subsection{Method \code{source_dir()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetParquet$source_dir()}\if{html}{\out{
}} +\subsection{\code{ExploreDatasetParquet$source_dir()}}{ + Path of the parquet directory. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetParquet$source_dir()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetParquet-verify_source}{}}} -\subsection{Method \code{verify_source()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetParquet$verify_source(path = NULL)}\if{html}{\out{
}} +\subsection{\code{ExploreDatasetParquet$verify_source()}}{ + Compare the md5 of the source `.h5ad` with the one recorded in the manifest: `TRUE` when it + matches, `FALSE` when not, `NA` when there is nothing to check against. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetParquet$verify_source(path = NULL)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{path}}{Path to the source `.h5ad`; `NULL` (default) uses the path recorded in the manifest.} + } + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetParquet-all_pathways}{}}} -\subsection{Method \code{all_pathways()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetParquet$all_pathways()}\if{html}{\out{
}} +\subsection{\code{ExploreDatasetParquet$all_pathways()}}{ + GO terms as in the base class, but an empty vector when clusterProfiler is not installed. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetParquet$all_pathways()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetParquet-clone}{}}} -\subsection{Method \code{clone()}}{ -The objects of this class are cloneable with this method. -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetParquet$clone(deep = FALSE)}\if{html}{\out{
}} +\subsection{\code{ExploreDatasetParquet$clone()}}{ + The objects of this class are cloneable with this method. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetParquet$clone(deep = FALSE)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{deep}}{Whether to make a deep clone.} + } + \if{html}{\out{
}} + } } -\subsection{Arguments}{ -\if{html}{\out{
}} -\describe{ -\item{\code{deep}}{Whether to make a deep clone.} -} -\if{html}{\out{
}} -} -} } diff --git a/man/ExploreDatasetSE.Rd b/man/ExploreDatasetSE.Rd index 4bde4dc..6124af1 100644 --- a/man/ExploreDatasetSE.Rd +++ b/man/ExploreDatasetSE.Rd @@ -9,8 +9,7 @@ reference and implements the accessor contract uniformly for every SE shape. Concrete subclasses (`ExploreDatasetSE_RNASeq`, `_CountQC`, `_CrisprCountQC`, `_Proteomics`) override two private methods only: -} -\details{ + - `.build_config(se)` — returns the per-instance config list at `$initialize()` time - `.prep()` — populates `private$.features_df`, `private$.de_dfs`, @@ -20,174 +19,250 @@ This class is not instantiable on its own — instantiate a concrete subclass instead. } \section{Super class}{ -\code{\link[exploreDE:ExploreDataset]{exploreDE::ExploreDataset}} -> \code{ExploreDatasetSE} +\code{\link[exploreDE:ExploreDataset]{ExploreDataset}} -> \code{ExploreDatasetSE} } \section{Methods}{ \subsection{Public methods}{ -\itemize{ -\item \href{#method-ExploreDatasetSE-new}{\code{ExploreDatasetSE$new()}} -\item \href{#method-ExploreDatasetSE-backend}{\code{ExploreDatasetSE$backend()}} -\item \href{#method-ExploreDatasetSE-backend_kind}{\code{ExploreDatasetSE$backend_kind()}} -\item \href{#method-ExploreDatasetSE-samples}{\code{ExploreDatasetSE$samples()}} -\item \href{#method-ExploreDatasetSE-features}{\code{ExploreDatasetSE$features()}} -\item \href{#method-ExploreDatasetSE-de}{\code{ExploreDatasetSE$de()}} -\item \href{#method-ExploreDatasetSE-assay_names}{\code{ExploreDatasetSE$assay_names()}} -\item \href{#method-ExploreDatasetSE-assay}{\code{ExploreDatasetSE$assay()}} -\item \href{#method-ExploreDatasetSE-enrichment}{\code{ExploreDatasetSE$enrichment()}} -\item \href{#method-ExploreDatasetSE-enrichment_input}{\code{ExploreDatasetSE$enrichment_input()}} -\item \href{#method-ExploreDatasetSE-clone}{\code{ExploreDatasetSE$clone()}} + \itemize{ + \item \href{#method-ExploreDatasetSE-initialize}{\code{ExploreDatasetSE$new()}} + \item \href{#method-ExploreDatasetSE-backend}{\code{ExploreDatasetSE$backend()}} + \item \href{#method-ExploreDatasetSE-backend_kind}{\code{ExploreDatasetSE$backend_kind()}} + \item \href{#method-ExploreDatasetSE-samples}{\code{ExploreDatasetSE$samples()}} + \item \href{#method-ExploreDatasetSE-features}{\code{ExploreDatasetSE$features()}} + \item \href{#method-ExploreDatasetSE-de}{\code{ExploreDatasetSE$de()}} + \item \href{#method-ExploreDatasetSE-assay_names}{\code{ExploreDatasetSE$assay_names()}} + \item \href{#method-ExploreDatasetSE-assay}{\code{ExploreDatasetSE$assay()}} + \item \href{#method-ExploreDatasetSE-enrichment}{\code{ExploreDatasetSE$enrichment()}} + \item \href{#method-ExploreDatasetSE-enrichment_input}{\code{ExploreDatasetSE$enrichment_input()}} + \item \href{#method-ExploreDatasetSE-clone}{\code{ExploreDatasetSE$clone()}} + } } -} -\if{html}{\out{ -
Inherited methods +\if{html}{\out{
Inherited methods -
-}} +
}} \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-ExploreDatasetSE-new}{}}} -\subsection{Method \code{new()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetSE$new(se, config = NULL)}\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ExploreDatasetSE-initialize}{}}} +\subsection{\code{ExploreDatasetSE$new()}}{ + Wrap a `SummarizedExperiment`: store it, build the config from it unless one is given, and + prepare the feature and DE tables. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetSE$new(se, config = NULL)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{se}}{A `SummarizedExperiment`.} + \item{\code{config}}{Optional pre-built config list; built from `se` by the subclass when `NULL`.} + } + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetSE-backend}{}}} -\subsection{Method \code{backend()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetSE$backend()}\if{html}{\out{
}} +\subsection{\code{ExploreDatasetSE$backend()}}{ + The wrapped `SummarizedExperiment`. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetSE$backend()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetSE-backend_kind}{}}} -\subsection{Method \code{backend_kind()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetSE$backend_kind()}\if{html}{\out{
}} +\subsection{\code{ExploreDatasetSE$backend_kind()}}{ + Returns `"se"`. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetSE$backend_kind()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetSE-samples}{}}} -\subsection{Method \code{samples()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetSE$samples()}\if{html}{\out{
}} +\subsection{\code{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. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetSE$samples()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetSE-features}{}}} -\subsection{Method \code{features()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetSE$features()}\if{html}{\out{
}} +\subsection{\code{ExploreDatasetSE$features()}}{ + Feature annotation table, prepared from `rowData()` by the subclass. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetSE$features()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetSE-de}{}}} -\subsection{Method \code{de()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetSE$de(contrast)}\if{html}{\out{
}} +\subsection{\code{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. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetSE$de(contrast)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{contrast}}{Contrast name, one of `contrasts()`.} + } + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetSE-assay_names}{}}} -\subsection{Method \code{assay_names()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetSE$assay_names()}\if{html}{\out{
}} +\subsection{\code{ExploreDatasetSE$assay_names()}}{ + Canonical assay names from the config's assay map whose SE assay exists; computed assays are + always included. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetSE$assay_names()} + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetSE-assay}{}}} -\subsection{Method \code{assay()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetSE$assay(name, features = NULL, samples = NULL)}\if{html}{\out{
}} +\subsection{\code{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. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetSE$assay(name, features = NULL, samples = NULL)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{name}}{Canonical assay name, one of `assay_names()`.} + \item{\code{features}}{Feature IDs (rows) to keep; `NULL` keeps all.} + \item{\code{samples}}{Sample IDs (columns) to keep; `NULL` keeps all.} + } + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetSE-enrichment}{}}} -\subsection{Method \code{enrichment()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetSE$enrichment(contrast, kind)}\if{html}{\out{
}} +\subsection{\code{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. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetSE$enrichment(contrast, kind)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{contrast}}{Contrast name; not used by this backend.} + \item{\code{kind}}{`"ora"` or `"gsea"`.} + } + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetSE-enrichment_input}{}}} -\subsection{Method \code{enrichment_input()}}{ -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetSE$enrichment_input(contrast)}\if{html}{\out{
}} +\subsection{\code{ExploreDatasetSE$enrichment_input()}}{ + Enrichment inputs read from `metadata(se)$enrichInput`, with `NULL` fields and no selections when + absent. `contrast` is not used. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetSE$enrichment_input(contrast)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{contrast}}{Contrast name; not used by this backend.} + } + \if{html}{\out{
}} + } } -} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetSE-clone}{}}} -\subsection{Method \code{clone()}}{ -The objects of this class are cloneable with this method. -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetSE$clone(deep = FALSE)}\if{html}{\out{
}} +\subsection{\code{ExploreDatasetSE$clone()}}{ + The objects of this class are cloneable with this method. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetSE$clone(deep = FALSE)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{deep}}{Whether to make a deep clone.} + } + \if{html}{\out{
}} + } } -\subsection{Arguments}{ -\if{html}{\out{
}} -\describe{ -\item{\code{deep}}{Whether to make a deep clone.} -} -\if{html}{\out{
}} -} -} } diff --git a/man/ExploreDatasetSE_CountQC.Rd b/man/ExploreDatasetSE_CountQC.Rd index 1955b4b..cfff920 100644 --- a/man/ExploreDatasetSE_CountQC.Rd +++ b/man/ExploreDatasetSE_CountQC.Rd @@ -13,84 +13,84 @@ Inherits the accessor contract from [ExploreDataset] via [ExploreDatasetSE]; overrides only `.build_config()` and `.prep()`. } \section{Super classes}{ -\code{\link[exploreDE:ExploreDataset]{exploreDE::ExploreDataset}} -> \code{\link[exploreDE:ExploreDatasetSE]{exploreDE::ExploreDatasetSE}} -> \code{ExploreDatasetSE_CountQC} +\code{\link[exploreDE:ExploreDataset]{ExploreDataset}} -> \code{\link[exploreDE:ExploreDatasetSE]{ExploreDatasetSE}} -> \code{ExploreDatasetSE_CountQC} } \section{Methods}{ \subsection{Public methods}{ -\itemize{ -\item \href{#method-ExploreDatasetSE_CountQC-clone}{\code{ExploreDatasetSE_CountQC$clone()}} + \itemize{ + \item \href{#method-ExploreDatasetSE_CountQC-clone}{\code{ExploreDatasetSE_CountQC$clone()}} + } } -} -\if{html}{\out{ -
Inherited methods +\if{html}{\out{
Inherited methods -
-}} +
}} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetSE_CountQC-clone}{}}} -\subsection{Method \code{clone()}}{ -The objects of this class are cloneable with this method. -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetSE_CountQC$clone(deep = FALSE)}\if{html}{\out{
}} +\subsection{\code{ExploreDatasetSE_CountQC$clone()}}{ + The objects of this class are cloneable with this method. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetSE_CountQC$clone(deep = FALSE)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{deep}}{Whether to make a deep clone.} + } + \if{html}{\out{
}} + } } -\subsection{Arguments}{ -\if{html}{\out{
}} -\describe{ -\item{\code{deep}}{Whether to make a deep clone.} -} -\if{html}{\out{
}} -} -} } diff --git a/man/ExploreDatasetSE_CrisprCountQC.Rd b/man/ExploreDatasetSE_CrisprCountQC.Rd index 7914f56..30e9caf 100644 --- a/man/ExploreDatasetSE_CrisprCountQC.Rd +++ b/man/ExploreDatasetSE_CrisprCountQC.Rd @@ -12,84 +12,84 @@ parsed from the SE feature IDs, which are assumed to follow the Inherits `.prep()` from [ExploreDatasetSE_CountQC] unchanged. } \section{Super classes}{ -\code{\link[exploreDE:ExploreDataset]{exploreDE::ExploreDataset}} -> \code{\link[exploreDE:ExploreDatasetSE]{exploreDE::ExploreDatasetSE}} -> \code{\link[exploreDE:ExploreDatasetSE_CountQC]{exploreDE::ExploreDatasetSE_CountQC}} -> \code{ExploreDatasetSE_CrisprCountQC} +\code{\link[exploreDE:ExploreDataset]{ExploreDataset}} -> \code{\link[exploreDE:ExploreDatasetSE]{ExploreDatasetSE}} -> \code{\link[exploreDE:ExploreDatasetSE_CountQC]{ExploreDatasetSE_CountQC}} -> \code{ExploreDatasetSE_CrisprCountQC} } \section{Methods}{ \subsection{Public methods}{ -\itemize{ -\item \href{#method-ExploreDatasetSE_CrisprCountQC-clone}{\code{ExploreDatasetSE_CrisprCountQC$clone()}} + \itemize{ + \item \href{#method-ExploreDatasetSE_CrisprCountQC-clone}{\code{ExploreDatasetSE_CrisprCountQC$clone()}} + } } -} -\if{html}{\out{ -
Inherited methods +\if{html}{\out{
Inherited methods -
-}} +
}} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetSE_CrisprCountQC-clone}{}}} -\subsection{Method \code{clone()}}{ -The objects of this class are cloneable with this method. -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetSE_CrisprCountQC$clone(deep = FALSE)}\if{html}{\out{
}} +\subsection{\code{ExploreDatasetSE_CrisprCountQC$clone()}}{ + The objects of this class are cloneable with this method. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetSE_CrisprCountQC$clone(deep = FALSE)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{deep}}{Whether to make a deep clone.} + } + \if{html}{\out{
}} + } } -\subsection{Arguments}{ -\if{html}{\out{
}} -\describe{ -\item{\code{deep}}{Whether to make a deep clone.} -} -\if{html}{\out{
}} -} -} } diff --git a/man/ExploreDatasetSE_Proteomics.Rd b/man/ExploreDatasetSE_Proteomics.Rd index 4d3bf88..7fc4003 100644 --- a/man/ExploreDatasetSE_Proteomics.Rd +++ b/man/ExploreDatasetSE_Proteomics.Rd @@ -18,84 +18,84 @@ Inherits the accessor contract from [ExploreDataset] via [ExploreDatasetSE]; overrides `.build_config()` and `.prep()`. } \section{Super classes}{ -\code{\link[exploreDE:ExploreDataset]{exploreDE::ExploreDataset}} -> \code{\link[exploreDE:ExploreDatasetSE]{exploreDE::ExploreDatasetSE}} -> \code{ExploreDatasetSE_Proteomics} +\code{\link[exploreDE:ExploreDataset]{ExploreDataset}} -> \code{\link[exploreDE:ExploreDatasetSE]{ExploreDatasetSE}} -> \code{ExploreDatasetSE_Proteomics} } \section{Methods}{ \subsection{Public methods}{ -\itemize{ -\item \href{#method-ExploreDatasetSE_Proteomics-clone}{\code{ExploreDatasetSE_Proteomics$clone()}} + \itemize{ + \item \href{#method-ExploreDatasetSE_Proteomics-clone}{\code{ExploreDatasetSE_Proteomics$clone()}} + } } -} -\if{html}{\out{ -
Inherited methods +\if{html}{\out{
Inherited methods -
-}} +
}} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetSE_Proteomics-clone}{}}} -\subsection{Method \code{clone()}}{ -The objects of this class are cloneable with this method. -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetSE_Proteomics$clone(deep = FALSE)}\if{html}{\out{
}} +\subsection{\code{ExploreDatasetSE_Proteomics$clone()}}{ + The objects of this class are cloneable with this method. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetSE_Proteomics$clone(deep = FALSE)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{deep}}{Whether to make a deep clone.} + } + \if{html}{\out{
}} + } } -\subsection{Arguments}{ -\if{html}{\out{
}} -\describe{ -\item{\code{deep}}{Whether to make a deep clone.} -} -\if{html}{\out{
}} -} -} } diff --git a/man/ExploreDatasetSE_RNASeq.Rd b/man/ExploreDatasetSE_RNASeq.Rd index 50e58d0..47d48d7 100644 --- a/man/ExploreDatasetSE_RNASeq.Rd +++ b/man/ExploreDatasetSE_RNASeq.Rd @@ -15,84 +15,84 @@ Inherits the accessor contract from [ExploreDataset] via [ExploreDatasetSE]; overrides only `.build_config()` and `.prep()`. } \section{Super classes}{ -\code{\link[exploreDE:ExploreDataset]{exploreDE::ExploreDataset}} -> \code{\link[exploreDE:ExploreDatasetSE]{exploreDE::ExploreDatasetSE}} -> \code{ExploreDatasetSE_RNASeq} +\code{\link[exploreDE:ExploreDataset]{ExploreDataset}} -> \code{\link[exploreDE:ExploreDatasetSE]{ExploreDatasetSE}} -> \code{ExploreDatasetSE_RNASeq} } \section{Methods}{ \subsection{Public methods}{ -\itemize{ -\item \href{#method-ExploreDatasetSE_RNASeq-clone}{\code{ExploreDatasetSE_RNASeq$clone()}} + \itemize{ + \item \href{#method-ExploreDatasetSE_RNASeq-clone}{\code{ExploreDatasetSE_RNASeq$clone()}} + } } -} -\if{html}{\out{ -
Inherited methods +\if{html}{\out{
Inherited methods -
-}} +
}} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ExploreDatasetSE_RNASeq-clone}{}}} -\subsection{Method \code{clone()}}{ -The objects of this class are cloneable with this method. -\subsection{Usage}{ -\if{html}{\out{
}}\preformatted{ExploreDatasetSE_RNASeq$clone(deep = FALSE)}\if{html}{\out{
}} +\subsection{\code{ExploreDatasetSE_RNASeq$clone()}}{ + The objects of this class are cloneable with this method. + \subsection{Usage}{ + \if{html}{\out{
}} + \preformatted{ExploreDatasetSE_RNASeq$clone(deep = FALSE)} + \if{html}{\out{
}} + } + \subsection{Arguments}{ + \if{html}{\out{
}} + \describe{ + \item{\code{deep}}{Whether to make a deep clone.} + } + \if{html}{\out{
}} + } } -\subsection{Arguments}{ -\if{html}{\out{
}} -\describe{ -\item{\code{deep}}{Whether to make a deep clone.} -} -\if{html}{\out{
}} -} -} }