Sidepanel Filters and Controls

Introduction

This vignette documents the left sidepanel controls in the Viewer and how they interact.

One important sidepanel dependency is the detected data mode. The bundled lc500s example is in summary mode and includes precomputed clustering results:

summaryStudyPath <- system.file("example", "st", "lc500s", package = "CohortContrast")

# Summary studies expose the available cluster counts up front.
CohortContrast::checkDataMode(summaryStudyPath)[c("mode", "has_clustering", "clusterKValues")]
#> $mode
#> [1] "summary"
#> 
#> $has_clustering
#> [1] TRUE
#> 
#> $clusterKValues
#> [1] 2 3 4 5

This is why controls such as cluster count selection and summary-mode filtering can be enabled immediately when the study is loaded.

Sidepanel controls
Sidepanel controls

Important model: staged vs applied

Most sidepanel inputs are staged until you click Apply Filters.

Action buttons

Apply Filters

Recomputes concept visibility from sidepanel criteria:

Then plot-level filtering is applied (cluster prevalence / Top N by SD) when rendering the dashboard.

Apply Table Selection

Persists manual table Show values as active visibility state.

Special rule:

Recluster

Runs live reclustering only in Patient mode.

Sidepanel controls

Heritage Types

Domain-family include/exclude control.

Target Prevalence (%)

Range filter on target cohort prevalence.

Prevalence Difference Ratio

Range filter on contrast effect size.

Show ordinal data rows for active main concepts

Toggles whether ordinal rows are shown.

Cluster Prevalence (%)

Minimum prevalence threshold within the currently selected cluster view.

Top N Concepts by SD (across clusters)

Keeps only the top N main concepts with highest prevalence SD across clusters.

Divergence Cluster Scope

Optional cluster subset used by Top N by SD ranking.

Clusters

Selects cluster count (Auto, 2, 3, 4, 5).

Clustering scope

Controls whether clustering uses:

Only relevant in patient mode; visually disabled in summary mode.

Override and precedence rules

  1. Apply Filters overrides manual table visibility edits by recomputing _show from filter criteria.
  2. Apply Table Selection can be used after filtering to apply additional manual curation.
  3. Cluster count change alone does nothing until a clustering commit action occurs.
  4. Top N by SD is applied after other filters and can further shrink the visible concept set.
  5. Cluster Prevalence (%) applies only for a specific selected cluster view.

Mode-specific behavior

Patient mode

Summary mode