Drug metabolite#
Running#
The code to initiate structsearch for a drug metabolite model in Python/R is stated below:
from pharmpy.modeling import read_model
from pharmpy.tools read_modelfit_results, run_structsearch
start_model = read_model('path/to/model')
start_model_results = read_modelfit_results('path/to/model')
res = run_structsearch(type='drug_metabolite',
search_space="METABOLITE([BASIC,PSC]);PERIPHERALS(0..1,MET)",
model=start_model,
results=start_model_results)
from pharmpy$tools read_modelfit_results, run_structsearch
start_model <- read_model('path/to/model')
start_model_results <- read_modelfit_results('path/to/model')
res <- run_structsearch(type='drug_metabolite',
search_space="METABOLITE([BASIC,PSC]);PERIPHERALS(0..1,MET)",
model=start_model,
results=start_model_results)
Argument |
Description |
---|---|
|
Need to be set to ‘drug_metabolite’ (see type for more) |
|
Search space of models to test |
|
Start model |
|
|
|
Strictness criteria for model selection.
Default is |
Models#
Currently implemented drug metabolite models are:
Model type |
Description |
Basic metabolite |
Single metabolite compartment with parent -> metabolite conversion of 100%. |
Basic metabolite with peripheral compartment(s) |
Same as ‘Basic metabolite’ with one or more connected peripheral compartments. |
Presystemic drug metabolite (PSC) |
Presystemic metabolite compartment with parent -> metabolite conversion of 100%. |
Presystemic drug metabolite with peripheral compartment(s) |
Same as ‘PSC’ with one or more connected peripheral connected compartments. |
Structsearch workflow#
The graph below show how the drug metabolite models are built, with each of the two types of drug metabolite models (basic and pre-systemic) with and without added peripherals. For reasons explained above, one of the created candidate models will be chosen as the base model (shown by a square). The base model is chosen as one of the candidate models with the fewewst amount of peripheral compartments as possible, with “BASIC” being chosen over “PSC”. If the inputed model is a drug_metabolite model, this will be used as the base model instead.
Note
Peripheral compartments are added using the see exhaustive stepwise search algorithm.
Regarding DVID, DVID=1 is connected to the parent drug while DVID=2 is representing the metabolite.
The search space#
MFL support the following model features:
Category |
Options |
Description |
---|---|---|
METABOLITE |
|
Type of drug metabolite model to add. PSC is for presystemic |
PERIPHERALS |
|
Regular PERIPHERALS with second option set to MET |
A search space for testing both BASIC and PSC (presystemic) drug metabolite models with 0 or 1 peripheral compartments for the metabolite compartment would look like: .. code-block:
METABOLITE([BASIC,PSC]);PERIPHERALS(0..1,MET)
This can be combined with the search space for the modelsearch tool by simply adding the drug metabolite features to it. Please see the example below. Note that two peripherals statements are present, one for the drug and one for the metabolite.
ABSORPTION(FO);ELIMINATION(FO);PERIPHERALS(0,1);METABOLITE(PSC);PERIPHERAL(0..1,MET)
When running through AMD, if a search space is not specified, a default one will be taken based on the administration type.
If administration is oral or ivoral, the search space will be as follows:
METABOLITE([BASIC,PSC]);PERIPHERALS(0..1,MET)
But with an iv administration instead, the default search space becomes:
METABOLITE(BASIC);PERIPHERALS(0..1,MET)
Results#
The results object contains various summary tables which can be accessed in the results object, as well as files in .csv/.json format. The name of the selected best model (based on the input selection criteria) is also included.
Below is an example for a drug metabolite run.
res = run_structsearch(type='drug_metabolite',
search_space="METABOLITE([BASIC,PSC]);PERIPHERALS(0..1,MET)",
model=start_model,
results=start_model_results)
res <- run_structsearch(type='drug_metabolite',
search_space="METABOLITE([BASIC,PSC]);PERIPHERALS(0..1,MET)",
model=start_model,
results=start_model_results)
The summary_tool
table contains information such as which feature each model candidate has, the difference to the
start model (in this case comparing BIC), and final ranking:
description | n_params | d_params | dbic | bic | rank | parent_model | |
---|---|---|---|---|---|---|---|
model | |||||||
structsearch_run1 | METABOLITE_BASIC;PERIPHERALS(0) | 8 | 0 | 0.0 | 29.305346 | 1.0 | structsearch_run1 |
structsearch_run2 | METABOLITE_PSC;PERIPHERALS(0) | 10 | 2 | NaN | NaN | NaN | structsearch_run1 |
structsearch_run3 | METABOLITE_BASIC;PERIPHERALS(0);PERIPHERALS(1) | 10 | 2 | NaN | NaN | NaN | structsearch_run1 |
structsearch_run4 | METABOLITE_PSC;PERIPHERALS(0);PERIPHERALS(1) | 12 | 2 | NaN | NaN | NaN | structsearch_run2 |