Package: CohortContrast 1.0.0

Markus Haug

CohortContrast: Enrichment Analysis of Clinically Relevant Concepts in Common Data Model Cohort Data

Identifies clinically relevant concepts in Observational Medical Outcomes Partnership Common Data Model cohorts using an enrichment-based workflow. Defines target and control cohorts and extracts medical interventions that are over-represented in the target cohort during the observation period. Users can tune filtering and selection thresholds. The workflow includes chi-squared tests for two proportions with Yates continuity correction, logistic tests, and hierarchy and correlation mappings for relevant concepts. The results can be optionally explored using the bundled graphical user interface. For workflow details and examples, see <https://healthinformaticsut.github.io/CohortContrast/>.

Authors:Markus Haug [aut, cre], Raivo Kolde [aut]

CohortContrast_1.0.0.tar.gz
CohortContrast_1.0.0.zip(r-4.7-any)CohortContrast_1.0.0.zip(r-4.6-any)CohortContrast_1.0.0.zip(r-4.5-any)
CohortContrast_1.0.0.tgz(r-4.6-any)CohortContrast_1.0.0.tgz(r-4.5-any)
CohortContrast_1.0.0.tar.gz(r-4.7-any)CohortContrast_1.0.0.tar.gz(r-4.6-any)
CohortContrast_1.0.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION
card.svg |card.png
CohortContrast/json (API)

