Documentation

43.20 Automation by chaining

Seven apps in a row connected by files, with the chaining features below

What you will learn

  • Which files carry results from one app to the next.
  • How Next step, Use an earlier run and Edit and run again work.
  • How automation stays under your control.

One result, the next input

Pharmacometrics is a chain, and the cost of a chain is the handover. The apps remove the cost of handover by making the output of one step the input of the next, in the formats the next step already reads.

The files that carry the work

From To What travels
DataGen QC, EDA, Models, Exposure Lab analysis.csv, the control stream, estimates, settings
QC Models, anywhere the corrected <stem>_qc.ctl
Prep Studio QC, EDA, everything the NONMEM-ready dataset and the $INPUT lines
autoinit fit initial estimates
screen fit best_model.ctl
fit cov, vpc, forest, sims, power .ext, .cov, .phi, .cor
cov fit draft_model.ctl
sims er _metrics.csv, one row per subject and simulation
generate sims, power control stream, estimates, dataset

Three ways to chain

Next step with these results. On a finished run, buttons prepare the following command with the inputs of the finished one, for example Fit to VPC, Forest plot or Covariates; Screen to Fit the recommended model; Covariates to Fit the final covariate model. In One and Super, the link carries the run identifier, so the target page fills itself.

Use an earlier run. In a form that needs a fitted model, choose an earlier run of yours instead of uploading files. Its control stream, dataset and estimate files are used. The file with the same stem as the control stream wins when several are present.

Edit and run again. A finished run reopens as a form with its own settings, so a variation is a change and a click, and the original stays in the list.

In every case, your own files always win over the earlier run's, and nothing starts by itself: the prepared run is reviewed before you press Run.

Replayable data builds

In Prep Studio the chain starts earlier. The recipe is the record of how raw files became the dataset, and the same recipe can be replayed on refreshed source files, so a new data cut does not mean starting again. A fingerprint of each source file shows when a source has changed.

report closes the chain. In One and Super its editor inserts figures and tables from earlier runs at the cursor, with their source line, and the result is a Word document, a PDF and a web page. With Oliver, a report can be written from the results of a conversation, with every number tied to its source file.

Assistants as automation

Maxson and Oliver automate the choosing as well as the carrying: they propose commands, run them with approval, read the digest of each result, correct a failed command twice at most, and propose the next step. With Run commands without asking the first command of a reply starts at once. Guide only is the reverse: the assistant shows commands but runs nothing.

Safe automation

Automation is only useful when it can be trusted. The suite keeps three guarantees:

  1. Visible: the exact command is always shown before and after a run.
  2. Bounded: the browser never sends a command, only data; the assistants may start only listed nlmx commands with allowed options, and one command at a time.
  3. Recorded: every run is a folder with settings, command, log, inputs and results, and every export is checksummed.

What it saves

The time a project loses is rarely in computation. It is in converting files, rebuilding a dataset after a data cut, remembering which run was which, and re-making figures. Chaining, recipes, tags, Compare and saved scripts target exactly those costs.

See the previous page, next page, and the chapter overview.