Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V1.0 module bug fixes #163

Merged
merged 3 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions R/Module-Characterization.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ CharacterizationModule <- R6::R6Class(

jobContext <- private$jobContext
workFolder <- jobContext$moduleExecutionSettings$workSubFolder
resultsFolder <- jobContext$moduleExecutionSettings$resultsSubFolder

Characterization::runCharacterizationAnalyses(
connectionDetails = connectionDetails,
Expand All @@ -32,13 +33,13 @@ CharacterizationModule <- R6::R6Class(
outcomeDatabaseSchema = jobContext$moduleExecutionSettings$workDatabaseSchema,
outcomeTable = jobContext$moduleExecutionSettings$cohortTableNames$cohortTable,
cdmDatabaseSchema = jobContext$moduleExecutionSettings$cdmDatabaseSchema,
characterizationSettings = jobContext$settings,
characterizationSettings = jobContext$settings$analysis,
databaseId = jobContext$moduleExecutionSettings$cdmDatabaseMetaData$databaseId,
outputDirectory = jobContext$moduleExecutionSettings$resultsSubFolder,
outputDirectory = resultsFolder,
executionPath = workFolder,
csvFilePrefix = self$tablePrefix,
minCellCount = jobContext$moduleExecutionSettings$minCellCount,
minCharacterizationMean = jobContext$moduleExecutionSettings$minCharacterizationMean,
minCharacterizationMean = jobContext$settings$minCharacterizationMean,
incremental = jobContext$moduleExecutionSettings$incremental,
threads = as.double(ifelse(Sys.getenv('CharacterizationThreads') == "", 1,Sys.getenv('CharacterizationThreads') ))
)
Expand Down Expand Up @@ -241,7 +242,10 @@ CharacterizationModule <- R6::R6Class(
)

specifications <- super$createModuleSpecifications(
moduleSpecifications = analysis
moduleSpecifications = list(
analysis = analysis,
minCharacterizationMean = minCharacterizationMean
)
)
return(specifications)
}
Expand Down
4 changes: 3 additions & 1 deletion R/Module-CohortGenerator.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ CohortGeneratorModule <- R6::R6Class(
super$execute(connectionDetails, analysisSpecifications, executionSettings)

jobContext <- private$jobContext
cohortDefinitionSet <- super$.createCohortDefinitionSetFromJobContext()
cohortDefinitionSet <- super$.createCohortDefinitionSetFromJobContext(
generateStats = jobContext$settings$generateStats
)
negativeControlOutcomeSettings <- private$.createNegativeControlOutcomeSettingsFromJobContext()
resultsFolder <- jobContext$moduleExecutionSettings$resultsSubFolder
if (!dir.exists(resultsFolder)) {
Expand Down
2 changes: 1 addition & 1 deletion R/Module-CohortIncidence.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ CohortIncidenceModule <- R6::R6Class(
buildOptions <- CohortIncidence::buildOptions(
cohortTable = paste0(private$jobContext$moduleExecutionSettings$workDatabaseSchema, ".", private$jobContext$moduleExecutionSettings$cohortTableNames$cohortTable),
cdmDatabaseSchema = private$jobContext$moduleExecutionSettings$cdmDatabaseSchema,
sourceName = as.character(jobContext$moduleExecutionSettings$cdmDatabaseMetaData$databaseId),
sourceName = as.character(private$jobContext$moduleExecutionSettings$cdmDatabaseMetaData$databaseId),
refId = refId
)

Expand Down
Loading