# Install 'CohortContrast' in R:
install.packages('CohortContrast', repos = c('https://healthinformaticsut.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/healthinformaticsut/cohortcontrast/issues

Pkgdown/docs site:https://healthinformaticsut.github.io

On CRAN:

Conda:

6.70 score 4 stars 14 scripts 249 downloads 26 exports 56 dependencies

Last updated from:658d6971d9. Checks:7 NOTE, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develNOTE158
source / vignettesOK225
linux-releaseNOTE163
macos-releaseNOTE153
macos-oldrelNOTE175
windows-develNOTE113
windows-releaseNOTE112
windows-oldrelNOTE85
wasm-releaseOK139

Exports:automaticCorrelationCombineConceptsautomaticHierarchyCombineConceptscheckDataModecheckPythonDepsCohortContrastcohortFromCohortTablecohortFromCSVcohortFromDataTablecohortFromJSONconfigurePythoncreateControlCohortInversecreateControlCohortMatchinggenerateMappingTablegetPythonInfogetTopSeparatingConceptsinstallPythonDepsinstallPythonDepsOfflineloadCohortContrastStudymatchCohortsByAgenGramClusterSummarizationnGramDiscoveryprecomputeSummaryremoveTemporalBiasresolveCohortTableOverlapsrunCohortContrastViewerstopCohortContrastViewer

Dependencies:askpassbackportsbitbit64blobCDMConnectorcheckmateclicliprclockCodelistGeneratorcodetoolsCohortConstructorcpp11crayoncurldata.tableDBIdbplyrdoParalleldplyrforeachgenericsgluehmshttr2iteratorsjsonlitelifecyclelubridatemagrittrnanoparquetomopgenericsopensslPatientProfilespillarpkgconfigprettyunitsprogresspurrrR6readrrlangsnakecasestringistringrsystibbletidyrtidyselecttimechangetzdbutf8vctrsvroomwithr

ICD10 Atlas Generation
Goal | Package versions used for the wiki page | Required environment variables | Connect to the OMOP database | Define the observation windows | Identify eligible ICD10 three-digit codes | Helper for clean study names | Build the target cohort | Build the visit-based control cohort | Keep only the final selected concepts | Run one ICD10 code and one observation window | Run the full atlas generation loop | Resulting output folders

Last update: 2026-08-25
Started: 2026-04-22

Setup
Introduction | Installation | Load packages | Initiating database connection | Configuring Python dependencies (for GUI and summary precompute) | Air-gapped server setup | Building a target cohort | 1. Target cohort from OHDSI OMOP database. | 2. Target cohort from JSON description file. | 3. Target cohort from a CSV file. | 4. Target cohort from a table | Building a control cohort | 1. Control cohort based on matches | 2. Control cohort based on inverse controls | Other considerations

Last update: 2026-07-14
Started: 2024-12-17

Article Case Study Generation
Goal | Expected JSON layout | Notes | Package versions used for the wiki page | Required environment variables | Connect to the OMOP database | Define study cases | Build the target cohort | Build the visit-based control cohort | Keep only the final selected concepts | Run one final mapped study | Run all configured cases | Resulting study folders

Last update: 2026-07-14
Started: 2026-04-22

Air-gapped Server Setup
Scope | What differs in air-gapped environments | Offline setup workflow | 1. Prepare wheels on a connected machine | 2. Transfer wheels to the air-gapped server | 3. Configure Python in R | 4. Install dependencies from local wheels | 5. Validate before production usage | Offline smoke test | Summary precompute | GUI in server context | Runtime mode guidance for servers | Common failures and fixes | Minimal offline checklist

Last update: 2026-04-09
Started: 2026-03-17

Dashboard Composite Plot
Introduction | What the composite shows | How to use it | Interpretation guidance

Last update: 2026-04-09
Started: 2026-03-17

Demographics Tab
Introduction | Components | Controls | Patient vs Summary mode behavior | Interpretation

Last update: 2026-04-09
Started: 2026-03-17

Execution
Executing the study | The parameters | Mandatory: | Customization: | Notes: | Reloading a saved study

Last update: 2026-04-09
Started: 2024-12-17

Graphical User Interface
Introduction | Select a study and mode | Main workflow in the UI | Tabs | Mappings overview

Last update: 2026-04-09
Started: 2025-01-10

Mappings Tab
Introduction | Manual Merge | Hierarchy Suggestions | Correlation Suggestions | Mapping History

Last update: 2026-04-09
Started: 2026-03-17

Overlap Tab
Introduction | Components | Interpretation

Last update: 2026-04-09
Started: 2026-03-17

Patient vs Summary Mode
Introduction | How each mode is produced | What is different in the UI | Recommended usage

Last update: 2026-04-09
Started: 2026-03-17

Sidepanel Filters and Controls
Introduction | Important model: staged vs applied | Action buttons | Apply Filters | Apply Table Selection | Recluster | Sidepanel controls | Heritage Types | Target Prevalence (%) | Prevalence Difference Ratio | Show ordinal data rows for active main concepts | Cluster Prevalence (%) | Top N Concepts by SD (across clusters) | Divergence Cluster Scope | Clusters | Clustering scope | Override and precedence rules | Mode-specific behavior | Patient mode | Summary mode | Recommended operating sequence

Last update: 2026-04-09
Started: 2026-03-17

Trajectories Tab
Introduction | Controls | Interpretation

Last update: 2026-04-09
Started: 2026-03-17

Interpreting Results with lc500
Goal | Object Overview | data_initial | data_person | data_features | data_patients | complementaryMappingTable | selectedFeatureData | selectedFeatureData$selectedFeatureNames preview | selectedFeatureData$selectedFeatureIds preview | selectedFeatureData$selectedFeatures | conceptsData | conceptsData$concept_ancestor | conceptsData$concept | config | config$metadata scalar fields preview

Last update: 2026-04-02
Started: 2026-04-02

Interpreting Summary Results with lc500s
Goal | Summary Folder Metadata (metadata.json) | concept_summaries.parquet | ordinal_summaries.parquet | clustering_k*_summary.parquet | clustering_k2_summary.parquet | clustering_k3_summary.parquet | clustering_k4_summary.parquet | clustering_k5_summary.parquet | clustering_k*_pairwise_overlap.parquet | clustering_k2_pairwise_overlap.parquet | clustering_k3_pairwise_overlap.parquet | clustering_k4_pairwise_overlap.parquet | clustering_k5_pairwise_overlap.parquet | complementaryMappingTable.parquet

Last update: 2026-04-02
Started: 2026-04-02

Readme and manuals

Help Manual

Help pageTopics
Function for automatically combining concepts by hierarchy mappingautomaticCorrelationCombineConcepts
Function for automatically combining concepts by hierarchy mappingautomaticHierarchyCombineConcepts
Check if a Data Directory Contains Summary Mode DatacheckDataMode
Check Python DependenciescheckPythonDeps
Run CohortContrast AnalysisCohortContrast
CohortContrast Viewer - Interactive Disease Cohort VisualizationCohortContrastViewer
Read cohort from database cohort tablecohortFromCohortTable
Read cohort from CSVcohortFromCSV
Read cohort from data.frame objectcohortFromDataTable
Read cohort from JSONcohortFromJSON
Configure Python Environment for CohortContrast ViewerconfigurePython
Function for creating automatic matches based on inverse control logiccreateControlCohortInverse
Function for creating automatic matches based on age and sexcreateControlCohortMatching
Create a mapping table with predefined maximum abstraction levelgenerateMappingTable
Get Python Configuration InformationgetPythonInfo
Get Top Concepts That Best Separate ClustersgetTopSeparatingConcepts
Install Python DependenciesinstallPythonDeps
Install Python Dependencies OfflineinstallPythonDepsOffline
Load a Saved CohortContrast StudyloadCohortContrastStudy
Function for matching the control to target by agematchCohortsByAge
Function for summarizing ngrams from nGramDiscovery outputnGramClusterSummarization
Function for discovering ngrams from the extracted data from CohortContrast functionnGramDiscovery
Pre-compute Summary Data for a StudyprecomputeSummary
Remove Temporal Bias from CohortContrast AnalysisremoveTemporalBias
Resolve overlaps inside the cohort tableresolveCohortTableOverlaps
Run CohortContrast Viewer DashboardrunCohortContrastViewer
Stop CohortContrast Viewer DashboardstopCohortContrastViewer