-
Notifications
You must be signed in to change notification settings - Fork 12
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
Improvements to profile plots when multiple datasets of a given type present per group #1054
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
Best to review the changes in how plot look will be by checking how snapshots for plots have changed: https://github.com/Open-Systems-Pharmacology/OSPSuite-R/pull/1054/files |
I see that interpolation has been removed completely? I would like to test how it behaves now, but require this feature first #1067 |
Why is #1067 needed to check that? We haven't had it thus far and have trusted the results from interpolation anyway. Here are two examples that can be used to check if the observed and simulated data are being paired properly: Example-1# load the simulation
sim <- loadTestSimulation("MinimalModel")
simResults <- importResultsFromCSV(
simulation = sim,
filePaths = getTestDataFilePath("Stevens_2012_placebo_indiv_results.csv")
)
# import observed data (will return a list of `DataSet` objects)
dataSet <- loadDataSetsFromExcel(
xlsFilePath = getTestDataFilePath("CompiledDataSetStevens2012.xlsx"),
importerConfiguration = loadDataImporterConfiguration(getTestDataFilePath("ImporterConfiguration.xml"))
)
# create a new instance and add datasets
myCombDat <- DataCombined$new()
myCombDat$addDataSets(dataSet)
myCombDat$addSimulationResults(
simResults,
quantitiesOrPaths = c(
"Organism|Lumen|Stomach|Metformin|Gastric retention",
"Organism|Lumen|Stomach|Metformin|Gastric retention distal",
"Organism|Lumen|Stomach|Metformin|Gastric retention proximal"
)
)
myCombDat$setGroups(
names = c(
"Organism|Lumen|Stomach|Metformin|Gastric retention",
"Organism|Lumen|Stomach|Metformin|Gastric retention distal",
"Organism|Lumen|Stomach|Metformin|Gastric retention proximal",
"Stevens_2012_placebo.Placebo_total",
"Stevens_2012_placebo.Placebo_distal",
"Stevens_2012_placebo.Placebo_proximal"
),
groups = c("Solid total", "Solid distal", "Solid proximal", "Solid total", "Solid distal", "Solid proximal")
)
plotObservedVsSimulated(myCombDat) Example-2 simFilePath <- system.file("extdata", "Aciclovir.pkml", package = "ospsuite")
sim <- loadSimulation(simFilePath)
simResults <- runSimulation(sim)
obsData <- lapply(
c("ObsDataAciclovir_1.pkml", "ObsDataAciclovir_2.pkml", "ObsDataAciclovir_3.pkml"),
function(x) loadDataSetFromPKML(system.file("extdata", x, package = "ospsuite"))
)
names(obsData) <- lapply(obsData, function(x) x$name)
outputPath <- "Organism|PeripheralVenousBlood|Aciclovir|Plasma (Peripheral Venous Blood)"
myDataCombined <- DataCombined$new()
# Add simulated results
myDataCombined$addSimulationResults(
simulationResults = simResults,
quantitiesOrPaths = outputPath,
groups = "Aciclovir PVB"
)
# Add observed data set
myDataCombined$addDataSets(obsData$`Vergin 1995.Iv`, groups = "Aciclovir PVB")
plotObservedVsSimulated(myDataCombined) |
…n-Systems-Pharmacology/OSPSuite-R into 982_profile_plot_imrovements
@PavelBal Builds passing now. Skipping a few tests on CI that won't pass until Open-Systems-Pharmacology/TLF-Library#367 is resolved. But since the PR has already grown to a monstrous size, there is no reason to postpone this until all issues are resolved. I will make a new PR once that issue is resolved. |
TODO:
plotIndividualTimeProfile
- multiple observed data within one group should get different symbols #980plotIndividualTimeProfile
multiple simulation results within one group are connected #982plotSimulatedVsObserved
y and x axis limits should be identical #1051plotObservedVsSimulated
wrong results #1052plotPopulationTimeProfile()
#1058plotPopulationTimeProfile
- upper quantile is not shown #1062plotPopulationTimeProfile
range color does not match line color if multiple results are assigned to the same group #1064DataCombined
and related plotting functions #1065{tlf}
changes