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

Molecules and metabolites get the same applications #2077

Open
pchelle opened this issue Aug 17, 2023 · 0 comments
Open

Molecules and metabolites get the same applications #2077

pchelle opened this issue Aug 17, 2023 · 0 comments
Labels

Comments

@pchelle
Copy link

pchelle commented Aug 17, 2023

Wanted to get confirmation whether the following behavior of the the method Simulation$allApplicationsFor() was intended.
When querying the applications for a compound and for its metabolites, the same applications are obtained while the metabolite is not actually applied.

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

simulation <- loadSimulation("Raltegravir 10 mg   (lactose formulation).pkml")

appliedMoleculeName <- simulation$allXenobioticFloatingMoleculeNames()

metaboliteNames <- setdiff(
  simulation$allStationaryMoleculeNames(), 
  simulation$allEndogenousStationaryMoleculeNames()
)

# Get application for molecule
applicationMolecule <- simulation$allApplicationsFor(appliedMoleculeName)
applicationMolecule
#> [[1]]
#> Application: 
#>    Start time: 0.00 [min] 
#>    DrugMass: 22.50 [µmol]

# Get application for metabolite
applicationMetabolite <- simulation$allApplicationsFor(metaboliteNames[1])
applicationMetabolite
#> [[1]]
#> Application: 
#>    Start time: 0.00 [min] 
#>    DrugMass: 22.50 [µmol]

# Applications are the same
applicationMolecule[[1]]$drugMass$path == applicationMetabolite[[1]]$drugMass$path
#> [1] TRUE

Created on 2023-08-17 by the reprex package (v2.0.1)

Also adding the zip of the example here:
issue_applications.zip

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

No branches or pull requests

2 participants