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)
Note
The tool expect the model to have a dataset with two DVIDs. DVID=1 connected to the parent drug and DVID=2 which is representing the metabolite.
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. |
Note
Drug metabolite models created outside of pharmpy currently require the metabolite compartment to be named ‘METABOLITE’ in order to function properly.
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)
Structsearch workflow#
The given input model can either be a drug metabolite model or a pk model.
Note
With a drug metabolite model as input, only PERIPHERALS are supported in the search space.
The graph below shows how the drug metabolite models are built, with each of the two types of basic and pre-systemic, with and without added peripherals. If the given input model is a drug metabolite model, this will be used as the base model. If not, the base model is chosen as the candidate models with the fewest amount of peripheral compartments as possible, with “BASIC” being chosen over “PSC”.
Note
Peripheral compartments are added using the exhaustive stepwise search algorithm.
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 |