-
Notifications
You must be signed in to change notification settings - Fork 1
/
report-NO12.R
59 lines (50 loc) · 1.9 KB
/
report-NO12.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#' @title report-NO12
#' @description
#' Report from Test NO7 initial RE testing
# Clean environent and (re-)load the ospsuite.reportingengine package
rm(list=ls())
library(ospsuite.reportingengine)
ospsuite::removeAllUserDefinedPKParameters()
# Define inputs for workflow
simulationFile <- "Models/Theophylline (Boeckmann 1994) PO.pkml"
reportFolder <- "tests/Reports/Test-NO12"
reportTitle <- "Report NO12"
# Define data source
dataSource <- DataSource$new(
dataFile = "Data/test-NO7/data.nmdat",
metaDataFile = "Data/test-NO7/dict.csv",
caption = "Boeckmann 1994"
)
# Define the simulation outputs possibly with their PK parameters
pkCmax <- PkParameterInfo$new(pkParameter = "C_max", displayUnit = "mg/l")
pkTmax <- PkParameterInfo$new(pkParameter = "t_max", displayUnit = "h")
pkCtend <- PkParameterInfo$new(pkParameter = "C_tEnd", displayUnit = "mg/l")
pkAuCtend <- PkParameterInfo$new(pkParameter = "AUC_tEnd", displayUnit = "mg*h/l")
output <- Output$new(
path = "Organism|PeripheralVenousBlood|Theophylline|Plasma (Peripheral Venous Blood)",
displayName = "Theophylline",
displayUnit = "mg/l",
dataDisplayName = "Boeckmann 1994",
dataSelection = "STUD==0",
pkParameters = c(pkCmax, pkTmax, pkCtend, pkAuCtend)
)
# Define the simulation sets possibly mapping simulations to observed data
simulationSet <- SimulationSet$new(
simulationFile = simulationFile,
simulationSetName = "PO administration of 320 mg",
outputs = output,
dataSource = dataSource
)
# Define the workflow and its result folder
workflow <- MeanModelWorkflow$new(
simulationSets = simulationSet,
workflowFolder = reportFolder,
reportTitle = reportTitle,
# To speed up the report generation, we skip the Word report here
createWordReport = FALSE
)
# Define the workflow tasks
workflow$activateTasks()
workflow$inactivateTasks(tasks = c("calculateSensitivity", "plotSensitivity"))
# Run the workflow
workflow$runWorkflow()