Automated population pharmacokinetic model development in NONMEM
AutoPK (Automated population pharmacokinetic model development) was developed to increase the efficiency and reduce errors in the development of population pharmacokinetic models in NONMEM. It can create up to 27 different structural population models that can be executed on multiple cores, after which the model results and goodness of fit diagnostics will be automatically created.
AutoPK is able to include the following components:
- 1-, 2-, and 3-compartment models
- Intravenous or oral (depot) administration
- Linear and non-linear elimination kinetics
- Proportional, additive or combined residual error structures
Contact firstname.lastname@example.org to receive login information for academic research groups.
- Function to add variance on 1 parameter
Please report any bugs or problems with the software to (email@example.com).
AutoPK user guide
The main screen consists of 3 tabs:
- Dataset details
- Model selection
- Initial estimates
Click on the folder icon to locate your NONMEM dataset. The dataset headers will be copied to the $INPUT block in NONMEM. Therefore, make sure that correct NM compatible headers are used (e.g. not #ID).
Notes on the NONMEM dataset:
- The NONMEM dataset file name should not include spaces
- The ID, TIME, AMT and DV columns are mandatory for NONMEM to function
- If weight scaling is selected in the model selection screen, a weight column (using the header ‘WGT’) should be included in the dataset
- If administration is not via I.V., the addition of a CMT number in the dataset is needed (e.g. dosing in CMT 1, DV in CMT 2)
- Make sure the dose and concentrations are in the same units
The IGNORE statements inserted in the software will be directly copied to the model control stream. It is dependent on your dataset which IGNORE statements should be included. The default is IGNORE=I, for datasets starting with ‘ID’ in the first cell. Examples of other IGNORE statements:
The working directory needs to be specified. When the ‘Start modeling’ button is clicked, a new folder will be created in this directory consisting of all the specified models.
In this window, the user can select which models should be created and executed. It is wise to only select 1 model for the first run, to make sure the created model is being executed and there are no errors regarding the dataset. If there is an error, check the generated .lst file in the model folder for debugging.
All combinantions between the selected models will be generated.
Additional functions such as the inclusion of an A_0 parameter (estimate the initial amount of the drug in the central compartment at time point 0), the estimation of bioavailability, lag time, or scaling based on weight can be included in the structural model.
No ETA’s will be estimated in the structural population model, except for the A_0, since inter-individual differences in A_0 may bias the structural model selection. By clicking the ‘Add IIV’ checkbox, a dropdown menu will be visible to specify a single parameter on which variance can be included if this is preferred.
The models will be run using the initial estimates given in this tab. An approximation to be in the correct range of your initial estimates is usually sufficient for the models to run, depending on the model stability. Using multiple PsN functions (as will be discussed in the settings menu) can assist in the execution of the models by automatically tweaking the initial estimates (-tweak_inits).
In the settings menu, a preference for ADVAN routines can be selected (6, 9, 13). All models will be executed using the differential equations as defined in a $DES block. Other settings such as the Tolerance, NSIG and SIGL can be defined. For running multiple models in parallel, the number of cores can be selected.
The R location can be included in order to automatically create diagnostic plots (make sure that the ggplot2 package is installed in the selected R version for the script to function).
Furthermore, PsN functions can be included in order to, for example, clean the model folder after model execution (-clean=3), tweak the initial estimates or have multiple retries. This is especially helpful when the used initial estimates were resulting in boundary issues.
When the start modeling button is clicked, a new folder will be created in the working directory with all the newly generated model control streams. All models have the correct dataset name, headers, initial estimates, and $TABLE output, based on the input of the user. The user can select whether AutoPK should continue with model execution.
Models will be run on the number of cores previously specified after which the status screen will be updated on model completion of each model (MIN = minimization successful, COV = covariance step completed). The sumo function (from PsN) will be executed and creates an overview of the model results in each folder (e.g. Sumo_Result_Model2.csv).
After all models are finished, a Results.csv file will be created in the working directory. This lists all the executed models with their results. In each folder, the model output can be found to be used for further analysis.
Automatic diagnostics generation in R
Upon initial start-up of AutoPK, a diagnostic script will be created in the following folder: %user%\AppData\Roaming\Auto_popPK
If the R executable was specified in the settings menu and the ggplot2 package is installed, this script will be executed for each separate model, enabling the automatic generation of model diagnostics. The working directory for each separate model, the model name and the table output name were given as arguments to the script. This script can be specified by the user to generate additional graphs.
Any suggestions or typo’s? Contact me at firstname.lastname@example.org!