From 68bdd3ce144e90453dda0c0e415a34bc3697ac7a Mon Sep 17 00:00:00 2001 From: Maarten van Kessel Date: Wed, 26 Jun 2024 13:56:57 +0200 Subject: [PATCH 01/14] include event cohorts that start and end on the end date of the target cohort --- R/constructPathways.R | 20 ++++++++++++++++---- tests/testthat/test-computePathways.R | 4 ++-- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/R/constructPathways.R b/R/constructPathways.R index e9ded538..18d976d8 100755 --- a/R/constructPathways.R +++ b/R/constructPathways.R @@ -203,15 +203,27 @@ createTreatmentHistory <- function( andromeda$cohortTable <- dplyr::full_join( x = andromeda$eventCohorts, y = andromeda$targetCohorts, - by = dplyr::join_by("personId", y$indexDate <= x$startDate, x$startDate < y$endDate) - ) + by = dplyr::join_by( + "personId", + y$indexDate <= x$startDate, + x$startDate <= y$endDate, + x$endDate <= y$endDate + )) } else if (includeTreatments == "endDate") { andromeda$cohortTable <- dplyr::full_join( x = andromeda$eventCohorts, y = andromeda$targetCohorts, - by = dplyr::join_by("personId", y$indexDate <= x$endDate, x$endDate < y$endDate)) %>% + by = dplyr::join_by( + "personId", + y$indexDate <= x$endDate, + x$endDate <= y$endDate + )) %>% dplyr::mutate( - startDate.x = pmax(.data$startDate.y - periodPriorToIndex, .data$startDate.x, na.rm = TRUE) + startDate.x = pmax( + .data$startDate.y - periodPriorToIndex, + .data$startDate.x, + na.rm = TRUE + ) ) } diff --git a/tests/testthat/test-computePathways.R b/tests/testthat/test-computePathways.R index 79a6a307..f31b5da8 100644 --- a/tests/testthat/test-computePathways.R +++ b/tests/testthat/test-computePathways.R @@ -24,7 +24,7 @@ test_that("computePathways DatabaseConnector", { ), "After combinationWindow: 555" ), - "Original number of rows: 8352" + "Original number of rows: 8366" ) }) @@ -43,7 +43,7 @@ test_that("computePathways CDMConnector", { ), "After combinationWindow: 555" ), - "Original number of rows: 8352" + "Original number of rows: 8366" ) DBI::dbDisconnect(globals$con, shutdown = TRUE) From 0954899dba691fc5a472eb0098f8b738491a0a9f Mon Sep 17 00:00:00 2001 From: Maarten van Kessel Date: Fri, 26 Jul 2024 16:12:17 +0200 Subject: [PATCH 02/14] Added fix for collapsing eras with combination --- R/constructPathways.R | 21 ++++++++--- tests/testthat/test-pathwaysLogical.R | 54 +++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 5 deletions(-) diff --git a/R/constructPathways.R b/R/constructPathways.R index 18d976d8..41f2ad4c 100755 --- a/R/constructPathways.R +++ b/R/constructPathways.R @@ -339,7 +339,7 @@ doEraCollapse <- function(andromeda, eraCollapseSize) { dplyr::select(-"needsMerge", -"rowNumber") %>% dplyr::mutate(durationEra = .data$eventEndDate - .data$eventStartDate) } else { - blockEnd <- needsMerge$rowNumber[seq_len(n)] != needsMerge$rowNumber[seq_len(n)] + 1 + blockEnd <- as.numeric(needsMerge$rowNumber[seq_len(n)] != needsMerge$rowNumber[seq_len(n)]) + 1 needsMerge$blockId <- cumsum(blockEnd) needsMerge <- needsMerge %>% dplyr::group_by(.data$blockId) %>% @@ -360,10 +360,21 @@ doEraCollapse <- function(andromeda, eraCollapseSize) { newEndDates, by = dplyr::join_by("rowNumber" == "startRowNumber")) %>% dplyr::mutate( - eventEndDate = if_else( - is.null(.data$newEndDate), - .data$eventEndDate, - .data$newEndDate)) %>% + eventEndDate = dplyr::case_when( + !is.na(.data$newEndDate) ~ .data$newEndDate, + .default = .data$eventEndDate + ), + needsMerge = dplyr::case_when( + !is.na(.data$newEndDate) ~ NA, + .default = .data$needsMerge + ) + ) %>% + dplyr::mutate(durationEra = .data$eventEndDate - eventStartDate) %>% + # dplyr::mutate( + # eventEndDate = if_else( + # is.null(.data$newEndDate), + # .data$eventEndDate, + # .data$newEndDate)) %>% dplyr::filter(is.na(.data$needsMerge)) %>% dplyr::select(-"newEndDate", -"needsMerge", -"rowNumber") %>% dplyr::mutate(durationEra = .data$eventEndDate - .data$eventStartDate) diff --git a/tests/testthat/test-pathwaysLogical.R b/tests/testthat/test-pathwaysLogical.R index 5cebd23b..7f42896f 100644 --- a/tests/testthat/test-pathwaysLogical.R +++ b/tests/testthat/test-pathwaysLogical.R @@ -1273,3 +1273,57 @@ test_that("start event > end target", { DBI::dbDisconnect(con) }) + +test_that("collapse A-B-B-B to A-A+B-B", { + con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) + + cohorts <- data.frame( + cohortId = c(1, 2, 3), + cohortName = c("X", "A", "B"), + type = c("target", "event", "event") + ) + + cohort_table <- dplyr::tribble( + ~cohort_definition_id, ~subject_id, ~cohort_start_date, ~cohort_end_date, + 1, 5, as.Date("2014-01-01"), as.Date("2015-12-31"), + 2, 5, as.Date("2014-05-20"), as.Date("2014-08-17"), + 3, 5, as.Date("2014-07-08"), as.Date("2014-08-25"), + 3, 5, as.Date("2014-10-19"), as.Date("2015-02-22"), + 3, 5, as.Date("2015-02-28"), as.Date("2015-09-26") + ) + + copy_to(con, cohort_table, overwrite = TRUE) + + cdm <- cdmFromCon(con, cdmSchema = "main", writeSchema = "main", cohortTables = "cohort_table") + + andromeda <- TreatmentPatterns::computePathways( + cohorts = cohorts, + cohortTableName = 'cohort_table', + cdm = cdm, + tempEmulationSchema = NULL, + includeTreatments = "startDate", + periodPriorToIndex = 0, + minEraDuration = 30, + eraCollapseSize = 30, + combinationWindow = 30, + minPostCombinationDuration = 30, + filterTreatments = "All", + maxPathLength = 5 + ) + + tempDir <- tempdir() + TreatmentPatterns::export(andromeda, tempDir, minCellCount = 1) + + treatmentPaths <- read.csv(file.path(tempDir, "treatmentPathways.csv")) + + path <- treatmentPaths %>% + dplyr::filter( + .data$age == "all", + .data$sex == "all", + .data$indexYear == "all") %>% + dplyr::pull(.data$path) + + expect_identical(path, "A-A+B-B") + + DBI::dbDisconnect(con) +}) From d2605da68d3fdd9d868d7ccdd923ad659bda69e1 Mon Sep 17 00:00:00 2001 From: Maarten van Kessel Date: Fri, 9 Aug 2024 14:13:25 +0200 Subject: [PATCH 03/14] Fixed combination miss classificiation --- R/constructPathways.R | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/R/constructPathways.R b/R/constructPathways.R index 41f2ad4c..b23f0af9 100755 --- a/R/constructPathways.R +++ b/R/constructPathways.R @@ -369,7 +369,7 @@ doEraCollapse <- function(andromeda, eraCollapseSize) { .default = .data$needsMerge ) ) %>% - dplyr::mutate(durationEra = .data$eventEndDate - eventStartDate) %>% + dplyr::mutate(durationEra = .data$eventEndDate - .data$eventStartDate) %>% # dplyr::mutate( # eventEndDate = if_else( # is.null(.data$newEndDate), @@ -435,18 +435,21 @@ doCombinationWindow <- function( # treatmentHistory[r, event_end_date] -> # add column combination first received, first stopped treatmentHistory <- treatmentHistory %>% + dplyr::group_by(.data$personId) %>% dplyr::mutate(combinationFRFS = case_when( .data$selectedRows == 1 & switch == 0 & dplyr::lag(eventEndDate, order_by = .data$sortOrder) < eventEndDate ~ 1, .default = 0 - )) + )) %>% + dplyr::ungroup() # For rows selected not in column switch -> # if treatmentHistory[r - 1, event_end_date] > # treatmentHistory[r, event_end_date] -> # add column combination last received, first stopped andromeda$treatmentHistory <- treatmentHistory %>% + dplyr::group_by(.data$personId) %>% dplyr::mutate(combinationLRFS = dplyr::case_when( .data$selectedRows == 1 & .data$switch == 0 & @@ -455,8 +458,9 @@ doCombinationWindow <- function( dplyr::lead(.data$eventEndDate, order_by = .data$sortOrder) == .data$eventEndDate & dplyr::lead(.data$eventStartDate, order_by = .data$sortOrder) == .data$eventStartDate)) ~ 1, .default = 0 - )) - + )) %>% + dplyr::ungroup() + message(sprintf( "Selected %s \nout of %s rows\nIteration: %s\nSwitches: %s\nFRFS Combinations: %s\nLRFS Combinations: %s\n", andromeda$treatmentHistory %>% From 49745ce1551c6c6bee64520229a79c1ccaa8b19c Mon Sep 17 00:00:00 2001 From: Maarten van Kessel Date: Fri, 9 Aug 2024 14:13:33 +0200 Subject: [PATCH 04/14] Updated docs --- man/CharacterizationPlots.Rd | 2 +- man/InputHandler.Rd | 2 +- man/SankeyDiagram.Rd | 2 +- man/SunburstPlot.Rd | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/man/CharacterizationPlots.Rd b/man/CharacterizationPlots.Rd index 3c0e6319..0b917468 100644 --- a/man/CharacterizationPlots.Rd +++ b/man/CharacterizationPlots.Rd @@ -7,7 +7,7 @@ Class to handle the characterization plots. } \section{Super class}{ -\code{TreatmentPatterns::ShinyModule} -> \code{CharacterizationPlots} +\code{\link[TreatmentPatterns:ShinyModule]{TreatmentPatterns::ShinyModule}} -> \code{CharacterizationPlots} } \section{Methods}{ \subsection{Public methods}{ diff --git a/man/InputHandler.Rd b/man/InputHandler.Rd index 5a6ec749..b5143bd5 100644 --- a/man/InputHandler.Rd +++ b/man/InputHandler.Rd @@ -8,7 +8,7 @@ Class to handle input from the user. Supports direct paths or input fields through \code{setDataPath()}.\cr\cr } \section{Super class}{ -\code{TreatmentPatterns::ShinyModule} -> \code{InputHandler} +\code{\link[TreatmentPatterns:ShinyModule]{TreatmentPatterns::ShinyModule}} -> \code{InputHandler} } \section{Active bindings}{ \if{html}{\out{
}} diff --git a/man/SankeyDiagram.Rd b/man/SankeyDiagram.Rd index 038d7ab9..6a46af2f 100644 --- a/man/SankeyDiagram.Rd +++ b/man/SankeyDiagram.Rd @@ -7,7 +7,7 @@ Class to handle the Sankey diagram of TreatmentPatterns. } \section{Super classes}{ -\code{TreatmentPatterns::ShinyModule} -> \code{TreatmentPatterns::InteracitvePlot} -> \code{SankeyDiagram} +\code{\link[TreatmentPatterns:ShinyModule]{TreatmentPatterns::ShinyModule}} -> \code{TreatmentPatterns::InteracitvePlot} -> \code{SankeyDiagram} } \section{Methods}{ \subsection{Public methods}{ diff --git a/man/SunburstPlot.Rd b/man/SunburstPlot.Rd index 30c05796..63bd5e7a 100644 --- a/man/SunburstPlot.Rd +++ b/man/SunburstPlot.Rd @@ -7,7 +7,7 @@ Class to handle the Sunburst plot of TreatmentPatterns. } \section{Super classes}{ -\code{TreatmentPatterns::ShinyModule} -> \code{TreatmentPatterns::InteracitvePlot} -> \code{SunburstPlot} +\code{\link[TreatmentPatterns:ShinyModule]{TreatmentPatterns::ShinyModule}} -> \code{TreatmentPatterns::InteracitvePlot} -> \code{SunburstPlot} } \section{Methods}{ \subsection{Public methods}{ From 91cec3a635302ea3a487c783e6921e78224ee181 Mon Sep 17 00:00:00 2001 From: Maarten van Kessel Date: Fri, 9 Aug 2024 14:14:05 +0200 Subject: [PATCH 05/14] Updated tests for updated omomp generics and fix --- tests/testthat/test-CDMInterface.R | 34 ++++-- tests/testthat/test-computePathways.R | 153 ++++++++++++++++++++------ 2 files changed, 145 insertions(+), 42 deletions(-) diff --git a/tests/testthat/test-CDMInterface.R b/tests/testthat/test-CDMInterface.R index 643366b7..2fafbf48 100644 --- a/tests/testthat/test-CDMInterface.R +++ b/tests/testthat/test-CDMInterface.R @@ -47,18 +47,34 @@ test_that("fetchCohortTable", { # check n > 1 treatments expect_identical( - aCG$cohort_table %>% group_by(.data$subject_id) %>% - summarize(n = n()) %>% filter(n > 1) %>% collect(), - aCDMC$cohort_table %>% group_by(.data$subject_id) %>% - summarize(n = n()) %>% filter(n > 1) %>% collect() + aCG$cohort_table %>% + group_by(.data$subject_id) %>% + summarize(n = n()) %>% + filter(n > 1) %>% + collect() %>% + mutate(subject_id = as.numeric(subject_id)), + aCDMC$cohort_table %>% + group_by(.data$subject_id) %>% + summarize(n = n()) %>% + filter(n > 1) %>% + collect() %>% + mutate(subject_id = as.numeric(subject_id)) ) - + # check n == 1 treatments expect_identical( - aCG$cohort_table %>% group_by(.data$subject_id) %>% - summarize(n = n()) %>% filter(n == 1) %>% collect(), - aCDMC$cohort_table %>% group_by(.data$subject_id) %>% - summarize(n = n()) %>% filter(n == 1) %>% collect() + aCG$cohort_table %>% + group_by(.data$subject_id) %>% + summarize(n = n()) %>% + filter(n == 1) %>% + collect() %>% + mutate(subject_id = as.numeric(subject_id)), + aCDMC$cohort_table %>% + group_by(.data$subject_id) %>% + summarize(n = n()) %>% + filter(n == 1) %>% + collect() %>% + mutate(subject_id = as.numeric(subject_id)) ) dbcInterface$disconnect() diff --git a/tests/testthat/test-computePathways.R b/tests/testthat/test-computePathways.R index f31b5da8..727a646d 100644 --- a/tests/testthat/test-computePathways.R +++ b/tests/testthat/test-computePathways.R @@ -20,9 +20,9 @@ test_that("computePathways DatabaseConnector", { cdmSchema = "main", resultSchema = "main" ), - "After maxPathLength: 554" + "After maxPathLength: 553" ), - "After combinationWindow: 555" + "After combinationWindow: 554" ), "Original number of rows: 8366" ) @@ -35,13 +35,13 @@ test_that("computePathways CDMConnector", { expect_message( expect_message( computePathways( - cdm = globals$cdm, cohorts = globals$cohorts, - cohortTableName = globals$cohortTableName + cdm = globals$cdm, + globals$cohortTableName ), - "After maxPathLength: 554" + "After maxPathLength: 553" ), - "After combinationWindow: 555" + "After combinationWindow: 554" ), "Original number of rows: 8366" ) @@ -49,25 +49,6 @@ test_that("computePathways CDMConnector", { DBI::dbDisconnect(globals$con, shutdown = TRUE) }) -test_that("nrow exitCohorts > 0", { - globals <- generateCohortTableCDMC() - - cohorts <- globals$cohorts %>% - mutate(type = case_when( - .data$cohortName == "Acetaminophen" ~ "exit", - .default = .data$type - )) - - expect_message( - computePathways( - cdm = globals$cdm, - cohorts = cohorts, - cohortTableName = globals$cohortTableName - ), - "After maxPathLength: 554" - ) -}) - test_that("nrow exitCohorts > 0", { skip("Eunomia [2.0.0] bug") globals <- generateCohortTableCG() @@ -429,11 +410,13 @@ test_that("filterTreatments", { class(allTH$eventCohortId) ) - expect_identical( - "numeric", - class(firstTH$personId), - class(changesTH$personId), - class(allTH$personId) + expect_contains( + expected = c( + class(firstTH$personId), + class(changesTH$personId), + class(allTH$personId) + ), + object = c("integer", "numeric") ) expect_identical( @@ -507,9 +490,9 @@ test_that("filterTreatments", { expect_false(any(is.null(changesTH))) expect_false(any(is.null(allTH))) - expect_true(nrow(firstTH) == 554) - expect_true(nrow(changesTH) == 555) - expect_true(nrow(allTH) == 555) + expect_true(nrow(firstTH) == 553) + expect_true(nrow(changesTH) == 554) + expect_true(nrow(allTH) == 554) expect_true(Andromeda::isAndromeda(first)) expect_true(Andromeda::isAndromeda(changes)) @@ -519,3 +502,107 @@ test_that("filterTreatments", { Andromeda::close(changes) Andromeda::close(all) }) + +test_that("FRFS combination", { + con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) + + cohorts <- data.frame( + cohortId = c(1, 2, 3), + cohortName = c("X", "A", "B"), + type = c("target", "event", "event") + ) + + cohort_table <- dplyr::tribble( + ~cohort_definition_id, ~subject_id, ~cohort_start_date, ~cohort_end_date, + + 1, 5, as.Date("2017-08-03"), as.Date("2018-08-02"), + 3, 5, as.Date("2017-11-26"), as.Date("2018-04-10"), + 2, 5, as.Date("2018-02-26"), as.Date("2018-04-24"), + + 1, 7, as.Date("2015-10-20"), as.Date("2018-06-28"), + 2, 7, as.Date("2017-12-04"), as.Date("2018-04-30") + ) + + copy_to(con, cohort_table, overwrite = TRUE) + + cdm <- cdmFromCon(con, cdmSchema = "main", writeSchema = "main", cohortTables = "cohort_table") + + andromeda <- computePathways( + cohorts = cohorts, + cohortTableName = 'cohort_table', + cdm = cdm, + tempEmulationSchema = NULL, + includeTreatments = "startDate", + periodPriorToIndex = 0, + minEraDuration = 30, + eraCollapseSize = 30, + combinationWindow = 30, + minPostCombinationDuration = 30, + filterTreatments = "All", + maxPathLength = 5) + + nFRFS <- andromeda$addRowsFRFS_1 %>% + dplyr::collect() %>% + nrow() + + nLRFS <- andromeda$addRowsLRFS_1 %>% + dplyr::collect() %>% + nrow() + + expect_equal(nFRFS, 1) + expect_equal(nLRFS, 0) + + DBI::dbDisconnect(con) +}) + +test_that("LRFS combination", { + con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) + + cohorts <- data.frame( + cohortId = c(1, 2, 3), + cohortName = c("X", "A", "B"), + type = c("target", "event", "event") + ) + + cohort_table <- dplyr::tribble( + ~cohort_definition_id, ~subject_id, ~cohort_start_date, ~cohort_end_date, + + 1, 5, as.Date("2017-08-03"), as.Date("2018-08-02"), + 3, 5, as.Date("2017-11-26"), as.Date("2018-04-10"), + 2, 5, as.Date("2018-01-26"), as.Date("2018-03-24"), + + 1, 7, as.Date("2015-10-20"), as.Date("2018-06-28"), + 2, 7, as.Date("2017-12-04"), as.Date("2018-04-30") + ) + + copy_to(con, cohort_table, overwrite = TRUE) + + cdm <- cdmFromCon(con, cdmSchema = "main", writeSchema = "main", cohortTables = "cohort_table") + + andromeda <- computePathways( + cohorts = cohorts, + cohortTableName = 'cohort_table', + cdm = cdm, + tempEmulationSchema = NULL, + includeTreatments = "startDate", + periodPriorToIndex = 0, + minEraDuration = 30, + eraCollapseSize = 30, + combinationWindow = 30, + minPostCombinationDuration = 30, + filterTreatments = "All", + maxPathLength = 5) + + nFRFS <- andromeda$addRowsFRFS_1 %>% + dplyr::collect() %>% + nrow() + + nLRFS <- andromeda$addRowsLRFS_1 %>% + dplyr::collect() %>% + nrow() + + expect_equal(nFRFS, 0) + expect_equal(nLRFS, 1) + + DBI::dbDisconnect(con) +}) From b0ed1368addcfd13f9b0a7195ed72271b1614573 Mon Sep 17 00:00:00 2001 From: Maarten van Kessel Date: Fri, 9 Aug 2024 14:14:42 +0200 Subject: [PATCH 06/14] Updated change log --- NEWS.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/NEWS.md b/NEWS.md index 7b345adb..8613408a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,10 @@ +# TreatmentPatterns 2.6.8 +--------- +* Updated some tests to work with later versions of omopgenerics. +* Fixed issue with where combinations sometimes got miss-classified. +* Fixed issue when event starts and ends on end-date of target. +* Fixed issue when collapsing events when there is also a combination, when `filterTreatments = "All"`. + # TreatmentPatterns 2.6.7 --------- * Updated URLs in description From 36ac8b271fbfd58fa0d296354b346423e31f576b Mon Sep 17 00:00:00 2001 From: Maarten van Kessel Date: Mon, 19 Aug 2024 15:50:58 +0200 Subject: [PATCH 07/14] Added conditinal skip if needed suggests are not available --- tests/testthat/helper-ableToRun.R | 25 ++- .../testthat/helper-generateCohortTableCDMC.R | 78 ++++----- tests/testthat/helper-generateCohortTableCG.R | 150 +++++++++--------- tests/testthat/test-CDMInterfaceCDMC.R | 69 ++++---- tests/testthat/test-CDMInterfaceDBC.R | 7 +- tests/testthat/test-CharacterizationPlots.R | 3 + tests/testthat/test-InputHandler.R | 5 + ...eracivePlots.R => test-InteractivePlots.R} | 3 + tests/testthat/test-ShinyApp.R | 1 + tests/testthat/test-computePathways.R | 26 ++- tests/testthat/test-launchResultsExplorer.R | 1 + tests/testthat/test-pathwaysLogical.R | 27 +++- 12 files changed, 238 insertions(+), 157 deletions(-) rename tests/testthat/{test-InteracivePlots.R => test-InteractivePlots.R} (95%) diff --git a/tests/testthat/helper-ableToRun.R b/tests/testthat/helper-ableToRun.R index d4432d9d..715fdd54 100644 --- a/tests/testthat/helper-ableToRun.R +++ b/tests/testthat/helper-ableToRun.R @@ -1,7 +1,24 @@ ableToRun <- function() { - all( - require("CirceR", character.only = TRUE, quietly = TRUE), - require("Eunomia", character.only = TRUE, quietly = TRUE), - require("CohortGenerator", character.only = TRUE, quietly = TRUE) + list( + CDMC = all( + require("CirceR", character.only = TRUE, quietly = TRUE, warn.conflicts = FALSE), + require("CDMConnector", character.only = TRUE, quietly = TRUE, warn.conflicts = FALSE), + require("DBI", character.only = TRUE, quietly = TRUE, warn.conflicts = FALSE), + require("duckdb", character.only = TRUE, quietly = TRUE, warn.conflicts = FALSE) + ), + + CG = all( + require("CirceR", character.only = TRUE, quietly = TRUE, warn.conflicts = FALSE), + require("CohortGenerator", character.only = TRUE, quietly = TRUE, warn.conflicts = FALSE), + require("DatabaseConnector", character.only = TRUE, quietly = TRUE, warn.conflicts = FALSE), + require("SqlRender", character.only = TRUE, quietly = TRUE, warn.conflicts = FALSE), + require("Eunomia", character.only = TRUE, quietly = TRUE, warn.conflicts = FALSE) + ), + + plotting = all( + require("ggplot2", character.only = TRUE, quietly = TRUE, warn.conflicts = FALSE), + require("webshot2", character.only = TRUE, quietly = TRUE, warn.conflicts = FALSE), + require("plotly", character.only = TRUE, quietly = TRUE, warn.conflicts = FALSE) + ) ) } diff --git a/tests/testthat/helper-generateCohortTableCDMC.R b/tests/testthat/helper-generateCohortTableCDMC.R index 3f10032b..d5ef03aa 100644 --- a/tests/testthat/helper-generateCohortTableCDMC.R +++ b/tests/testthat/helper-generateCohortTableCDMC.R @@ -1,39 +1,43 @@ generateCohortTableCDMC <- function() { - cohortTableName <- "cohort_table" - - con <- DBI::dbConnect( - duckdb::duckdb(), - dbdir = CDMConnector::eunomia_dir() - ) - - cdm <- CDMConnector::cdmFromCon( - con = con, - cdmSchema = "main", - writeSchema = "main" - ) - - ## Read in cohort set ---- - cohortsSet <- CDMConnector::readCohortSet( - path = system.file(package = "TreatmentPatterns", "exampleCohorts") - ) - - ## Generate cohot set ---- - cdm <- CDMConnector::generateCohortSet( - cdm = cdm, - cohortSet = cohortsSet, - name = cohortTableName, - computeAttrition = FALSE - ) - - cohorts <- data.frame( - cohortId = cohortsSet$cohort_definition_id, - cohortName = cohortsSet$cohort_name, - type = c("event", "event", "event", "event", "exit", "event", "event", "target") - ) - return(list( - cdm = cdm, - cohorts = cohorts, - cohortTableName = cohortTableName, - con = con - )) + if (ableToRun()$CDMC) { + cohortTableName <- "cohort_table" + + con <- DBI::dbConnect( + duckdb::duckdb(), + dbdir = CDMConnector::eunomia_dir() + ) + + cdm <- CDMConnector::cdmFromCon( + con = con, + cdmSchema = "main", + writeSchema = "main" + ) + + ## Read in cohort set ---- + cohortsSet <- CDMConnector::readCohortSet( + path = system.file(package = "TreatmentPatterns", "exampleCohorts") + ) + + ## Generate cohot set ---- + cdm <- CDMConnector::generateCohortSet( + cdm = cdm, + cohortSet = cohortsSet, + name = cohortTableName, + computeAttrition = FALSE + ) + + cohorts <- data.frame( + cohortId = cohortsSet$cohort_definition_id, + cohortName = cohortsSet$cohort_name, + type = c("event", "event", "event", "event", "exit", "event", "event", "target") + ) + return(list( + cdm = cdm, + cohorts = cohorts, + cohortTableName = cohortTableName, + con = con + )) + } else { + return(NULL) + } } diff --git a/tests/testthat/helper-generateCohortTableCG.R b/tests/testthat/helper-generateCohortTableCG.R index 6d2c8c7f..51d27362 100644 --- a/tests/testthat/helper-generateCohortTableCG.R +++ b/tests/testthat/helper-generateCohortTableCG.R @@ -1,78 +1,82 @@ generateCohortTableCG <- function() { - connectionDetails <- Eunomia::getEunomiaConnectionDetails() - cohortTableName <- "cohort_table" - resultSchema <- "main" - cdmSchema <- "main" - - cohortsToCreate <- CohortGenerator::createEmptyCohortDefinitionSet() - - cohortJsonFiles <- list.files( - system.file( - package = "TreatmentPatterns", - "exampleCohorts"), - full.names = TRUE) - - for (i in seq_len(length(cohortJsonFiles))) { - cohortJsonFileName <- cohortJsonFiles[i] - cohortName <- tools::file_path_sans_ext(basename(cohortJsonFileName)) - cohortJson <- readChar(cohortJsonFileName, file.info( - cohortJsonFileName)$size) + if (ableToRun()$CG) { + connectionDetails <- Eunomia::getEunomiaConnectionDetails() + cohortTableName <- "cohort_table" + resultSchema <- "main" + cdmSchema <- "main" - cohortExpression <- CirceR::cohortExpressionFromJson(cohortJson) + cohortsToCreate <- CohortGenerator::createEmptyCohortDefinitionSet() - cohortSql <- CirceR::buildCohortQuery( - cohortExpression, - options = CirceR::createGenerateOptions(generateStats = FALSE)) - cohortsToCreate <- rbind( - cohortsToCreate, - data.frame( - cohortId = i, - cohortName = cohortName, - sql = cohortSql, - stringsAsFactors = FALSE)) + cohortJsonFiles <- list.files( + system.file( + package = "TreatmentPatterns", + "exampleCohorts"), + full.names = TRUE) + + for (i in seq_len(length(cohortJsonFiles))) { + cohortJsonFileName <- cohortJsonFiles[i] + cohortName <- tools::file_path_sans_ext(basename(cohortJsonFileName)) + cohortJson <- readChar(cohortJsonFileName, file.info( + cohortJsonFileName)$size) + + cohortExpression <- CirceR::cohortExpressionFromJson(cohortJson) + + cohortSql <- CirceR::buildCohortQuery( + cohortExpression, + options = CirceR::createGenerateOptions(generateStats = FALSE)) + cohortsToCreate <- rbind( + cohortsToCreate, + data.frame( + cohortId = i, + cohortName = cohortName, + sql = cohortSql, + stringsAsFactors = FALSE)) + } + + cohortTableNames <- CohortGenerator::getCohortTableNames( + cohortTable = cohortTableName) + + CohortGenerator::createCohortTables( + connectionDetails = connectionDetails, + cohortDatabaseSchema = resultSchema, + cohortTableNames = cohortTableNames) + + # Generate the cohorts + cohortsGenerated <- CohortGenerator::generateCohortSet( + connectionDetails = connectionDetails, + cdmDatabaseSchema = cdmSchema, + cohortDatabaseSchema = resultSchema, + cohortTableNames = cohortTableNames, + cohortDefinitionSet = cohortsToCreate) + + # Select Viral Sinusitis Cohort + targetCohorts <- cohortsGenerated %>% + dplyr::filter(cohortName == "ViralSinusitis") %>% + dplyr::select(cohortId, cohortName) + + # Select everything BUT Viral Sinusitis cohorts + eventCohorts <- cohortsGenerated %>% + dplyr::filter(cohortName != "ViralSinusitis" & cohortName != "Death") %>% + dplyr::select(cohortId, cohortName) + + exitCohorts <- cohortsGenerated %>% + dplyr::filter(cohortName == "Death") %>% + dplyr::select(cohortId, cohortName) + + cohorts <- dplyr::bind_rows( + targetCohorts %>% dplyr::mutate(type = "target"), + eventCohorts %>% dplyr::mutate(type = "event"), + exitCohorts %>% dplyr::mutate(type = "exit") + ) + + return(list( + cohorts = cohorts, + connectionDetails = connectionDetails, + cohortTableName = cohortTableName, + resultSchema = resultSchema, + cdmSchema = cdmSchema + )) + } else { + return(NULL) } - - cohortTableNames <- CohortGenerator::getCohortTableNames( - cohortTable = cohortTableName) - - CohortGenerator::createCohortTables( - connectionDetails = connectionDetails, - cohortDatabaseSchema = resultSchema, - cohortTableNames = cohortTableNames) - - # Generate the cohorts - cohortsGenerated <- CohortGenerator::generateCohortSet( - connectionDetails = connectionDetails, - cdmDatabaseSchema = cdmSchema, - cohortDatabaseSchema = resultSchema, - cohortTableNames = cohortTableNames, - cohortDefinitionSet = cohortsToCreate) - - # Select Viral Sinusitis Cohort - targetCohorts <- cohortsGenerated %>% - dplyr::filter(cohortName == "ViralSinusitis") %>% - dplyr::select(cohortId, cohortName) - - # Select everything BUT Viral Sinusitis cohorts - eventCohorts <- cohortsGenerated %>% - dplyr::filter(cohortName != "ViralSinusitis" & cohortName != "Death") %>% - dplyr::select(cohortId, cohortName) - - exitCohorts <- cohortsGenerated %>% - dplyr::filter(cohortName == "Death") %>% - dplyr::select(cohortId, cohortName) - - cohorts <- dplyr::bind_rows( - targetCohorts %>% dplyr::mutate(type = "target"), - eventCohorts %>% dplyr::mutate(type = "event"), - exitCohorts %>% dplyr::mutate(type = "exit") - ) - - return(list( - cohorts = cohorts, - connectionDetails = connectionDetails, - cohortTableName = cohortTableName, - resultSchema = resultSchema, - cdmSchema = cdmSchema - )) } diff --git a/tests/testthat/test-CDMInterfaceCDMC.R b/tests/testthat/test-CDMInterfaceCDMC.R index 66c73f79..9b0a2dea 100644 --- a/tests/testthat/test-CDMInterfaceCDMC.R +++ b/tests/testthat/test-CDMInterfaceCDMC.R @@ -1,40 +1,41 @@ library(testthat) library(TreatmentPatterns) library(dplyr) -library(CDMConnector) -andromeda <- Andromeda::andromeda() - -con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) - -withr::defer({ - Andromeda::close(andromeda) - DBI::dbDisconnect(con, shutdown = TRUE) -}) - -cohorts <- data.frame( - cohortId = c(1, 2, 3), - cohortName = c("Disease X", "Drug A", "Drug B"), - type = c("target", "event", "event") -) - -cohort_table <- tibble( - cohort_definition_id = c(3, 2, 1), - subject_id = c(1, 1, 1), - cohort_start_date = as.Date(c("2014-10-10", "2014-11-07", "2014-10-10")), - cohort_end_date = as.Date(c("2015-08-01", "2014-12-04", "2015-08-01")) -) - -dplyr::copy_to(con, cohort_table, overwrite = TRUE) - -localCdm <- cdmFromCon( - con = con, - cdmSchema = "main", - writeSchema = "main", - cohortTables = "cohort_table" -) - -cdmInterface <- TreatmentPatterns:::CDMInterface$new(cdm = localCdm) +if (ableToRun()$CDMC) { + andromeda <- Andromeda::andromeda() + + con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) + + withr::defer({ + Andromeda::close(andromeda) + DBI::dbDisconnect(con, shutdown = TRUE) + }) + + cohorts <- data.frame( + cohortId = c(1, 2, 3), + cohortName = c("Disease X", "Drug A", "Drug B"), + type = c("target", "event", "event") + ) + + cohort_table <- tibble( + cohort_definition_id = c(3, 2, 1), + subject_id = c(1, 1, 1), + cohort_start_date = as.Date(c("2014-10-10", "2014-11-07", "2014-10-10")), + cohort_end_date = as.Date(c("2015-08-01", "2014-12-04", "2015-08-01")) + ) + + dplyr::copy_to(con, cohort_table, overwrite = TRUE) + + localCdm <- cdmFromCon( + con = con, + cdmSchema = "main", + writeSchema = "main", + cohortTables = "cohort_table" + ) + + cdmInterface <- TreatmentPatterns:::CDMInterface$new(cdm = localCdm) +} test_that("Method: new", { expect_true(R6::is.R6( @@ -49,6 +50,7 @@ test_that("Method: new - empty", { }) test_that("Method: fetchMetadata", { + skip_if_not(ableToRun()$CDMC) cdmInterface$fetchMetadata(andromeda) metadata <- andromeda$metadata %>% collect() @@ -65,6 +67,7 @@ test_that("Method: fetchMetadata", { }) test_that("Method: fetchCohortTable", { + skip_if_not(ableToRun()$CDMC) # Update CDM with new dummy data cdmInterface <- TreatmentPatterns:::CDMInterface$new( cdm = localCdm diff --git a/tests/testthat/test-CDMInterfaceDBC.R b/tests/testthat/test-CDMInterfaceDBC.R index 4f8aeed7..18437668 100644 --- a/tests/testthat/test-CDMInterfaceDBC.R +++ b/tests/testthat/test-CDMInterfaceDBC.R @@ -1,11 +1,10 @@ library(testthat) library(TreatmentPatterns) library(dplyr) -library(Eunomia) -library(DatabaseConnector) test_that("Method: new", { skip("Eunomia [2.0.0] bug") + skip_if_not(ableToRun()$CG) connectionDetails <- Eunomia::getEunomiaConnectionDetails() cdmInterface <- TreatmentPatterns:::CDMInterface$new( @@ -23,6 +22,7 @@ test_that("Method: new", { test_that("Method: fetchMetadata", { skip("Eunomia [2.0.0] bug") + skip_if_not(ableToRun()$CG) connectionDetails <- Eunomia::getEunomiaConnectionDetails() cdmInterface <- TreatmentPatterns:::CDMInterface$new( @@ -51,6 +51,7 @@ test_that("Method: fetchMetadata", { test_that("Method: fetchCohortTable", { skip("Eunomia [2.0.0] bug") + skip_if_not(ableToRun()$CG) globals <- generateCohortTableCG() andromeda <- Andromeda::andromeda() @@ -77,6 +78,7 @@ test_that("Method: fetchCohortTable", { test_that("fetchCohortTable: empty", { skip("Eunomia [2.0.0] bug") + skip_if_not(ableToRun()$CG) globals <- generateCohortTableCG() andromeda <- Andromeda::andromeda() @@ -113,6 +115,7 @@ test_that("fetchCohortTable: empty", { test_that("Method: disconnect", { skip("Eunomia [2.0.0] bug") + skip_if_not(ableToRun()$CG) connectionDetails <- Eunomia::getEunomiaConnectionDetails() cdmInterface <- TreatmentPatterns:::CDMInterface$new( diff --git a/tests/testthat/test-CharacterizationPlots.R b/tests/testthat/test-CharacterizationPlots.R index a342f61b..fb3731c1 100644 --- a/tests/testthat/test-CharacterizationPlots.R +++ b/tests/testthat/test-CharacterizationPlots.R @@ -4,11 +4,13 @@ library(shiny) library(TreatmentPatterns) test_that("CharacterizationPlots", { + skip_if_not(ableToRun()$plotting) characterizationPlots <- CharacterizationPlots$new("app") expect_true(is.R6(characterizationPlots)) }) test_that("UI", { + skip_if_not(ableToRun()$plotting) characterizationPlots <- CharacterizationPlots$new("app") expect_s3_class(characterizationPlots$uiBody(), "shiny.tag") @@ -17,6 +19,7 @@ test_that("UI", { test_that("server", { + skip_if_not(ableToRun()$plotting) moduleInteractivePlots <- function(id, inputHandler, characterizationPlots) { moduleServer(id, function(input, output, session) { inputHandler$setDataPath(input = input, path = NULL) diff --git a/tests/testthat/test-InputHandler.R b/tests/testthat/test-InputHandler.R index 5291f565..e9799124 100644 --- a/tests/testthat/test-InputHandler.R +++ b/tests/testthat/test-InputHandler.R @@ -3,6 +3,7 @@ library(testthat) library(R6) test_that("InputHandler", { + skip_if_not(ableToRun()$plotting) ## new() / initialize() ---- inputHandler <- InputHandler$new("app") expect_true(is.R6(inputHandler)) @@ -16,6 +17,7 @@ test_that("InputHandler", { }) test_that("UI", { + skip_if_not(ableToRun()$plotting) inputHandler <- InputHandler$new("app") expect_s3_class(inputHandler$uiMenu(), "shiny.tag") expect_s3_class(inputHandler$uiBody(), "shiny.tag") @@ -23,6 +25,7 @@ test_that("UI", { }) test_that("InputHandler: setDataPath()", { + skip_if_not(ableToRun()$plotting) moduleInputHandler <- function(id, inputHandler) { shiny::moduleServer(id, function(input, output, session) {}) } @@ -58,6 +61,7 @@ test_that("InputHandler: setDataPath()", { }) test_that("InputHandler: server()", { + skip_if_not(ableToRun()$plotting) moduleInputHandler <- function(id, inputHandler) { shiny::moduleServer(id, function(input, output, session) { inputHandler$setDataPath(input = input, path = NULL) @@ -93,6 +97,7 @@ test_that("InputHandler: server()", { }) test_that("server: dir and zip-file", { + skip_if_not(ableToRun()$plotting) moduleInteractivePlots <- function(id, inputHandler, sunburst, sankey) { moduleServer(id, function(input, output, session) { inputHandler$setDataPath(input = input, path = NULL) diff --git a/tests/testthat/test-InteracivePlots.R b/tests/testthat/test-InteractivePlots.R similarity index 95% rename from tests/testthat/test-InteracivePlots.R rename to tests/testthat/test-InteractivePlots.R index 7daa4a2a..ac89929c 100644 --- a/tests/testthat/test-InteracivePlots.R +++ b/tests/testthat/test-InteractivePlots.R @@ -5,6 +5,7 @@ library(dplyr) library(TreatmentPatterns) test_that("InteracivePlots", { + skip_if_not(ableToRun()$plotting) sunburst <- SunburstPlot$new("app") sankey <- SankeyDiagram$new("app") expect_true(is.R6(sunburst)) @@ -12,6 +13,7 @@ test_that("InteracivePlots", { }) test_that("UI", { + skip_if_not(ableToRun()$plotting) sunburst <- SunburstPlot$new("app") sankey <- SankeyDiagram$new("app") @@ -23,6 +25,7 @@ test_that("UI", { }) test_that("server: inputs", { + skip_if_not(ableToRun()$plotting) moduleInteractivePlots <- function(id, inputHandler, sunburst, sankey) { moduleServer(id, function(input, output, session) { inputHandler$setDataPath(input = input, path = NULL) diff --git a/tests/testthat/test-ShinyApp.R b/tests/testthat/test-ShinyApp.R index 28662d57..8f77529b 100644 --- a/tests/testthat/test-ShinyApp.R +++ b/tests/testthat/test-ShinyApp.R @@ -3,6 +3,7 @@ library(shiny) library(R6) test_that("ShinyApp", { + skip_if_not(ableToRun()$plotting) app <- TreatmentPatterns:::ShinyApp$new("app") # Fields diff --git a/tests/testthat/test-computePathways.R b/tests/testthat/test-computePathways.R index 727a646d..240b24af 100644 --- a/tests/testthat/test-computePathways.R +++ b/tests/testthat/test-computePathways.R @@ -3,11 +3,10 @@ library(testthat) library(TreatmentPatterns) library(dplyr) library(stringr) -library(CDMConnector) test_that("computePathways DatabaseConnector", { skip("Eunomia [2.0.0] bug") - + skip_if_not(ableToRun()$CG) globals <- generateCohortTableCG() expect_message( @@ -29,6 +28,7 @@ test_that("computePathways DatabaseConnector", { }) test_that("computePathways CDMConnector", { + skip_if_not(ableToRun()$CDMC) globals <- generateCohortTableCDMC() expect_message( @@ -51,6 +51,7 @@ test_that("computePathways CDMConnector", { test_that("nrow exitCohorts > 0", { skip("Eunomia [2.0.0] bug") + skip_if_not(ableToRun()$CG) globals <- generateCohortTableCG() cohorts <- globals$cohorts %>% @@ -73,6 +74,7 @@ test_that("nrow exitCohorts > 0", { # Parameter sweep ---- test_that("includeTreatments", { + skip_if_not(ableToRun()$CDMC) globals <- generateCohortTableCDMC() andromeda_startDate <- computePathways( @@ -116,8 +118,9 @@ test_that("includeTreatments", { }) test_that("periodPriorToIndex", { + skip_if_not(ableToRun()$CDMC) globals <- generateCohortTableCDMC() - + expect_error( computePathways( cohorts = globals$cohorts, @@ -130,8 +133,9 @@ test_that("periodPriorToIndex", { }) test_that("minEraDuration", { + skip_if_not(ableToRun()$CDMC) globals <- generateCohortTableCDMC() - + expect_error( computePathways( cohorts = globals$cohorts, @@ -144,8 +148,9 @@ test_that("minEraDuration", { }) test_that("splitEventCohorts", { + skip_if_not(ableToRun()$CDMC) globals <- generateCohortTableCDMC() - + andromeda_empty <- computePathways( cohorts = globals$cohorts, cohortTableName = globals$cohortTableName, @@ -181,8 +186,9 @@ test_that("splitEventCohorts", { }) test_that("splitTime", { + skip_if_not(ableToRun()$CDMC) globals <- generateCohortTableCDMC() - + expect_error( computePathways( cohorts = globals$cohorts, @@ -195,6 +201,7 @@ test_that("splitTime", { }) test_that("eraCollapseSize", { + skip_if_not(ableToRun()$CDMC) globals <- generateCohortTableCDMC() andromeda_0 <- computePathways( @@ -226,8 +233,9 @@ test_that("eraCollapseSize", { }) test_that("combinationWindow", { + skip_if_not(ableToRun()$CDMC) globals <- generateCohortTableCDMC() - + expect_error( suppressWarnings( computePathways( @@ -242,6 +250,7 @@ test_that("combinationWindow", { }) test_that("minPostCombinationDuration: 30", { + skip_if_not(ableToRun()$CDMC) con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) cohorts <- data.frame( @@ -353,6 +362,7 @@ test_that("minPostCombinationDuration: 30", { }) test_that("filterTreatments", { + skip_if_not(ableToRun()$CDMC) globals <- generateCohortTableCDMC() expect_error( @@ -504,6 +514,7 @@ test_that("filterTreatments", { }) test_that("FRFS combination", { + skip_if_not(ableToRun()$CDMC) con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) cohorts <- data.frame( @@ -556,6 +567,7 @@ test_that("FRFS combination", { }) test_that("LRFS combination", { + skip_if_not(ableToRun()$CDMC) con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) cohorts <- data.frame( diff --git a/tests/testthat/test-launchResultsExplorer.R b/tests/testthat/test-launchResultsExplorer.R index b50452ec..a2cc5a36 100644 --- a/tests/testthat/test-launchResultsExplorer.R +++ b/tests/testthat/test-launchResultsExplorer.R @@ -2,6 +2,7 @@ library(testthat) library(TreatmentPatterns) test_that("launchResultsExplorer", { + skip_if_not(ableToRun()$plotting) app <- launchResultsExplorer() expect_s3_class(app, "shiny.appobj") diff --git a/tests/testthat/test-pathwaysLogical.R b/tests/testthat/test-pathwaysLogical.R index 7f42896f..cf426f78 100644 --- a/tests/testthat/test-pathwaysLogical.R +++ b/tests/testthat/test-pathwaysLogical.R @@ -1,9 +1,9 @@ library(testthat) library(TreatmentPatterns) library(dplyr) -library(CDMConnector) test_that("A", { + skip_if_not(ableToRun()$CDMC) con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) cohorts <- data.frame( @@ -54,6 +54,7 @@ test_that("A", { }) test_that("A-B", { + skip_if_not(ableToRun()$CDMC) con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) cohorts <- data.frame( @@ -106,6 +107,7 @@ test_that("A-B", { test_that("A-B-C", { + skip_if_not(ableToRun()$CDMC) con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) cohorts <- data.frame( @@ -158,6 +160,7 @@ test_that("A-B-C", { }) test_that("A-B+C", { + skip_if_not(ableToRun()$CDMC) con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) cohorts <- data.frame( @@ -210,6 +213,7 @@ test_that("A-B+C", { }) test_that("A+B-C", { + skip_if_not(ableToRun()$CDMC) con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) cohorts <- data.frame( @@ -262,6 +266,7 @@ test_that("A+B-C", { }) test_that("A-A+B", { + skip_if_not(ableToRun()$CDMC) con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) cohorts <- data.frame( @@ -314,6 +319,7 @@ test_that("A-A+B", { }) test_that("A-B-A-B", { + skip_if_not(ableToRun()$CDMC) con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) cohorts <- data.frame( @@ -367,6 +373,7 @@ test_that("A-B-A-B", { }) test_that("A-B-A", { + skip_if_not(ableToRun()$CDMC) con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) cohorts <- data.frame( @@ -419,6 +426,7 @@ test_that("A-B-A", { }) test_that("A-B-B, collapse to A-B", { + skip_if_not(ableToRun()$CDMC) con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) cohorts <- data.frame( @@ -471,6 +479,7 @@ test_that("A-B-B, collapse to A-B", { }) test_that("A-B-B", { + skip_if_not(ableToRun()$CDMC) con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) cohorts <- data.frame( @@ -523,6 +532,7 @@ test_that("A-B-B", { }) test_that("A+B-A", { + skip_if_not(ableToRun()$CDMC) con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) cohorts <- data.frame( @@ -575,6 +585,7 @@ test_that("A+B-A", { }) test_that("A-A-B", { + skip_if_not(ableToRun()$CDMC) con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) cohorts <- data.frame( @@ -627,6 +638,7 @@ test_that("A-A-B", { }) test_that("A-A-B, collapse to A-B", { + skip_if_not(ableToRun()$CDMC) con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) cohorts <- data.frame( @@ -679,6 +691,7 @@ test_that("A-A-B, collapse to A-B", { }) test_that("A+B-A+B, collapse to A+B", { + skip_if_not(ableToRun()$CDMC) con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) cohorts <- data.frame( @@ -732,6 +745,7 @@ test_that("A+B-A+B, collapse to A+B", { }) test_that("A+B-A+B", { + skip_if_not(ableToRun()$CDMC) con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) cohorts <- data.frame( @@ -785,6 +799,7 @@ test_that("A+B-A+B", { }) test_that("A-A+B-B", { + skip_if_not(ableToRun()$CDMC) con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) cohorts <- data.frame( @@ -836,6 +851,7 @@ test_that("A-A+B-B", { }) test_that("A-A-C-A+B+C-C", { + skip_if_not(ableToRun()$CDMC) con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) cohorts <- data.frame( @@ -888,6 +904,7 @@ test_that("A-A-C-A+B+C-C", { }) test_that("A-A+B+C-A+C-C", { + skip_if_not(ableToRun()$CDMC) con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) cohorts <- data.frame( @@ -940,6 +957,7 @@ test_that("A-A+B+C-A+C-C", { }) test_that("A-A+C-C-B+C-C", { + skip_if_not(ableToRun()$CDMC) con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) cohorts <- data.frame( @@ -993,6 +1011,7 @@ test_that("A-A+C-C-B+C-C", { }) test_that("start event == start target", { + skip_if_not(ableToRun()$CDMC) con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) cohorts <- data.frame( @@ -1043,6 +1062,7 @@ test_that("start event == start target", { }) test_that("end event == end target", { + skip_if_not(ableToRun()$CDMC) con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) cohorts <- data.frame( @@ -1093,6 +1113,7 @@ test_that("end event == end target", { }) test_that("start-end event == start-end target", { + skip_if_not(ableToRun()$CDMC) con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) cohorts <- data.frame( @@ -1143,6 +1164,7 @@ test_that("start-end event == start-end target", { }) test_that("start event < start target", { + skip_if_not(ableToRun()$CDMC) con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) cohorts <- data.frame( @@ -1184,6 +1206,7 @@ test_that("start event < start target", { }) test_that("start event < start target, periodPrior = 60", { + skip_if_not(ableToRun()$CDMC) con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) cohorts <- data.frame( @@ -1234,6 +1257,7 @@ test_that("start event < start target, periodPrior = 60", { }) test_that("start event > end target", { + skip_if_not(ableToRun()$CDMC) con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) cohorts <- data.frame( @@ -1275,6 +1299,7 @@ test_that("start event > end target", { }) test_that("collapse A-B-B-B to A-A+B-B", { + skip_if_not(ableToRun()$CDMC) con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomia_dir()) cohorts <- data.frame( From ec60253945fbfe9cc66de8a2c8a0b45bdcbf6904 Mon Sep 17 00:00:00 2001 From: Maarten van Kessel Date: Mon, 19 Aug 2024 15:51:09 +0200 Subject: [PATCH 08/14] Bumped version --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 6de65b5b..f53b5890 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: TreatmentPatterns Type: Package Title: Analyzes Real-World Treatment Patterns of a Study Population of Interest -Version: 2.6.7 +Version: 2.6.8 Authors@R: c(person("Aniek", "Markus", , role = c("aut"), comment = c(ORCID = "0000-0001-5779-4794")), person("Maarten", "van Kessel", email = "m.l.vankessel@erasmusmc.nl", role = c("cre"), comment = c(ORCID = "0009-0006-8832-6030"))) From 9207076fafa59631a451fbf622a79bf46c9a90aa Mon Sep 17 00:00:00 2001 From: Maarten van Kessel Date: Mon, 19 Aug 2024 15:51:21 +0200 Subject: [PATCH 09/14] Added test change --- NEWS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS.md b/NEWS.md index 8613408a..bfcd662c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,7 @@ * Fixed issue with where combinations sometimes got miss-classified. * Fixed issue when event starts and ends on end-date of target. * Fixed issue when collapsing events when there is also a combination, when `filterTreatments = "All"`. +* Added check in tests to only run if packages are availible. (noSuggests, M1). # TreatmentPatterns 2.6.7 --------- From 6e3ba4d0cbceef1f5b36e3df38d1f4e8bd9a2f8f Mon Sep 17 00:00:00 2001 From: Maarten van Kessel Date: Wed, 21 Aug 2024 15:14:56 +0200 Subject: [PATCH 10/14] Updated sankey so it supports n layers --- R/createSankeyDiagram.R | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/R/createSankeyDiagram.R b/R/createSankeyDiagram.R index e9b41733..06742502 100644 --- a/R/createSankeyDiagram.R +++ b/R/createSankeyDiagram.R @@ -16,28 +16,17 @@ splitPathItems <- function(treatmentPathways) { } createLinks <- function(data) { - result1 <- data %>% - mutate( - source = paste0("1.", .data$path1), - target = paste0("2.", .data$path2) - ) %>% - select("source", "target", "freq") - - - if (suppressWarnings(!is.null(data$path3))) { - result2 <- data %>% - mutate( - source = paste0("2.", .data$path2), - target = paste0("3.", .data$path3) - ) %>% - select("source", "target", "freq") - - links <- dplyr::bind_rows( - result1, result2 - ) - } else { - links <- result1 - } + links <- lapply(seq_len(ncol(data) - 2), function(i) { + df <- data[, c(i, i + 1, ncol(data))] + names(df) <- c("source", "target", "freq") + df <- df %>% + dplyr::mutate( + source = sprintf("%s.%s", i, .data$source), + target = sprintf("%s.%s", i + 1, .data$target) + ) + return(df) + }) |> + dplyr::bind_rows() links <- links %>% dplyr::mutate(value = round(freq / sum(freq) * 100, 2)) %>% From ae21b6381489810991d7133717c957ba1840adcf Mon Sep 17 00:00:00 2001 From: Maarten van Kessel Date: Fri, 23 Aug 2024 14:29:38 +0200 Subject: [PATCH 11/14] Upated --- NEWS.md | 1 + extras/TreatmentPatterns.pdf | Bin 159106 -> 160797 bytes 2 files changed, 1 insertion(+) diff --git a/NEWS.md b/NEWS.md index bfcd662c..14594a3c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -5,6 +5,7 @@ * Fixed issue when event starts and ends on end-date of target. * Fixed issue when collapsing events when there is also a combination, when `filterTreatments = "All"`. * Added check in tests to only run if packages are availible. (noSuggests, M1). +* `createSankeyDiagram()` now supports pathways over 3 levels long. # TreatmentPatterns 2.6.7 --------- diff --git a/extras/TreatmentPatterns.pdf b/extras/TreatmentPatterns.pdf index f7fd23f721ba5a535ab0cda2a72cb8c6e57d3e37..99681884674692260ea23a570e4682530b49158e 100644 GIT binary patch delta 21647 zcmd^nd0b6v)UdOQl+rw-QksXehcl5hO9K^MlxRdWxDDnU88Tkv!A6Ks2_;EpGEbHH zBAMr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n zipY@ea7+Tw%ZX^1alhrL)#(c$z+!C-lf|4!Q2+tG8VeZ?k`jV#Is}Z-Vsnd~a_P`Nygi8V$44eHD_&FYn)le|uczdXgsHHlLj6pySaXPDB2tWvG)UjqnhAqLs zeolrBB5N{eEW2z6Mv7#ceSmQiL%3~#LIZm}4*PKk z`UT*M*#iX>yB-AN#B8aC003u~=$N2@9o_;=$l)L*WReTH{rlrG2yhjDSo5cnDuM`{ zjUW_5*{lY?&ej}QPr~*Q@Vyw|^Jl%^mot!yao8`08WDYa98~o=dr81%{8>YJzXRgQ z!4u@2Wt}0JfUub}SIo{QV4URldYyiU8?Yh*Q2qu#P4wXh9$Y7|X s1Ox|x-1_qV{~-xH__Q;7d}7x4Nm(f);J;pgqAjJX(^b From e811e28224e9878e6c5f48b4e9c96a2489d70d2a Mon Sep 17 00:00:00 2001 From: Maarten van Kessel Date: Thu, 29 Aug 2024 10:46:47 +0200 Subject: [PATCH 12/14] Updated DOI url --- inst/CITATION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/CITATION b/inst/CITATION index 41fddacf..fc5f1e12 100644 --- a/inst/CITATION +++ b/inst/CITATION @@ -12,5 +12,5 @@ bibentry( year = 2022, month = "oct", doi = "10.1016/j.cmpb.2022.107081", - url = "https://www.sciencedirect.com/science/article/pii/S016926072200462X" + url = "https://doi.org/10.1016/j.cmpb.2022.107081" ) From f3b53831b714d79381b57c2c42ca5b82a40dc178 Mon Sep 17 00:00:00 2001 From: Maarten van Kessel Date: Thu, 29 Aug 2024 10:52:10 +0200 Subject: [PATCH 13/14] Updated citation url in readme to use DOI link --- README.Rmd | 2 +- README.md | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/README.Rmd b/README.Rmd index 075a5f10..90f529eb 100644 --- a/README.Rmd +++ b/README.Rmd @@ -23,7 +23,7 @@ knitr::opts_chunk$set( -[_Markus A, Verhamme K, Kors J, Rijnbeek P (2022). “TreatmentPatterns: An R package to facilitate the standardized development and analysis of treatment patterns across disease domains.” Computer Methods and Programs in Biomedicine._](https://www.sciencedirect.com/science/article/pii/S016926072200462X?via%3Dihub) +[_Markus A, Verhamme K, Kors J, Rijnbeek P (2022). “TreatmentPatterns: An R package to facilitate the standardized development and analysis of treatment patterns across disease domains.” Computer Methods and Programs in Biomedicine._](https://doi.org/10.1016/j.cmpb.2022.107081) This R package contains the resources for performing a treatment pathway analysis of a study population of interest in observational databases. The package partially relies on the Observational Medical Outcomes Partnership Common Data Model (OMOP CDM), but the main parts of the package are also usable with different data formats. diff --git a/README.md b/README.md index 778ca9bc..0cf71e37 100755 --- a/README.md +++ b/README.md @@ -16,8 +16,7 @@ coverage](https://codecov.io/gh/darwin-eu-dev/TreatmentPatterns/branch/master/gr [*Markus A, Verhamme K, Kors J, Rijnbeek P (2022). “TreatmentPatterns: An R package to facilitate the standardized development and analysis of treatment patterns across disease domains.” Computer Methods and -Programs in -Biomedicine.*](https://www.sciencedirect.com/science/article/pii/S016926072200462X?via%3Dihub) +Programs in Biomedicine.*](https://doi.org/10.1016/j.cmpb.2022.107081) This R package contains the resources for performing a treatment pathway analysis of a study population of interest in observational databases. From fca9f073b71550716020e4f75bfacf22fb199c1a Mon Sep 17 00:00:00 2001 From: Maarten van Kessel Date: Thu, 29 Aug 2024 13:35:09 +0200 Subject: [PATCH 14/14] Added CRAN sub --- CRAN-SUBMISSION | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CRAN-SUBMISSION b/CRAN-SUBMISSION index 16f3c51a..bfdaf8af 100644 --- a/CRAN-SUBMISSION +++ b/CRAN-SUBMISSION @@ -1,3 +1,3 @@ -Version: 2.6.6 -Date: 2024-04-16 13:53:49 UTC -SHA: 1ba6bac2a46958f957b62aa25c5f50be1f9ef19b +Version: 2.6.8 +Date: 2024-08-29 08:55:41 UTC +SHA: 08db56f2c600fd67f4e29706811892f8a61c369a