diff --git a/DESCRIPTION b/DESCRIPTION index db5f55dc..64a8acc3 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: Strategus Type: Package Title: Coordinating and Executing Analytics Using HADES Modules -Version: 0.0.4 -Date: 2023-03-29 +Version: 0.0.5 +Date: 2023-04-13 Authors@R: c( person("Martijn", "Schuemie", email = "schuemie@ohdsi.org", role = c("aut", "cre")), person("Anthony", "Sena", email = "sena@ohdsi.org", role = c("aut")), diff --git a/NEWS.md b/NEWS.md index ba8022d9..2ec594aa 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,9 @@ +Strategus 0.0.5 +=============== + +- Required metadata tables check fails with DatabaseConnector < 6.0 (#61) +- Update module references and add script to run Strategus on Eunomia in `extras/ExecuteStrategusOnEunomia.R` (#66) + Strategus 0.0.4 =============== diff --git a/R/DatabaseMetaData.R b/R/DatabaseMetaData.R index bcf20a9e..cdd775f3 100644 --- a/R/DatabaseMetaData.R +++ b/R/DatabaseMetaData.R @@ -42,7 +42,7 @@ createDatabaseMetaData <- function(executionSettings, keyringName = NULL) { connection = connection, databaseSchema = executionSettings$cdmDatabaseSchema ) - + cdmTableList <- tolower(cdmTableList) if (!length(cdmTableList[which(x = cdmTableList %in% requiredTables)]) == length(requiredTables)) { missingCdmTables <- requiredTables[!(requiredTables %in% cdmTableList)] diff --git a/docs/404.html b/docs/404.html index cb099a47..41244dbd 100644 --- a/docs/404.html +++ b/docs/404.html @@ -32,7 +32,7 @@ Strategus - 0.0.4 + 0.0.5 diff --git a/docs/articles/CreatingAnalysisSpecification.html b/docs/articles/CreatingAnalysisSpecification.html index c84b30a0..c7aeddc2 100644 --- a/docs/articles/CreatingAnalysisSpecification.html +++ b/docs/articles/CreatingAnalysisSpecification.html @@ -33,7 +33,7 @@ Strategus - 0.0.4 + 0.0.5 @@ -94,7 +94,7 @@

Creating Analysis Specification

Anthony G. Sena

-

2023-03-29

+

2023-04-13

Source: vignettes/CreatingAnalysisSpecification.Rmd @@ -239,31 +239,31 @@

CohortIncidence Module Settings
 source("https://raw.githubusercontent.com/OHDSI/CohortIncidenceModule/v0.0.6/SettingsFunctions.R")
-library(CohortIncidence)
+library(CohortIncidence)
 targets <- list(
-  createCohortRef(id = 1, name = "Celecoxib"),
-  createCohortRef(id = 2, name = "Diclofenac"),
-  createCohortRef(id = 4, name = "Celecoxib Age >= 30"),
-  createCohortRef(id = 5, name = "Diclofenac Age >= 30")
+  createCohortRef(id = 1, name = "Celecoxib"),
+  createCohortRef(id = 2, name = "Diclofenac"),
+  createCohortRef(id = 4, name = "Celecoxib Age >= 30"),
+  createCohortRef(id = 5, name = "Diclofenac Age >= 30")
 )
-outcomes <- list(createOutcomeDef(id = 1, name = "GI bleed", cohortId = 3, cleanWindow = 9999))
+outcomes <- list(createOutcomeDef(id = 1, name = "GI bleed", cohortId = 3, cleanWindow = 9999))
 
 tars <- list(
-  createTimeAtRiskDef(id = 1, startWith = "start", endWith = "end"),
-  createTimeAtRiskDef(id = 2, startWith = "start", endWith = "start", endOffset = 365)
+  createTimeAtRiskDef(id = 1, startWith = "start", endWith = "end"),
+  createTimeAtRiskDef(id = 2, startWith = "start", endWith = "start", endOffset = 365)
 )
-analysis1 <- createIncidenceAnalysis(
+analysis1 <- createIncidenceAnalysis(
   targets = c(1, 2, 4, 5),
   outcomes = c(1),
   tars = c(1, 2)
 )
 
-irDesign <- createIncidenceDesign(
+irDesign <- createIncidenceDesign(
   targetDefs = targets,
   outcomeDefs = outcomes,
   tars = tars,
   analysisList = list(analysis1),
-  strataSettings = createStrataSettings(
+  strataSettings = createStrataSettings(
     byYear = TRUE,
     byGender = TRUE
   )
@@ -281,11 +281,11 @@ 

Characterization Module Settings
-source("https://raw.githubusercontent.com/OHDSI/CharacterizationModule/v0.3.0/SettingsFunctions.R")
+source("https://raw.githubusercontent.com/OHDSI/CharacterizationModule/v0.3.1/SettingsFunctions.R")
 characterizationModuleSpecifications <- createCharacterizationModuleSpecifications(
   targetIds = c(1, 2),
   outcomeIds = 3,
-  covariateSettings = FeatureExtraction::createDefaultCovariateSettings(),
+  covariateSettings = FeatureExtraction::createDefaultCovariateSettings(),
   dechallengeStopInterval = 30,
   dechallengeEvaluationWindow = 30,
   timeAtRisk = data.frame(
@@ -303,7 +303,7 @@ 

CohortMethod Module Settings
-library(CohortMethod)
+library(CohortMethod)
 source("https://raw.githubusercontent.com/OHDSI/CohortMethodModule/v0.1.0/SettingsFunctions.R")
 negativeControlOutcomes <- lapply(
   X = ncoCohortSet$cohortId,
@@ -324,13 +324,13 @@ 

CohortMethod Module SettingsoutcomesOfInterest ) -tcos1 <- CohortMethod::createTargetComparatorOutcomes( +tcos1 <- CohortMethod::createTargetComparatorOutcomes( targetId = 1, comparatorId = 2, outcomes = outcomes, excludedCovariateConceptIds = c(1118084, 1124300) ) -tcos2 <- CohortMethod::createTargetComparatorOutcomes( +tcos2 <- CohortMethod::createTargetComparatorOutcomes( targetId = 4, comparatorId = 5, outcomes = outcomes, @@ -339,9 +339,9 @@

CohortMethod Module SettingstargetComparatorOutcomesList <- list(tcos1, tcos2) -covarSettings <- FeatureExtraction::createDefaultCovariateSettings(addDescendantsToExclude = TRUE) +covarSettings <- FeatureExtraction::createDefaultCovariateSettings(addDescendantsToExclude = TRUE) -getDbCmDataArgs <- CohortMethod::createGetDbCohortMethodDataArgs( +getDbCmDataArgs <- CohortMethod::createGetDbCohortMethodDataArgs( washoutPeriod = 183, firstExposureOnly = TRUE, removeDuplicateSubjects = "remove all", @@ -349,7 +349,7 @@

CohortMethod Module Settings= covarSettings ) -createStudyPopArgs <- CohortMethod::createCreateStudyPopulationArgs( +createStudyPopArgs <- CohortMethod::createCreateStudyPopulationArgs( minDaysAtRisk = 1, riskWindowStart = 0, startAnchor = "cohort start", @@ -357,18 +357,18 @@

CohortMethod Module Settings= "cohort end" ) -matchOnPsArgs <- CohortMethod::createMatchOnPsArgs() -fitOutcomeModelArgs <- CohortMethod::createFitOutcomeModelArgs(modelType = "cox") -createPsArgs <- CohortMethod::createCreatePsArgs( +matchOnPsArgs <- CohortMethod::createMatchOnPsArgs() +fitOutcomeModelArgs <- CohortMethod::createFitOutcomeModelArgs(modelType = "cox") +createPsArgs <- CohortMethod::createCreatePsArgs( stopOnError = FALSE, - control = Cyclops::createControl(cvRepetitions = 1) + control = Cyclops::createControl(cvRepetitions = 1) ) -computeSharedCovBalArgs <- CohortMethod::createComputeCovariateBalanceArgs() -computeCovBalArgs <- CohortMethod::createComputeCovariateBalanceArgs( - covariateFilter = FeatureExtraction::getDefaultTable1Specifications() +computeSharedCovBalArgs <- CohortMethod::createComputeCovariateBalanceArgs() +computeCovBalArgs <- CohortMethod::createComputeCovariateBalanceArgs( + covariateFilter = FeatureExtraction::getDefaultTable1Specifications() ) -cmAnalysis1 <- CohortMethod::createCmAnalysis( +cmAnalysis1 <- CohortMethod::createCmAnalysis( analysisId = 1, description = "No matching, simple outcome model", getDbCohortMethodDataArgs = getDbCmDataArgs, @@ -376,7 +376,7 @@

CohortMethod Module Settings= fitOutcomeModelArgs ) -cmAnalysis2 <- CohortMethod::createCmAnalysis( +cmAnalysis2 <- CohortMethod::createCmAnalysis( analysisId = 2, description = "Matching on ps and covariates, simple outcomeModel", getDbCohortMethodDataArgs = getDbCmDataArgs, @@ -406,7 +406,7 @@

SelfControlledCaseSeries Modul cohortMethodModuleSpecifications to perform a comparative cohort analysis for this study.

-library(SelfControlledCaseSeries)
+library(SelfControlledCaseSeries)
 source(url = "https://raw.githubusercontent.com/OHDSI/SelfControlledCaseSeriesModule/v0.1.3/SettingsFunctions.R")
 
 # Exposures-outcomes -----------------------------------------------------------
@@ -417,21 +417,21 @@ 

SelfControlledCaseSeries Modul exposuresOutcomeList <- list() for (exposureOfInterestId in exposureOfInterestIds) { for (outcomeOfInterestId in outcomeOfInterestIds) { - exposuresOutcomeList[[length(exposuresOutcomeList) + 1]] <- createExposuresOutcome( + exposuresOutcomeList[[length(exposuresOutcomeList) + 1]] <- createExposuresOutcome( outcomeId = outcomeOfInterestId, - exposures = list(createExposure(exposureId = exposureOfInterestId)) + exposures = list(createExposure(exposureId = exposureOfInterestId)) ) } for (negativeControlOutcomeId in negativeControlOutcomeIds) { - exposuresOutcomeList[[length(exposuresOutcomeList) + 1]] <- createExposuresOutcome( + exposuresOutcomeList[[length(exposuresOutcomeList) + 1]] <- createExposuresOutcome( outcomeId = negativeControlOutcomeId, - exposures = list(createExposure(exposureId = exposureOfInterestId, trueEffectSize = 1)) + exposures = list(createExposure(exposureId = exposureOfInterestId, trueEffectSize = 1)) ) } } # Analysis settings ------------------------------------------------------------ -getDbSccsDataArgs <- SelfControlledCaseSeries::createGetDbSccsDataArgs( +getDbSccsDataArgs <- SelfControlledCaseSeries::createGetDbSccsDataArgs( studyStartDate = "", studyEndDate = "20191130", maxCasesPerOutcome = 1e6, @@ -440,12 +440,12 @@

SelfControlledCaseSeries Modul deleteCovariatesSmallCount = 0 ) -createStudyPopulation6AndOlderArgs <- SelfControlledCaseSeries::createCreateStudyPopulationArgs( +createStudyPopulation6AndOlderArgs <- SelfControlledCaseSeries::createCreateStudyPopulationArgs( minAge = 18, naivePeriod = 365 ) -covarPreExp <- SelfControlledCaseSeries::createEraCovariateSettings( +covarPreExp <- SelfControlledCaseSeries::createEraCovariateSettings( label = "Pre-exposure", includeEraIds = "exposureId", start = -30, @@ -453,7 +453,7 @@

SelfControlledCaseSeries Modul endAnchor = "era start" ) -covarExposureOfInt <- SelfControlledCaseSeries::createEraCovariateSettings( +covarExposureOfInt <- SelfControlledCaseSeries::createEraCovariateSettings( label = "Main", includeEraIds = "exposureId", start = 1, @@ -464,27 +464,27 @@

SelfControlledCaseSeries Modul exposureOfInterest = TRUE ) -calendarTimeSettings <- SelfControlledCaseSeries::createCalendarTimeCovariateSettings( +calendarTimeSettings <- SelfControlledCaseSeries::createCalendarTimeCovariateSettings( calendarTimeKnots = 5, allowRegularization = TRUE, computeConfidenceIntervals = FALSE ) -seasonalitySettings <- SelfControlledCaseSeries::createSeasonalityCovariateSettings( +seasonalitySettings <- SelfControlledCaseSeries::createSeasonalityCovariateSettings( seasonKnots = 5, allowRegularization = TRUE, computeConfidenceIntervals = FALSE ) -createSccsIntervalDataArgs <- SelfControlledCaseSeries::createCreateSccsIntervalDataArgs( +createSccsIntervalDataArgs <- SelfControlledCaseSeries::createCreateSccsIntervalDataArgs( eraCovariateSettings = list(covarPreExp, covarExposureOfInt), seasonalityCovariateSettings = seasonalitySettings, calendarTimeCovariateSettings = calendarTimeSettings, minCasesForTimeCovariates = 100000 ) -fitSccsModelArgs <- SelfControlledCaseSeries::createFitSccsModelArgs( - control = Cyclops::createControl( +fitSccsModelArgs <- SelfControlledCaseSeries::createFitSccsModelArgs( + control = Cyclops::createControl( cvType = "auto", selectorType = "byPid", startingVariance = 0.1, @@ -494,7 +494,7 @@

SelfControlledCaseSeries Modul ) ) -sccsAnalysis1 <- SelfControlledCaseSeries::createSccsAnalysis( +sccsAnalysis1 <- SelfControlledCaseSeries::createSccsAnalysis( analysisId = 1, description = "SCCS age 18-", getDbSccsDataArgs = getDbSccsDataArgs, @@ -518,30 +518,30 @@

PatientLevelPrediction Module Se

The following code creates the plpModuleSpecifications to perform a self-controlled case series analysis for this study.

-source("https://raw.githubusercontent.com/OHDSI/PatientLevelPredictionModule/v0.0.8/SettingsFunctions.R")
+source("https://raw.githubusercontent.com/OHDSI/PatientLevelPredictionModule/v0.1.0/SettingsFunctions.R")
 
 makeModelDesignSettings <- function(targetId, outcomeId, popSettings, covarSettings) {
-  invisible(PatientLevelPrediction::createModelDesign(
+  invisible(PatientLevelPrediction::createModelDesign(
     targetId = targetId,
     outcomeId = outcomeId,
-    restrictPlpDataSettings = PatientLevelPrediction::createRestrictPlpDataSettings(),
+    restrictPlpDataSettings = PatientLevelPrediction::createRestrictPlpDataSettings(),
     populationSettings = popSettings,
     covariateSettings = covarSettings,
-    preprocessSettings = PatientLevelPrediction::createPreprocessSettings(),
-    modelSettings = PatientLevelPrediction::setLassoLogisticRegression(),
-    splitSettings = PatientLevelPrediction::createDefaultSplitSetting(),
+    preprocessSettings = PatientLevelPrediction::createPreprocessSettings(),
+    modelSettings = PatientLevelPrediction::setLassoLogisticRegression(),
+    splitSettings = PatientLevelPrediction::createDefaultSplitSetting(),
     runCovariateSummary = T
   ))
 }
 
-plpPopulationSettings <- PatientLevelPrediction::createStudyPopulationSettings(
+plpPopulationSettings <- PatientLevelPrediction::createStudyPopulationSettings(
   startAnchor = "cohort start",
   riskWindowStart = 1,
   endAnchor = "cohort start",
   riskWindowEnd = 365,
   minTimeAtRisk = 1
 )
-plpCovarSettings <- FeatureExtraction::createDefaultCovariateSettings()
+plpCovarSettings <- FeatureExtraction::createDefaultCovariateSettings()
 
 modelDesignList <- list()
 for (i in 1:length(exposureOfInterestIds)) {
diff --git a/docs/articles/CreatingModules.html b/docs/articles/CreatingModules.html
index 28670e88..d8892cba 100644
--- a/docs/articles/CreatingModules.html
+++ b/docs/articles/CreatingModules.html
@@ -33,7 +33,7 @@
       
       
         Strategus
-        0.0.4
+        0.0.5
       
     
@@ -94,7 +94,7 @@

Creating Strategus Modules

Anthony G. Sena

-

2023-03-29

+

2023-04-13

Source: vignettes/CreatingModules.Rmd diff --git a/docs/articles/ExecuteStrategus.html b/docs/articles/ExecuteStrategus.html index 9e944fc7..f0947815 100644 --- a/docs/articles/ExecuteStrategus.html +++ b/docs/articles/ExecuteStrategus.html @@ -33,7 +33,7 @@ Strategus - 0.0.4 + 0.0.5

@@ -94,7 +94,7 @@

Execute Strategus

Anthony G. Sena

-

2023-03-29

+

2023-04-13

Source: vignettes/ExecuteStrategus.Rmd diff --git a/docs/articles/IntroductionToStrategus.html b/docs/articles/IntroductionToStrategus.html index aec5d3f6..6ffa2fd2 100644 --- a/docs/articles/IntroductionToStrategus.html +++ b/docs/articles/IntroductionToStrategus.html @@ -33,7 +33,7 @@ Strategus - 0.0.4 + 0.0.5

@@ -94,7 +94,7 @@

Introduction to Strategus

Anthony G. Sena

-

2023-03-29

+

2023-04-13

Source: vignettes/IntroductionToStrategus.Rmd diff --git a/docs/articles/index.html b/docs/articles/index.html index 7bc4947a..9d03d40b 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -17,7 +17,7 @@ Strategus - 0.0.4 + 0.0.5

diff --git a/docs/authors.html b/docs/authors.html index 41a65c4e..1768db4d 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -17,7 +17,7 @@ Strategus - 0.0.4 + 0.0.5 diff --git a/docs/index.html b/docs/index.html index efaeb342..80841a25 100644 --- a/docs/index.html +++ b/docs/index.html @@ -33,7 +33,7 @@ Strategus - 0.0.4 + 0.0.5 diff --git a/docs/news/index.html b/docs/news/index.html index 28addcc2..5b010540 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -17,7 +17,7 @@ Strategus - 0.0.4 + 0.0.5 @@ -69,6 +69,11 @@

Changelog

Source: NEWS.md +
+ +
  • Required metadata tables check fails with DatabaseConnector < 6.0 (#61)
  • +
  • Update module references and add script to run Strategus on Eunomia in extras/ExecuteStrategusOnEunomia.R (#66)
  • +
  • Add DB Platform Tests (#53)
  • diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 60c08168..4d901f0a 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -6,5 +6,5 @@ articles: CreatingModules: CreatingModules.html ExecuteStrategus: ExecuteStrategus.html IntroductionToStrategus: IntroductionToStrategus.html -last_built: 2023-03-29T18:18Z +last_built: 2023-04-13T19:10Z diff --git a/docs/pull_request_template.html b/docs/pull_request_template.html index 5e04acee..da7d2faf 100644 --- a/docs/pull_request_template.html +++ b/docs/pull_request_template.html @@ -17,7 +17,7 @@ Strategus - 0.0.4 + 0.0.5
diff --git a/docs/reference/Strategus-package.html b/docs/reference/Strategus-package.html index bfd6a3c9..9ce8cd3d 100644 --- a/docs/reference/Strategus-package.html +++ b/docs/reference/Strategus-package.html @@ -17,7 +17,7 @@ Strategus - 0.0.4 + 0.0.5 diff --git a/docs/reference/addModuleSpecifications.html b/docs/reference/addModuleSpecifications.html index 69a397d3..13045831 100644 --- a/docs/reference/addModuleSpecifications.html +++ b/docs/reference/addModuleSpecifications.html @@ -17,7 +17,7 @@ Strategus - 0.0.4 + 0.0.5 diff --git a/docs/reference/addSharedResources.html b/docs/reference/addSharedResources.html index b6f94ad9..ff56f2bc 100644 --- a/docs/reference/addSharedResources.html +++ b/docs/reference/addSharedResources.html @@ -17,7 +17,7 @@ Strategus - 0.0.4 + 0.0.5 diff --git a/docs/reference/createCdmExecutionSettings.html b/docs/reference/createCdmExecutionSettings.html index 688935be..029741fe 100644 --- a/docs/reference/createCdmExecutionSettings.html +++ b/docs/reference/createCdmExecutionSettings.html @@ -17,7 +17,7 @@ Strategus - 0.0.4 + 0.0.5 diff --git a/docs/reference/createEmptyAnalysisSpecificiations.html b/docs/reference/createEmptyAnalysisSpecificiations.html index c2078e04..23afcd89 100644 --- a/docs/reference/createEmptyAnalysisSpecificiations.html +++ b/docs/reference/createEmptyAnalysisSpecificiations.html @@ -17,7 +17,7 @@ Strategus - 0.0.4 + 0.0.5 diff --git a/docs/reference/createResultsExecutionSettings.html b/docs/reference/createResultsExecutionSettings.html index 0fe28dea..e58e7b5b 100644 --- a/docs/reference/createResultsExecutionSettings.html +++ b/docs/reference/createResultsExecutionSettings.html @@ -17,7 +17,7 @@ Strategus - 0.0.4 + 0.0.5 diff --git a/docs/reference/ensureAllModulesInstantiated.html b/docs/reference/ensureAllModulesInstantiated.html index cd082db4..98c42fbd 100644 --- a/docs/reference/ensureAllModulesInstantiated.html +++ b/docs/reference/ensureAllModulesInstantiated.html @@ -23,7 +23,7 @@ Strategus - 0.0.4 + 0.0.5 diff --git a/docs/reference/execute.html b/docs/reference/execute.html index ab44bbc3..165eea19 100644 --- a/docs/reference/execute.html +++ b/docs/reference/execute.html @@ -17,7 +17,7 @@ Strategus - 0.0.4 + 0.0.5 diff --git a/docs/reference/getModuleList.html b/docs/reference/getModuleList.html index e861ad42..5a8fb81a 100644 --- a/docs/reference/getModuleList.html +++ b/docs/reference/getModuleList.html @@ -18,7 +18,7 @@ Strategus - 0.0.4 + 0.0.5 diff --git a/docs/reference/index.html b/docs/reference/index.html index b7640803..bdbeb6c4 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -17,7 +17,7 @@ Strategus - 0.0.4 + 0.0.5 diff --git a/docs/reference/retrieveConnectionDetails.html b/docs/reference/retrieveConnectionDetails.html index 99ff3b1c..9af36e51 100644 --- a/docs/reference/retrieveConnectionDetails.html +++ b/docs/reference/retrieveConnectionDetails.html @@ -17,7 +17,7 @@ Strategus - 0.0.4 + 0.0.5 diff --git a/docs/reference/storeConnectionDetails.html b/docs/reference/storeConnectionDetails.html index d807845e..954df5e1 100644 --- a/docs/reference/storeConnectionDetails.html +++ b/docs/reference/storeConnectionDetails.html @@ -17,7 +17,7 @@ Strategus - 0.0.4 + 0.0.5 diff --git a/docs/reference/unlockKeyring.html b/docs/reference/unlockKeyring.html index f34a58d3..28a2447b 100644 --- a/docs/reference/unlockKeyring.html +++ b/docs/reference/unlockKeyring.html @@ -19,7 +19,7 @@ Strategus - 0.0.4 + 0.0.5 diff --git a/extras/ExecuteStrategusOnEunomia.R b/extras/ExecuteStrategusOnEunomia.R new file mode 100644 index 00000000..ff17b7bb --- /dev/null +++ b/extras/ExecuteStrategusOnEunomia.R @@ -0,0 +1,58 @@ +#Install packages required for this script --------- +#install.packages("remotes") +#install.packages("ParallelLogger") +#remotes::install_github("OHDSI/Strategus") +#remotes::install_github("OHDSI/Eunomia") +#remotes::install_github("OHDSI/CohortGenerator") + +#Run the Eunomia study --------- +# Set the folder & environment variable for module storage +moduleFolder <- "C:/temp/strategus/modules" +studyFolder <- "C:/temp/strategus/EunomiaTestStudy" +Sys.setenv("INSTANTIATED_MODULES_FOLDER" = moduleFolder) + +if (!dir.exists(moduleFolder)) { + dir.create(moduleFolder, recursive = TRUE) +} +if (!dir.exists(studyFolder)) { + dir.create(studyFolder, recursive = TRUE) +} + +# Create the execution settings for Eunomia ---------- +connectionDetails <- Eunomia::getEunomiaConnectionDetails( + databaseFile = file.path(studyFolder, "cdm.sqlite") +) + +Strategus::storeConnectionDetails(connectionDetails = connectionDetails, + connectionDetailsReference = "eunomia") + +executionSettings <- Strategus::createCdmExecutionSettings( + connectionDetailsReference = "eunomia", + workDatabaseSchema = "main", + cdmDatabaseSchema = "main", + cohortTableNames = CohortGenerator::getCohortTableNames(), + workFolder = file.path(studyFolder, "work_folder"), + resultsFolder = file.path(studyFolder, "results_folder"), + minCellCount = 5 +) + +ParallelLogger::saveSettingsToJson( + object = executionSettings, + file.path(studyFolder, "eunomiaExecutionSettings.json") +) + +# Execute the study --------- +analysisSpecifications <- ParallelLogger::loadSettingsFromJson( + fileName = system.file("testdata/analysisSpecification.json", + package = "Strategus") +) + +executionSettings <- ParallelLogger::loadSettingsFromJson( + fileName = file.path(studyFolder, "eunomiaExecutionSettings.json") +) + +Strategus::execute( + analysisSpecifications = analysisSpecifications, + executionSettings = executionSettings, + executionScriptFolder = file.path(studyFolder, "script_folder") +) diff --git a/extras/PackageMaintenance.R b/extras/PackageMaintenance.R index a4968c9a..c8dfdb98 100644 --- a/extras/PackageMaintenance.R +++ b/extras/PackageMaintenance.R @@ -31,6 +31,7 @@ devtools::spell_check() # Update the module version information based on updates found on GitHub library(dplyr) +# httr::set_config(httr::config(ssl_verifypeer = FALSE)) updateModuleVersionInfo <- function() { modules <- CohortGenerator::readCsv(file = "inst/csv/modules.csv") modules <- modules %>% diff --git a/extras/Strategus.pdf b/extras/Strategus.pdf index ce2f60dc..d146b516 100644 Binary files a/extras/Strategus.pdf and b/extras/Strategus.pdf differ diff --git a/inst/csv/modules.csv b/inst/csv/modules.csv index 1be0d345..806396cf 100644 --- a/inst/csv/modules.csv +++ b/inst/csv/modules.csv @@ -1,9 +1,9 @@ module,version,remote_repo,remote_username,module_type,main_package,main_package_tag -CharacterizationModule,v0.3.0,github.com,OHDSI,cdm,Characterization,v0.1.1 +CharacterizationModule,v0.3.1,github.com,OHDSI,cdm,Characterization,v0.1.1 CohortDiagnosticsModule,v0.0.7,github.com,OHDSI,cdm,CohortDiagnostics,v3.1.2 CohortGeneratorModule,v0.1.0,github.com,OHDSI,cdm,CohortGenerator,v0.8.0 CohortIncidenceModule,v0.0.6,github.com,OHDSI,cdm,CohortIncidence,v3.1.2 CohortMethodModule,v0.1.0,github.com,OHDSI,cdm,CohortMethod,74f017107e0cc1b740a2badc82879ab6ad291b23 -PatientLevelPredictionModule,v0.0.8,github.com,OHDSI,cdm,PatientLevelPrediction,v6.3.1 +PatientLevelPredictionModule,v0.1.0,github.com,OHDSI,cdm,PatientLevelPrediction,v6.3.1 SelfControlledCaseSeriesModule,v0.1.3,github.com,OHDSI,cdm,SelfControlledCaseSeries,15918616814b88137f82bf2aa9986e1dcdf39e74 EvidenceSynthesisModule,v0.1.3,github.com,OHDSI,results,EvidenceSynthesis,v0.4.0 diff --git a/inst/doc/CreatingAnalysisSpecification.pdf b/inst/doc/CreatingAnalysisSpecification.pdf index c8130e59..6ffedf66 100644 Binary files a/inst/doc/CreatingAnalysisSpecification.pdf and b/inst/doc/CreatingAnalysisSpecification.pdf differ diff --git a/inst/doc/CreatingModules.pdf b/inst/doc/CreatingModules.pdf index 5c74a55d..598ae3ef 100644 Binary files a/inst/doc/CreatingModules.pdf and b/inst/doc/CreatingModules.pdf differ diff --git a/inst/doc/ExecuteStrategus.pdf b/inst/doc/ExecuteStrategus.pdf index e0ea5133..026faebb 100644 Binary files a/inst/doc/ExecuteStrategus.pdf and b/inst/doc/ExecuteStrategus.pdf differ diff --git a/inst/doc/IntroductionToStrategus.pdf b/inst/doc/IntroductionToStrategus.pdf index 6328c4c2..a3f2afe5 100644 Binary files a/inst/doc/IntroductionToStrategus.pdf and b/inst/doc/IntroductionToStrategus.pdf differ diff --git a/inst/testdata/analysisSpecification.json b/inst/testdata/analysisSpecification.json index 41bb3b3f..9d7906c7 100644 --- a/inst/testdata/analysisSpecification.json +++ b/inst/testdata/analysisSpecification.json @@ -365,7 +365,7 @@ }, { "module": "CharacterizationModule", - "version": "0.2.3", + "version": "0.3.1", "remoteRepo": "github.com", "remoteUsername": "ohdsi", "settings": { @@ -2360,7 +2360,7 @@ }, { "module": "PatientLevelPredictionModule", - "version": "0.0.7", + "version": "0.1.0", "remoteRepo": "github.com", "remoteUsername": "ohdsi", "settings": [ diff --git a/vignettes/CreatingAnalysisSpecification.Rmd b/vignettes/CreatingAnalysisSpecification.Rmd index 4855d433..6434f5c3 100644 --- a/vignettes/CreatingAnalysisSpecification.Rmd +++ b/vignettes/CreatingAnalysisSpecification.Rmd @@ -184,7 +184,7 @@ The following code creates the `characterizationModuleSpecifications` to perform ```{r eval=FALSE} -source("https://raw.githubusercontent.com/OHDSI/CharacterizationModule/v0.3.0/SettingsFunctions.R") +source("https://raw.githubusercontent.com/OHDSI/CharacterizationModule/v0.3.1/SettingsFunctions.R") characterizationModuleSpecifications <- createCharacterizationModuleSpecifications( targetIds = c(1, 2), outcomeIds = 3, @@ -421,7 +421,7 @@ sccsModuleSpecifications <- creatSelfControlledCaseSeriesModuleSpecifications( The following code creates the `plpModuleSpecifications` to perform a self-controlled case series analysis for this study. ```{r eval=FALSE} -source("https://raw.githubusercontent.com/OHDSI/PatientLevelPredictionModule/v0.0.8/SettingsFunctions.R") +source("https://raw.githubusercontent.com/OHDSI/PatientLevelPredictionModule/v0.1.0/SettingsFunctions.R") makeModelDesignSettings <- function(targetId, outcomeId, popSettings, covarSettings) { invisible(PatientLevelPrediction::createModelDesign(