## ----include = FALSE----------------------------------------------------------
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

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

data.frame(
  study = c("lc500", "lc500s"),
  mode = c(
    CohortContrast::checkDataMode(patientStudyPath)$mode,
    CohortContrast::checkDataMode(summaryStudyPath)$mode
  )
)

## ----include = TRUE, eval=FALSE, echo=TRUE------------------------------------
# summary_result <- CohortContrast::precomputeSummary(
#   studyPath = file.path(getwd(), "studies", "LungCancer_1Y"),
#   outputPath = file.path(getwd(), "studies", "LungCancer_1Y_summary"),
#   clusterKValues = c(2, 3, 4, 5),
#   minCellCount = 5
# )
# 
# # Open viewer and load the summary study
# CohortContrast::runCohortContrastViewer(
#   dataDir = file.path(getwd(), "studies")
# )

