Function to run NM-TRAN on a model object to validate its control stream for correct coding before submission. The NM-TRAN dataset (FDATA) and other NONMEM artifacts can be further inspected by keeping the run directory around.

run_nmtran(
  .mod,
  .bbi_args = NULL,
  .config_path = NULL,
  run_dir = tempdir(),
  clean = TRUE
)

Arguments

.mod

A bbi_nonmem_model object.

.bbi_args

A named list specifying arguments to pass to NM-TRAN. Similar to the .bbi_args argument defined in submit_model(), though here only prdefault, tprdefault, and maxlim arguments are passed to NM-TRAN. nm_version is also supported and specifies which NM-TRAN executable to use. See print_bbi_args() for more details.

.config_path

Path to a bbi configuration file. If NULL, the default, will attempt to use a bbi.yaml in the same directory as the model.

run_dir

Directory to run NM-TRAN in. Only relevant if clean = FALSE.

clean

Logical (T/F). If FALSE, don't delete the temporary directory containing the NM-TRAN run.

Value

An S3 object of class nmtran_process

Details

NM-TRAN is a preprocessor for NONMEM that translates user-specified control stream data and instructions into a form executable by NONMEM.

Note that nmtran_presort is run ahead of NM-TRAN for NONMEM 7.4 and later

  • nmtran_presort is a supplementary utility that preprocesses the control stream to ensure it is in the correct format for NM-TRAN.

Examples

if (FALSE) {

mod <- read_model(file.path(MODEL_DIR, 1))
run_nmtran(mod, .bbi_args = list(nm_version = "nm74gf"))

# Save the run directory for manual inspection
run_nmtran(mod, clean = FALSE, run_dir = getwd())

}