TestProjectBuilder
TestProjectBuilder.RdManages the creation and writing test project, which can be used for this package or packages which use the reporting framework as base to build a test project
Super class
ospsuite.utils::Printable -> TestProjectBuilder
Active bindings
rootDirectoryroot directory of test project. This function synchronizes files from one directory to another, copying only the files that are not already present. This function updates the display names for scenarios and output paths in the project configuration.
Methods
Method iniTestProject()
A short description...
This function initializes the project structure and configuration for the test project.
Method setupRandomPopulations()
This function sets up populations for the test project by copying necessary files and exporting defined populations.
Usage
TestProjectBuilder$setupRandomPopulations(
projectConfiguration,
populationNames,
writeTestData = FALSE,
templateDir = NULL
)Arguments
projectConfigurationA ProjectConfiguration object containing the project configuration details.
populationNamesA character vector of population names to be copied.
writeTestDataA logical value indicating whether newly created test data should be filed to the inst directory of the package.
templateDircharacter string specifying the installation directory for the package.
Method setupSimulations()
This function sets up simulations for the test project by synchronizing necessary directories and running initialized scenarios to calculate pharmacokinetic (PK) parameters.
Usage
TestProjectBuilder$setupSimulations(
projectConfiguration,
scenarioList,
writeTestData,
templateDir = NULL
)Arguments
projectConfigurationA ProjectConfiguration object containing the project configuration details.
scenarioListA list of scenarios initialized for the project.
writeTestDataA logical value indicating whether newly created test data should be filed to the inst directory of the package.
templateDirA character string specifying the installation directory for the package.
Method setUpSensitivity()
Usage
TestProjectBuilder$setUpSensitivity(
projectConfiguration,
scenarioList,
scenarioName,
writeTestData,
parameterList,
sensitivitySheet = "smallSelection",
templateDir = NULL
)Arguments
projectConfigurationA ProjectConfiguration object containing project configuration details.
scenarioListA list of scenarios initialized for the project.
scenarioNameThe name of the scenario used for sensitivity
writeTestDataA logical value indicating whether newly created test data should be filed to the inst directory of the package.
parameterListA named list where each name corresponds to a parameter in the Excel sheet, and each value is the new value to set for that parameter.
sensitivitySheetName of sheet with parameter selection
templateDirA character string specifying the installation directory for the package.
Method addRandomTPData()
This function adds random time profile data to the test project for selected individuals.
Arguments
projectConfigurationA ProjectConfiguration object containing project configuration details.
scenarioResultsList of scenario results.
idsA vector of individual IDs to include in the random data.
timePointsA numeric vector specifying the time points at which to generate data (default is c(15, 30, 45, 60, 90, c(3, 6, 9, 12, 18, 24) * 60)).
outputPathIdsA character vector specifying the output path IDs to include in the random data (default is c('Plasma', 'CYP3A4total', 'CYP3A4Liver')).
sdShiftA numeric value indicating the standard deviation shift applied to the random values (default is 0.05).
lloqValueA numeric value representing the lower limit of quantification (default is 0.1).
Method addRandomPKData()
Usage
TestProjectBuilder$addRandomPKData(
projectConfiguration,
pkParameterDT,
ids,
outputPathIds = c("Plasma", "CYP3A4total", "CYP3A4Liver"),
sdShift = 0.05
)Arguments
projectConfigurationA ProjectConfiguration object containing project configuration details.
pkParameterDTA data.table containing PK parameters and values.
idsA vector of individual IDs to include in the random data.
outputPathIdsA character vector specifying the output path IDs to include in the random data (default is c('Plasma', 'CYP3A4total', 'CYP3A4Liver')).
sdShiftA numeric value indicating the standard deviation shift applied to the random values (default is 0.05).
Method mockManualEditingsCleanup()
This function cleans up the project configuration files by clearing existing data from relevant Excel sheets.
Method mockManualEditingsPopulation()
This function adds biometric ranges for virtual pediatric and one adult populations to the configuration files
Usage
TestProjectBuilder$mockManualEditingsPopulation(
projectConfiguration,
randomPops = data.table(populationName = c("adults", "toddler", "children",
"school-children", "adolescents"), species = "Human", population =
"European_ICRP_2002", numberOfIndividuals = 100, proportionOfFemales = 50, ageMin =
c(20, 0.5, 2, 6, 12), ageMax = c(40, 2, 6, 12, 18), weightUnit = "kg", heightUnit =
"cm", bMIUnit = "kg/m²", `protein Ontogenies` = "CYP3A4:CYP3A4, UGT1A4:UGT1A4")
)Method mockManualEditingsScenario()
This function sets up scenarios based on the defined populations and adds PK Parameters and output paths to the project configuration.
Usage
TestProjectBuilder$mockManualEditingsScenario(
projectConfiguration,
dtTestScenarios,
pKParameter = NULL
)Method mockManualEditingsPKParameter()
This function adds PK parameters to the project configuration based on templates.
Method mockManualEditingsIndividuals()
This function adjust the bio-metrics with in individuals and exports virtual twin populations.
Method mockManualEditingsSensitivity()
This function modifies specific parameters in a given Excel sheet based on the provided parameter list and saves the changes back to the workbook.
Usage
TestProjectBuilder$mockManualEditingsSensitivity(
projectConfiguration,
sheetName,
parameterList
)Arguments
projectConfigurationA list containing project configuration details, including the path to the sensitivity file.
sheetNameA string representing the name of the sheet in the Excel workbook that will be edited.
parameterListA named list where each name corresponds to a parameter in the Excel sheet, and each value is the new value to set for that parameter.