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

plotPopulationTimeProfile: Error bars not shown #1059

Closed
PavelBal opened this issue Aug 2, 2022 · 1 comment · Fixed by #1054
Closed

plotPopulationTimeProfile: Error bars not shown #1059

PavelBal opened this issue Aug 2, 2022 · 1 comment · Fixed by #1054

Comments

@PavelBal
Copy link
Member

PavelBal commented Aug 2, 2022

simFilePath <- system.file("extdata", "Aciclovir.pkml", package = "ospsuite")
sim <- loadSimulation(simFilePath)

outputPaths <- c("Organism|PeripheralVenousBlood|Aciclovir|Plasma (Peripheral Venous Blood)",
                 "Organism|Muscle|Intracellular|Aciclovir|Concentration")

#simResults <- runSimulation(sim, population = pop)
simResults <- importResultsFromCSV(simulation = sim, filePaths = system.file("extdata", "SimResults_pop.csv", package = "ospsuite"))

obsData <- lapply(c("ObsDataAciclovir_1.pkml", "ObsDataAciclovir_2.pkml", "ObsDataAciclovir_3.pkml"),
                  \(x){loadDataSetFromPKML(system.file("extdata", x, package = "ospsuite"))})

names(obsData) <- lapply(obsData, \(x){x$name})

myDataCombined <- DataCombined$new()
# Add simulated results
myDataCombined$addSimulationResults(simulationResults = simResults,
                                    quantitiesOrPaths = outputPaths[[1]],
                                    groups = "Aciclovir PVB")

# Add observed data set
myDataCombined$addDataSets(obsData$`Vergin 1995.Iv`, groups = "Aciclovir PVB")

plotIndividualTimeProfile(myDataCombined)
plotPopulationTimeProfile(myDataCombined)

Individual:
image

Population:

image

@IndrajeetPatil
Copy link
Member

#1054 should fix this:

library(ospsuite)
#> Loading required package: rClr
#> Loading the dynamic library for Microsoft .NET runtime...
#> Loaded Common Language Runtime version 4.0.30319.42000

simFilePath <- system.file("extdata", "Aciclovir.pkml", package = "ospsuite")
sim <- loadSimulation(simFilePath)

outputPaths <- c("Organism|PeripheralVenousBlood|Aciclovir|Plasma (Peripheral Venous Blood)",
                 "Organism|Muscle|Intracellular|Aciclovir|Concentration")

simResults <- importResultsFromCSV(simulation = sim, filePaths = system.file("extdata", "SimResults_pop.csv", package = "ospsuite"))


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")

plotPopulationTimeProfile(myDataCombined)

Created on 2022-08-02 by the reprex package (v2.0.1.9000)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants