Select Page

Running Monolix using the command line

Yes, it is possible to run Monolix using a simple command line:

monolixSuiteInstallationFolder/bin/Monolix.sh --no-gui  -p fullPathProjectName

(replace .sh into .bat for windows operating system)

Notice that the project name should be defined using a full path and not a relative path. The program options are:

  • --no-gui: run without opening a window, mandatory in no-desktop environments.
  • -p, --project: path to the project to run. It should be the absolute (not relative) path name of the project.
  • --thread, --number-of-threads: number of threads to use for the run (integer)
  • --mode, --console-mode: select the verbosity of the run information that will be log in console. It can be “none”, “basic” (default value), or “complete”.
  • --nosplash: no splash screen. Only used when opening with GUI. When the option –no-gui is used, nosplash option is not read.
  • -o, --output-dir: output directory
  • -t, --tool: tool to launch. It can be “monolix” (default value) or “modelBuilding”.
  • -s, --strategy: select the model building algorithm. It can be “cossac” (default value), “samba”, “covSamba” or “scm”.
  • -c, --stoppingCriterion: Select the stopping criterion of model building. It can be “bic” or “lrt” (default value).
  • -a, --LRTThresholdUp : p-value threshold for the LRT in backward (default 0.01)
  • -r, --LRTThresholdLower: p-value threshold for the LRT in forward (default 0.01 for cossac and 0.05 for scm)
  • --lin, --useLinearization: use linearization if possible. “true” (default value) or “false”.

Note that on windows the maximum number of arguments is 10. If more are needed, you can use the monolix.exe file in the /lib directory.

Examples

monolix.bat --no-gui --mode none --thread 4 -p "C:\Users\celliere\lixoft\monolix\monolix2021R1\demos\1.creating_and_using_models\1.1.libraries_of_models\theophylline_project.mlxtran"

monolix.bat --no-gui -t modelBuilding -s cossac -a 0.06 -r 0.001 --lin false -p "C:\Users\celliere\lixoft\monolix\monolix2021R1\demos\1.creating_and_using_models\1.1.libraries_of_models\theophylline_project.mlxtran"

monolix.bat --no-gui -t modelBuilding -s scm -c bic -p "C:\Users\celliere\lixoft\monolix\monolix2021R1\demos\1.creating_and_using_models\1.1.libraries_of_models\theophylline_project.mlxtran"

monolix.bat --no-gui -t modelBuilding -s covSamba -p "C:\Users\celliere\lixoft\monolix\monolix2021R1\demos\1.creating_and_using_models\1.1.libraries_of_models\theophylline_project.mlxtran"

Exporting charts data

If the plots task is selected in the Monolix scenario, and if “Export charts data” is selected in Monolix preferences,┬áthe charts data are saved in the result folder. Generating the interactive plots requires to open the project in the GUI. From the 2021 version on, the plots are also be generated as ggplot object using R functions from the lixoftConnectors R package.

Running the covariate search (model building) with additional options

From the 2021 version on, the settings of the model building are saved and reloaded. It is thus possible to do the following to run the model building (covariate search) with more custom settings than provided with the command line arguments, for instance regarding which parameter-covariate relationship to test:

  • with the GUI, setup the model building settings you need
  • launch the model building run and click on the “stop” button immediately. The model building setting are saved in the monolix result folder.
  • launch the model building in command line using:
    monolix.bat --no-gui -t modelBuilding -p yourProject

Note that the result folder of the monolix run needs to the present for the model building setting to load and be used by the run in command line.