AMD - Drug metabolite#
Will develop the best drug metabolite model based on a model or dataset input.
Regarding the dataset, two DVIDs are required.
DVID |
Description |
---|---|
1 |
Assumed to be connected to the PK part of the model |
2 |
Assumed to be connected to the metabolite part of the model |
Running#
The code to initiate the AMD tool for a PK model:
from pharmpy.tools import run_amd
res = run_amd(input='path/to/dataset',
modeltype='drug_metabolite',
administration='iv',
cl_init=2.0,
vc_init=5.0,
strategy='default',
search_space='METABOLITE([BASIC,PSC]);PERIPHERALS(0..1,MET)',
allometric_variable='WGT',
occasion='VISI'
)
res <- run_amd(input='path/to/dataset',
modeltype='drug_metabolite',
administration='iv',
cl_init=2.0,
vc_init=5.0,
strategy='default',
search_space='METABOLITE([BASIC,PSC]);PERIPHERALS(0..1,MET)',
allometric_variable='WGT',
occasion='VISI'
)
Arguments#
The arguments used in drug metabolite models can be seen below. Some are mandatory for this type of model
building while others are optional, and some AMD arguments are not used for this model type. If any of the
mandatory arguments are missing, the model will not be run. The only exception being for mat_init
which is only mandatory
for ‘oral’ administration.
Mandatory#
Argument |
Description |
---|---|
|
Path to a dataset or start model object. See input in amd |
|
Set to ‘drug_metabolite’ for this model type. |
|
Initial estimate for the population clearance |
|
Initial estimate for the central compartment population volume |
|
Initial estimate for the mean absorption time (only for oral models) |
Note
In addition to these arguments, common arguments can be added.
Strategy components#
For a description about the different model building strategies in AMD, see Strategy. This section will cover the aspects that are specific to drug metabolite models.
Structural#
Structural covariates
The structural covariates are added directly to the starting model. If these cannot be added here (due to missing parameters for instance) they will be added at the start of the next covsearch run. Note that all structural covariates are added all at once without any test or search.
If no structural covariates are specified, no default is used.
Modelsearch
Note
This part of the AMD tool develops the PK model, meaning it will filter out the metabolite data points. The rest of AMD uses the full dataset.
The settings that the AMD tool uses for the modelsearch subtool can be seen in the table below.
Argument |
Setting |
---|---|
|
|
|
‘reduced_stepwise’ |
|
‘absorption_delay’ |
|
‘bic’ (type: mixed) |
|
None |
If no search space is given by the user, the default search space is dependent on the administration
argument
ABSORPTION([FO,ZO,SEQ-ZO-FO])
ELIMINATION(FO)
LAGTIME([OFF,ON])
TRANSITS([0,1,3,10],*)
PERIPHERALS([0,1])
ELIMINATION(FO)
PERIPHERALS([0,1,2])
ABSORPTION([FO,ZO,SEQ-ZO-FO])
ELIMINATION(FO)
LAGTIME([OFF,ON])
TRANSITS([0,1,3,10],*)
PERIPHERALS([0,1,2])
Structsearch
For a drug metabolite model, structsearch is run to determine the best structural model. All input arguments are specified by the user when initializing AMD.
Argument |
Setting |
---|---|
|
|
|
‘drug_metabolite’ |
|
strictness |
If no search space is given for the structsearch tool, then a default will be set to:
METABOLITE([BASIC])
PERIPHERALS([0,1], MET)
METABOLITE([PSC, BASIC])
PERIPHERALS([0,1], MET)
IIVSearch#
The settings that the AMD tool uses for this subtool can be seen in the table below.
Argument |
Setting |
Setting (rerun) |
---|---|---|
|
‘top_down_exhaustive’ |
‘top_down_exhaustive’ |
|
‘fullblock’ |
‘no_add’ |
|
‘mbic’ (type: iiv) |
‘mbic’ (type: iiv) |
|
None |
None |
|
Clearance parameters from input model |
Clearance parameters from input model |
Residual#
When running the residual part of the workflow, the tool is run twice. First, the best error model is found for DVID=1`
followed by the same run but for DVID=2
The settings used when running the tool can be found below. When re-running the tool, the settings remain the same.
Argument |
Setting |
---|---|
|
1 (first run) and 2 (second run) |
|
4 |
|
0.05 |
|
None |
IOVSearch#
The settings that the AMD tool uses for this subtool can be seen in the table below.
Argument |
Setting |
---|---|
|
|
|
None |
|
‘bic’ (type: random) |
|
None |
|
‘same-as-iiv’ |
Allometry#
The settings that the AMD tool uses for this subtool can be seen in the table below.
Argument |
Setting |
---|---|
|
|
|
70 |
|
None |
|
None |
|
None |
|
None |
|
None |
covsearch#
The settings that the AMD tool uses for this subtool can be seen in the table below.
Argument |
Setting |
---|---|
|
|
|
0.05 |
|
0.01 |
|
-1 |
|
‘scm-forward-then-backward’ |
If no search space for this tool is given, the following default will be used:
COVARIATE?(@IIV, @CONTINUOUS, exp, *)
COVARIATE?(@IIV, @CATEGORICAL, cat, *)
Here, both statements are defined with a ‘?’, meaning that these are covariate effect(s) to be explored rather than structural covariate effects, which are added during the earlier “structural” step.
Mechanisitic covariates
If any mechanistic covariates have been given as input to the AMD tool, the specified covariate effects for these covariates is run in a separate initial covsearch run when adding covariates. These covariate effects are extracted from the given search space
Exploratory covariates
The remaining covariate effects from the search space are now run in an exploratory search.
Examples#
Minimal#
A minimal example for running AMD with model type PK:
from pharmpy.tools import run_amd
dataset_path = 'path/to/dataset'
res = run_amd(
dataset_path,
modeltype="drug_metabolite",
administration="iv",
cl_init=2.0,
vc_init=5.0
)
dataset_path <- 'path/to/dataset'
res <- run_amd(
dataset_path,
modeltype="drug_metabolite",
administration="iv",
cl_init=2.0,
vc_init=5.0
)
Model input and search space#
Specifying input model and search space:
from pharmpy.tools import run_amd
start_model = read_model('path/to/model')
res = run_amd(
input=start_model,
modeltype='drug_metabolite',
search_space='ABSORPTION(FO);PERIPHERALS(1..2);METABOLITE(BASIC);PERIPHERALS(0..1,MET)',
cl_init=2.0,
vc_init=5.0,
mat_init=3.0
)
start_model <- read_model('path/to/model')
res <- run_amd(
input=start_model,
modeltype='drug_metabolite',
search_space='ABSORPTION(FO);PERIPHERALS(1..2);METABOLITE(BASIC);PERIPHERALS(0..1,MET)',
cl_init=2.0,
vc_init=5.0,
mat_init=3.0
)