diff --git a/cmd/clean.go b/cmd/clean.go index 68ae963a..ff32ea68 100644 --- a/cmd/clean.go +++ b/cmd/clean.go @@ -152,36 +152,30 @@ func getMatches(s []string, expr string, regex bool) ([]string, error) { func NewCleanCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "clean", - Short: "clean files and folders", - Long: ` -glob examples: -bbi clean *.mod // anything with extension .mod -bbi clean *.mod --noFolders // anything with extension .mod -bbi clean run* // anything starting with run -regular expression examples: - -bbi clean ^run --regex // anything beginning with the letters run -bbi clean ^run -v --regex // print out files and folders that will be deleted -bbi clean ^run --filesOnly --regex // only remove matching files -bbi clean _est_ --dirsOnly --regex // only remove matching folders -bbi clean _est_ --dirsOnly --preview --regex // show what output would be if clean occured but don't actually clean -bbi clean "run009.[^mod]" --regex // all matching run009. but not .mod files -bbi clean "run009.(mod|lst)$" --regex // match run009.lst and run009.mod - -can also clean via the opposite of a match with inverse - -bbi clean ".modt{0,1}$" --filesOnly --inverse --regex // clean all files not matching .mod or .modt - -clean copied files via - -bbi clean --copiedRuns="run001" -bbi clean --copiedRuns="run[001:010]" - -can be a comma separated list as well - -bbi clean --copiedRuns="run[001:010],run100" - `, + Use: "clean [flags] [...]", + Short: "Clean files and folders", + Long: `Clean the files and directories that match the specified patterns. +Whether the pattern is interpreted as a glob or regex is controlled by the +--regex flag. + +If files were copied to the parent directory automatically after model +execution (via the copy_lvl configuration), the original files in the run +directory can be cleaned up by selecting the run with the --copiedRuns +option.`, + Example: ` # Remove items in the current directory that end with ".mod" + bbi nonmem clean *.mod + # The same as above but ensure only files are removed + bbi nonmem clean --filesOnly *.mod + + # Remove files in the current directory that start with "run" and end with + # ".mod" or ".lst" + bbi nonmem clean --filesOnly --regex "run.*\.(mod|lst)$" + # Report what the above would remove but don't actually do it + bbi nonmem clean --preview --filesOnly --regex "run.*\.(mod|lst)$" + + # Remove copied files (recorded in '{run}_copied.json' by 'bbi run') for + # run001, run002, run003, and run100 + bbi nonmem clean --copiedRuns='run[001:003],run100'`, RunE: clean, } diff --git a/cmd/covcor.go b/cmd/covcor.go index 3dfa3d58..26a9e40c 100644 --- a/cmd/covcor.go +++ b/cmd/covcor.go @@ -24,10 +24,10 @@ import ( "github.com/spf13/viper" ) -const covcorLongDescription string = `load .cov and .cor output from model(s), for example: -bbi nonmem covcor run001/run001 -bbi nonmem covcor run001/run001.cov - ` +const covcorExamples string = ` # Display .cov/cor values from run001/run001.{cov,cor} + bbi nonmem covcor run001/run001 + # Display the same values by specifying a full output file + bbi nonmem covcor run001/run001.cov` func covcor(cmd *cobra.Command, args []string) { if debug { @@ -47,9 +47,13 @@ func covcor(cmd *cobra.Command, args []string) { func NewCovcorCmd() *cobra.Command { return &cobra.Command{ - Use: "covcor", - Short: "load .cov and .cor output from a model run", - Long: covcorLongDescription, - Run: covcor, + Use: "covcor [flags] ", + Short: "Display .cov and .cor output for a model", + Long: `Read the .cov and .cor files from a model's output directory and +display the values as a JSON object. The argument is typically a shared prefix +for the run output files, but it can be any path from which the run name can be +derived.`, + Example: covcorExamples, + Run: covcor, } } diff --git a/cmd/init.go b/cmd/init.go index e3558234..0df7b28c 100644 --- a/cmd/init.go +++ b/cmd/init.go @@ -55,8 +55,13 @@ func NewInitCmd() *cobra.Command { cmd := &cobra.Command{ Use: "init", Short: "Create configuration file with defaults", - Long: `Run bbi init to create a bbi.yaml configuration file in the current directory. - `, + Long: `Write a bbi.yaml configuration file in the current directory +to initialize it for running bbi. + +If the --dir=DIR option is specified, DIR should point to a directory that +contains one or more NONMEM installations directories. Any subdirectory in +DIR is taken as an installation if it has the expected layout (e.g., a "run" +directory with an nmfe executable)`, RunE: initializer, } diff --git a/cmd/local.go b/cmd/local.go index 66f8cf73..851bac2d 100644 --- a/cmd/local.go +++ b/cmd/local.go @@ -347,10 +347,10 @@ func (l LocalModel) Cleanup(channels *turnstile.ChannelMap) { func NewLocalCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "local", - Short: "local specifies to run a (set of) models locally", - Long: runLongDescription, - Run: local, + Use: "local [flags] [...]", + Short: "Run models locally", + Example: fmt.Sprintf(runExamples, "local"), + Run: local, } childDirIdentifier := "create_child_dirs" diff --git a/cmd/nonmem.go b/cmd/nonmem.go index 8696356d..08f27bf8 100644 --- a/cmd/nonmem.go +++ b/cmd/nonmem.go @@ -164,18 +164,20 @@ type NonMemModel struct { Error error `json:"error"` } -var nonmemLongDescription string = fmt.Sprintf("\n%s\n\n%s\n\n%s\n", runLongDescription, summaryLongDescription, covcorLongDescription) +var nonmemExamples string = fmt.Sprintf("%s\n\n%s\n\n%s\n", + fmt.Sprintf(runExamples, "(local|sge)"), + summaryExamples, + covcorExamples) func nonmem(_ *cobra.Command, _ []string) { - println(nonmemLongDescription) + println(nonmemExamples) } func NewNonmemCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "nonmem", - Short: "nonmem a (set of) models locally or on the grid", - Long: nonmemLongDescription, - Run: nonmem, + Use: "nonmem", + Short: "Entry point for NONMEM-related subcommands", + Example: nonmemExamples, } // NM Selector diff --git a/cmd/params.go b/cmd/params.go index 456c4f08..d46ecf26 100644 --- a/cmd/params.go +++ b/cmd/params.go @@ -31,11 +31,12 @@ import ( "github.com/spf13/viper" ) -const paramsLongDescription string = `summarize model(s), for example: -bbi nonmem params run001 -bbi nonmem params run001 -bbi nonmem params run001 - ` +const paramsExamples string = ` # Display table of parameters for run001 + bbi nonmem params run001 + # Display table of parameters for all model runs the current directory + bbi nonmem params --dir=. + # Print JSON output instead of a table + bbi nonmem params --json --dir=.` var ( noParamNames bool @@ -416,10 +417,14 @@ func params(cmd *cobra.Command, args []string) { func NewParamsCmd() *cobra.Command { var cmd = &cobra.Command{ - Use: "params", - Short: "get the parameters of model(s)", - Long: paramsLongDescription, - Run: params, + Use: "params [flags] []", + Short: "Extract the parameter estimates of models", + Long: `Display the parameter values from completed models. If a directory is +specified via --dir, get the parameters of all model runs found in that +directory. Otherwise the positional argument should specify a run directory +to extract parameters from.`, + Example: paramsExamples, + Run: params, } //Used for Summary diff --git a/cmd/project.go b/cmd/project.go index 30740817..fbbccb92 100644 --- a/cmd/project.go +++ b/cmd/project.go @@ -85,11 +85,20 @@ func probs(_ *cobra.Command, args []string) error { } func NewProbsCmd() *cobra.Command { return &cobra.Command{ - Use: "probs", - Short: "summarize information about project", - Long: `get information about models in the project: -nmu project - `, + Use: "probs [flags] []", + Short: "Summarize model definitions in a directory", + Long: `This subcommand extracts information from the *.mod files in the +current directory or the specified directory. By default, it displays a +table with the $PROBLEM text for each model file. If --json is passed, it +prints JSON output with more details about each model (e.g., which +estimation methods are present). + +Note: Only model files with a *.mod extension are currently supported.`, + Example: `# Output a table summarizing the $PROBLEM text for the *.mod files +# in the current directory +bbi nonmem probs +# Instead of the table, show JSON output with more details +bbi nonmem probs --json`, RunE: probs, } } diff --git a/cmd/reclean.go b/cmd/reclean.go index c7521fe4..bf8821ad 100644 --- a/cmd/reclean.go +++ b/cmd/reclean.go @@ -43,11 +43,12 @@ func reclean(cmd *cobra.Command, args []string) error { func NewRecleanCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "reclean [flags] ", - Short: "clean files in an estimation directory by clean level", - Long: ` - bbi reclean run001_est_01 - `, + Use: "reclean [flags] ", + Short: "Clean files in run directory by specified level", + Example: ` bbi nonmem run local --clean_lvl=0 001.ctl + # Reclean the run directory for 001, deleting what would have been cleaned if + # the model was executed with a clean level of 1 + bbi nonmem reclean --recleanLvl=1 001`, RunE: reclean, } diff --git a/cmd/root.go b/cmd/root.go index eea25a51..cff85941 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -67,7 +67,7 @@ func Execute(build string) { func NewRootCmd() *cobra.Command { cmd := &cobra.Command{ Use: "bbi", - Short: "manage and execute models", + Short: "Manage and execute models", Long: fmt.Sprintf("bbi CLI version %s", VERSION), } diff --git a/cmd/run.go b/cmd/run.go index 3f8b1f14..3d9d3947 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -3,6 +3,7 @@ package cmd import ( "bytes" "errors" + "fmt" "os" "os/exec" "path/filepath" @@ -17,12 +18,12 @@ import ( "github.com/spf13/viper" ) -const runLongDescription string = `run nonmem model(s), for example: -bbi nonmem run run001.mod -bbi nonmem run --clean_lvl=1 run001.mod run002.mod -bbi nonmem run run[001:006].mod // expand to run001.mod run002.mod ... run006.mod local -bbi nonmem run .// run all models in directory - ` +const runExamples string = ` # Execute model run001 + bbi nonmem run %[1]s run001.mod + # Run models run001.mod, run002.mod, and run003.mod + bbi nonmem run %[1]s 'run[001:003].mod' + # Run all models in the current directory + bbi nonmem run %[1]s .` const postProcessingScriptTemplate string = `#!/bin/bash @@ -54,15 +55,16 @@ const postProcessingScriptTemplate string = `#!/bin/bash ` func run(_ *cobra.Command, _ []string) { - println(runLongDescription) + println(fmt.Sprintf(runExamples, "(local|sge)")) } func NewRunCmd() *cobra.Command { cmd := &cobra.Command{ Use: "run", - Short: "run a (set of) models locally or on the grid", - Long: runLongDescription, - Run: run, + Short: "Run models locally or on the grid", + Long: `This is the entry point to subcommands for running NONMEM models. Each +subcommand represents a different "mode" of execution (e.g., local).`, + Example: fmt.Sprintf(runExamples, "(local|sge)"), } // String Variables diff --git a/cmd/scaffold.go b/cmd/scaffold.go index 97879c53..356e6f4b 100644 --- a/cmd/scaffold.go +++ b/cmd/scaffold.go @@ -72,12 +72,10 @@ func scaffold(cmd *cobra.Command, args []string) error { func NewScaffoldCmd() *cobra.Command { cmd := &cobra.Command{ Use: "scaffold", - Short: "scaffold directory structures", - Long: ` - nmu scaffold --cacheDir=nmcache - - nmu scaffold --cacheDir=../nmcache --preview // show where the cache dir would be created - `, + Short: "Scaffold directory structures", + Long: `This subcommand writes a .gitignore file to the directory specified by +--cacheDir that tells Git to ignore all files in the directory except for the +.gitignore file itself.`, RunE: scaffold, } diff --git a/cmd/sge.go b/cmd/sge.go index 9ac1b9af..bb3a7e09 100644 --- a/cmd/sge.go +++ b/cmd/sge.go @@ -163,10 +163,10 @@ func errpanic(err error) { func NewSgeCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "sge", - Short: "sge specifies to run a (set of) models on the Sun Grid Engine", - Long: runLongDescription, - Run: sge, + Use: "sge [flags] [...]", + Short: "Run models on the Sun Grid Engine", + Example: fmt.Sprintf(runExamples, "sge"), + Run: sge, } //String Variables diff --git a/cmd/summary.go b/cmd/summary.go index e46df2b5..68ae1c4a 100644 --- a/cmd/summary.go +++ b/cmd/summary.go @@ -37,12 +37,12 @@ var ( extFile string ) -const summaryLongDescription string = `summarize model(s), for example: -bbi nonmem summary run001/run001 -bbi nonmem summary run001/run001.lst -bbi nonmem summary run001/run001.res -bbi nonmem summary run001/run001 run002/run002 - ` +const summaryExamples string = ` # Summarize run001 + bbi nonmem summary run001/run001.lst + # The extension may be omitted + bbi nonmem summary run001/run001 + # Output JSON summary for run001 and run002 + bbi nonmem summary --json run001/run001 run002/run002` type jsonResults struct { Results []parser.SummaryOutput @@ -174,10 +174,17 @@ func summary(_ *cobra.Command, args []string) { func NewSummaryCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "summary", - Short: "summarize the output of model(s)", - Long: summaryLongDescription, - Run: summary, + Use: "summary [flags] [...]", + Short: "Summarize model results", + Long: `Summarize the results of the specified *.lst files. By default, this +prints a table of parameter estimates preceded by a lines with details about +the run. Pass the --json flag to get a machine-readable output that includes +more details. + +The path may also be specified without the trailing ".lst". *.res files are +also supported.`, + Example: summaryExamples, + Run: summary, } // Used for Summary diff --git a/cmd/version.go b/cmd/version.go index 0ae8eeb5..d6b16dc0 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -24,11 +24,8 @@ import ( func NewVersionCmd() *cobra.Command { return &cobra.Command{ Use: "version", - Short: "check version", - Long: `check the current bbi version -bbi version - `, - Run: version, + Short: "Print bbi's version and exit", + Run: version, } } diff --git a/docs/commands/bbi.md b/docs/commands/bbi.md index 3a486b11..dbefa6e1 100644 --- a/docs/commands/bbi.md +++ b/docs/commands/bbi.md @@ -1,6 +1,6 @@ ## bbi -manage and execute models +Manage and execute models ### Options @@ -17,6 +17,6 @@ manage and execute models ### SEE ALSO * [bbi init](bbi_init.md) - Create configuration file with defaults -* [bbi nonmem](bbi_nonmem.md) - nonmem a (set of) models locally or on the grid -* [bbi version](bbi_version.md) - check version +* [bbi nonmem](bbi_nonmem.md) - Entry point for NONMEM-related subcommands +* [bbi version](bbi_version.md) - Print bbi's version and exit diff --git a/docs/commands/bbi_init.md b/docs/commands/bbi_init.md index 2d42c01e..bfe79b00 100644 --- a/docs/commands/bbi_init.md +++ b/docs/commands/bbi_init.md @@ -4,8 +4,13 @@ Create configuration file with defaults ### Synopsis -Run bbi init to create a bbi.yaml configuration file in the current directory. - +Write a bbi.yaml configuration file in the current directory +to initialize it for running bbi. + +If the --dir=DIR option is specified, DIR should point to a directory that +contains one or more NONMEM installations directories. Any subdirectory in +DIR is taken as an installation if it has the expected layout (e.g., a "run" +directory with an nmfe executable) ``` bbi init [flags] @@ -31,5 +36,5 @@ bbi init [flags] ### SEE ALSO -* [bbi](bbi.md) - manage and execute models +* [bbi](bbi.md) - Manage and execute models diff --git a/docs/commands/bbi_nonmem.md b/docs/commands/bbi_nonmem.md index dbab9932..e08dd460 100644 --- a/docs/commands/bbi_nonmem.md +++ b/docs/commands/bbi_nonmem.md @@ -1,32 +1,29 @@ ## bbi nonmem -nonmem a (set of) models locally or on the grid +Entry point for NONMEM-related subcommands -### Synopsis +### Examples +``` + # Execute model run001 + bbi nonmem run (local|sge) run001.mod + # Run models run001.mod, run002.mod, and run003.mod + bbi nonmem run (local|sge) 'run[001:003].mod' + # Run all models in the current directory + bbi nonmem run (local|sge) . -run nonmem model(s), for example: -bbi nonmem run run001.mod -bbi nonmem run --clean_lvl=1 run001.mod run002.mod -bbi nonmem run run[001:006].mod // expand to run001.mod run002.mod ... run006.mod local -bbi nonmem run .// run all models in directory - - -summarize model(s), for example: -bbi nonmem summary run001/run001 -bbi nonmem summary run001/run001.lst -bbi nonmem summary run001/run001.res -bbi nonmem summary run001/run001 run002/run002 - - -load .cov and .cor output from model(s), for example: -bbi nonmem covcor run001/run001 -bbi nonmem covcor run001/run001.cov - + # Summarize run001 + bbi nonmem summary run001/run001.lst + # The extension may be omitted + bbi nonmem summary run001/run001 + # Output JSON summary for run001 and run002 + bbi nonmem summary --json run001/run001 run002/run002 + # Display .cov/cor values from run001/run001.{cov,cor} + bbi nonmem covcor run001/run001 + # Display the same values by specifying a full output file + bbi nonmem covcor run001/run001.cov -``` -bbi nonmem [flags] ``` ### Options @@ -62,13 +59,13 @@ bbi nonmem [flags] ### SEE ALSO -* [bbi](bbi.md) - manage and execute models -* [bbi nonmem clean](bbi_nonmem_clean.md) - clean files and folders -* [bbi nonmem covcor](bbi_nonmem_covcor.md) - load .cov and .cor output from a model run -* [bbi nonmem params](bbi_nonmem_params.md) - get the parameters of model(s) -* [bbi nonmem probs](bbi_nonmem_probs.md) - summarize information about project -* [bbi nonmem reclean](bbi_nonmem_reclean.md) - clean files in an estimation directory by clean level -* [bbi nonmem run](bbi_nonmem_run.md) - run a (set of) models locally or on the grid -* [bbi nonmem scaffold](bbi_nonmem_scaffold.md) - scaffold directory structures -* [bbi nonmem summary](bbi_nonmem_summary.md) - summarize the output of model(s) +* [bbi](bbi.md) - Manage and execute models +* [bbi nonmem clean](bbi_nonmem_clean.md) - Clean files and folders +* [bbi nonmem covcor](bbi_nonmem_covcor.md) - Display .cov and .cor output for a model +* [bbi nonmem params](bbi_nonmem_params.md) - Extract the parameter estimates of models +* [bbi nonmem probs](bbi_nonmem_probs.md) - Summarize model definitions in a directory +* [bbi nonmem reclean](bbi_nonmem_reclean.md) - Clean files in run directory by specified level +* [bbi nonmem run](bbi_nonmem_run.md) - Run models locally or on the grid +* [bbi nonmem scaffold](bbi_nonmem_scaffold.md) - Scaffold directory structures +* [bbi nonmem summary](bbi_nonmem_summary.md) - Summarize model results diff --git a/docs/commands/bbi_nonmem_clean.md b/docs/commands/bbi_nonmem_clean.md index f17cbaed..c7f26f5f 100644 --- a/docs/commands/bbi_nonmem_clean.md +++ b/docs/commands/bbi_nonmem_clean.md @@ -1,40 +1,39 @@ ## bbi nonmem clean -clean files and folders +Clean files and folders ### Synopsis +Clean the files and directories that match the specified patterns. +Whether the pattern is interpreted as a glob or regex is controlled by the +--regex flag. -glob examples: -bbi clean *.mod // anything with extension .mod -bbi clean *.mod --noFolders // anything with extension .mod -bbi clean run* // anything starting with run -regular expression examples: +If files were copied to the parent directory automatically after model +execution (via the copy_lvl configuration), the original files in the run +directory can be cleaned up by selecting the run with the --copiedRuns +option. -bbi clean ^run --regex // anything beginning with the letters run -bbi clean ^run -v --regex // print out files and folders that will be deleted -bbi clean ^run --filesOnly --regex // only remove matching files -bbi clean _est_ --dirsOnly --regex // only remove matching folders -bbi clean _est_ --dirsOnly --preview --regex // show what output would be if clean occured but don't actually clean -bbi clean "run009.[^mod]" --regex // all matching run009. but not .mod files -bbi clean "run009.(mod|lst)$" --regex // match run009.lst and run009.mod - -can also clean via the opposite of a match with inverse - -bbi clean ".modt{0,1}$" --filesOnly --inverse --regex // clean all files not matching .mod or .modt - -clean copied files via - -bbi clean --copiedRuns="run001" -bbi clean --copiedRuns="run[001:010]" - -can be a comma separated list as well +``` +bbi nonmem clean [flags] [...] +``` -bbi clean --copiedRuns="run[001:010],run100" - +### Examples ``` -bbi nonmem clean [flags] + # Remove items in the current directory that end with ".mod" + bbi nonmem clean *.mod + # The same as above but ensure only files are removed + bbi nonmem clean --filesOnly *.mod + + # Remove files in the current directory that start with "run" and end with + # ".mod" or ".lst" + bbi nonmem clean --filesOnly --regex "run.*\.(mod|lst)$" + # Report what the above would remove but don't actually do it + bbi nonmem clean --preview --filesOnly --regex "run.*\.(mod|lst)$" + + # Remove copied files (recorded in '{run}_copied.json' by 'bbi run') for + # run001, run002, run003, and run100 + bbi nonmem clean --copiedRuns='run[001:003],run100' ``` ### Options @@ -75,5 +74,5 @@ bbi nonmem clean [flags] ### SEE ALSO -* [bbi nonmem](bbi_nonmem.md) - nonmem a (set of) models locally or on the grid +* [bbi nonmem](bbi_nonmem.md) - Entry point for NONMEM-related subcommands diff --git a/docs/commands/bbi_nonmem_covcor.md b/docs/commands/bbi_nonmem_covcor.md index b8086e9f..8622a578 100644 --- a/docs/commands/bbi_nonmem_covcor.md +++ b/docs/commands/bbi_nonmem_covcor.md @@ -1,16 +1,25 @@ ## bbi nonmem covcor -load .cov and .cor output from a model run +Display .cov and .cor output for a model ### Synopsis -load .cov and .cor output from model(s), for example: -bbi nonmem covcor run001/run001 -bbi nonmem covcor run001/run001.cov - +Read the .cov and .cor files from a model's output directory and +display the values as a JSON object. The argument is typically a shared prefix +for the run output files, but it can be any path from which the run name can be +derived. ``` -bbi nonmem covcor [flags] +bbi nonmem covcor [flags] +``` + +### Examples + +``` + # Display .cov/cor values from run001/run001.{cov,cor} + bbi nonmem covcor run001/run001 + # Display the same values by specifying a full output file + bbi nonmem covcor run001/run001.cov ``` ### Options @@ -46,5 +55,5 @@ bbi nonmem covcor [flags] ### SEE ALSO -* [bbi nonmem](bbi_nonmem.md) - nonmem a (set of) models locally or on the grid +* [bbi nonmem](bbi_nonmem.md) - Entry point for NONMEM-related subcommands diff --git a/docs/commands/bbi_nonmem_params.md b/docs/commands/bbi_nonmem_params.md index 223af726..161a370f 100644 --- a/docs/commands/bbi_nonmem_params.md +++ b/docs/commands/bbi_nonmem_params.md @@ -1,17 +1,27 @@ ## bbi nonmem params -get the parameters of model(s) +Extract the parameter estimates of models ### Synopsis -summarize model(s), for example: -bbi nonmem params run001 -bbi nonmem params run001 -bbi nonmem params run001 - +Display the parameter values from completed models. If a directory is +specified via --dir, get the parameters of all model runs found in that +directory. Otherwise the positional argument should specify a run directory +to extract parameters from. ``` -bbi nonmem params [flags] +bbi nonmem params [flags] [] +``` + +### Examples + +``` + # Display table of parameters for run001 + bbi nonmem params run001 + # Display table of parameters for all model runs the current directory + bbi nonmem params --dir=. + # Print JSON output instead of a table + bbi nonmem params --json --dir=. ``` ### Options @@ -50,5 +60,5 @@ bbi nonmem params [flags] ### SEE ALSO -* [bbi nonmem](bbi_nonmem.md) - nonmem a (set of) models locally or on the grid +* [bbi nonmem](bbi_nonmem.md) - Entry point for NONMEM-related subcommands diff --git a/docs/commands/bbi_nonmem_probs.md b/docs/commands/bbi_nonmem_probs.md index 99b98b18..4592a90a 100644 --- a/docs/commands/bbi_nonmem_probs.md +++ b/docs/commands/bbi_nonmem_probs.md @@ -1,15 +1,29 @@ ## bbi nonmem probs -summarize information about project +Summarize model definitions in a directory ### Synopsis -get information about models in the project: -nmu project - +This subcommand extracts information from the *.mod files in the +current directory or the specified directory. By default, it displays a +table with the $PROBLEM text for each model file. If --json is passed, it +prints JSON output with more details about each model (e.g., which +estimation methods are present). + +Note: Only model files with a *.mod extension are currently supported. + +``` +bbi nonmem probs [flags] [] +``` + +### Examples ``` -bbi nonmem probs [flags] +# Output a table summarizing the $PROBLEM text for the *.mod files +# in the current directory +bbi nonmem probs +# Instead of the table, show JSON output with more details +bbi nonmem probs --json ``` ### Options @@ -45,5 +59,5 @@ bbi nonmem probs [flags] ### SEE ALSO -* [bbi nonmem](bbi_nonmem.md) - nonmem a (set of) models locally or on the grid +* [bbi nonmem](bbi_nonmem.md) - Entry point for NONMEM-related subcommands diff --git a/docs/commands/bbi_nonmem_reclean.md b/docs/commands/bbi_nonmem_reclean.md index 1e3acb74..b7b9915c 100644 --- a/docs/commands/bbi_nonmem_reclean.md +++ b/docs/commands/bbi_nonmem_reclean.md @@ -1,15 +1,18 @@ ## bbi nonmem reclean -clean files in an estimation directory by clean level - -### Synopsis +Clean files in run directory by specified level +``` +bbi nonmem reclean [flags] +``` - bbi reclean run001_est_01 - +### Examples ``` -bbi nonmem reclean [flags] + bbi nonmem run local --clean_lvl=0 001.ctl + # Reclean the run directory for 001, deleting what would have been cleaned if + # the model was executed with a clean level of 1 + bbi nonmem reclean --recleanLvl=1 001 ``` ### Options @@ -46,5 +49,5 @@ bbi nonmem reclean [flags] ### SEE ALSO -* [bbi nonmem](bbi_nonmem.md) - nonmem a (set of) models locally or on the grid +* [bbi nonmem](bbi_nonmem.md) - Entry point for NONMEM-related subcommands diff --git a/docs/commands/bbi_nonmem_run.md b/docs/commands/bbi_nonmem_run.md index ce7c69f6..c3cf9e4b 100644 --- a/docs/commands/bbi_nonmem_run.md +++ b/docs/commands/bbi_nonmem_run.md @@ -1,18 +1,21 @@ ## bbi nonmem run -run a (set of) models locally or on the grid +Run models locally or on the grid ### Synopsis -run nonmem model(s), for example: -bbi nonmem run run001.mod -bbi nonmem run --clean_lvl=1 run001.mod run002.mod -bbi nonmem run run[001:006].mod // expand to run001.mod run002.mod ... run006.mod local -bbi nonmem run .// run all models in directory - +This is the entry point to subcommands for running NONMEM models. Each +subcommand represents a different "mode" of execution (e.g., local). + +### Examples ``` -bbi nonmem run [flags] + # Execute model run001 + bbi nonmem run (local|sge) run001.mod + # Run models run001.mod, run002.mod, and run003.mod + bbi nonmem run (local|sge) 'run[001:003].mod' + # Run all models in the current directory + bbi nonmem run (local|sge) . ``` ### Options @@ -59,7 +62,7 @@ bbi nonmem run [flags] ### SEE ALSO -* [bbi nonmem](bbi_nonmem.md) - nonmem a (set of) models locally or on the grid -* [bbi nonmem run local](bbi_nonmem_run_local.md) - local specifies to run a (set of) models locally -* [bbi nonmem run sge](bbi_nonmem_run_sge.md) - sge specifies to run a (set of) models on the Sun Grid Engine +* [bbi nonmem](bbi_nonmem.md) - Entry point for NONMEM-related subcommands +* [bbi nonmem run local](bbi_nonmem_run_local.md) - Run models locally +* [bbi nonmem run sge](bbi_nonmem_run_sge.md) - Run models on the Sun Grid Engine diff --git a/docs/commands/bbi_nonmem_run_local.md b/docs/commands/bbi_nonmem_run_local.md index 3605b66c..db7f5e3e 100644 --- a/docs/commands/bbi_nonmem_run_local.md +++ b/docs/commands/bbi_nonmem_run_local.md @@ -1,18 +1,20 @@ ## bbi nonmem run local -local specifies to run a (set of) models locally +Run models locally -### Synopsis +``` +bbi nonmem run local [flags] [...] +``` -run nonmem model(s), for example: -bbi nonmem run run001.mod -bbi nonmem run --clean_lvl=1 run001.mod run002.mod -bbi nonmem run run[001:006].mod // expand to run001.mod run002.mod ... run006.mod local -bbi nonmem run .// run all models in directory - +### Examples ``` -bbi nonmem run local [flags] + # Execute model run001 + bbi nonmem run local run001.mod + # Run models run001.mod, run002.mod, and run003.mod + bbi nonmem run local 'run[001:003].mod' + # Run all models in the current directory + bbi nonmem run local . ``` ### Options @@ -60,5 +62,5 @@ bbi nonmem run local [flags] ### SEE ALSO -* [bbi nonmem run](bbi_nonmem_run.md) - run a (set of) models locally or on the grid +* [bbi nonmem run](bbi_nonmem_run.md) - Run models locally or on the grid diff --git a/docs/commands/bbi_nonmem_run_sge.md b/docs/commands/bbi_nonmem_run_sge.md index d7e2b9c7..1887d47b 100644 --- a/docs/commands/bbi_nonmem_run_sge.md +++ b/docs/commands/bbi_nonmem_run_sge.md @@ -1,18 +1,20 @@ ## bbi nonmem run sge -sge specifies to run a (set of) models on the Sun Grid Engine +Run models on the Sun Grid Engine -### Synopsis +``` +bbi nonmem run sge [flags] [...] +``` -run nonmem model(s), for example: -bbi nonmem run run001.mod -bbi nonmem run --clean_lvl=1 run001.mod run002.mod -bbi nonmem run run[001:006].mod // expand to run001.mod run002.mod ... run006.mod local -bbi nonmem run .// run all models in directory - +### Examples ``` -bbi nonmem run sge [flags] + # Execute model run001 + bbi nonmem run sge run001.mod + # Run models run001.mod, run002.mod, and run003.mod + bbi nonmem run sge 'run[001:003].mod' + # Run all models in the current directory + bbi nonmem run sge . ``` ### Options @@ -61,5 +63,5 @@ bbi nonmem run sge [flags] ### SEE ALSO -* [bbi nonmem run](bbi_nonmem_run.md) - run a (set of) models locally or on the grid +* [bbi nonmem run](bbi_nonmem_run.md) - Run models locally or on the grid diff --git a/docs/commands/bbi_nonmem_scaffold.md b/docs/commands/bbi_nonmem_scaffold.md index 902bf0ff..9eb2cfb0 100644 --- a/docs/commands/bbi_nonmem_scaffold.md +++ b/docs/commands/bbi_nonmem_scaffold.md @@ -1,14 +1,12 @@ ## bbi nonmem scaffold -scaffold directory structures +Scaffold directory structures ### Synopsis - - nmu scaffold --cacheDir=nmcache - - nmu scaffold --cacheDir=../nmcache --preview // show where the cache dir would be created - +This subcommand writes a .gitignore file to the directory specified by +--cacheDir that tells Git to ignore all files in the directory except for the +.gitignore file itself. ``` bbi nonmem scaffold [flags] @@ -48,5 +46,5 @@ bbi nonmem scaffold [flags] ### SEE ALSO -* [bbi nonmem](bbi_nonmem.md) - nonmem a (set of) models locally or on the grid +* [bbi nonmem](bbi_nonmem.md) - Entry point for NONMEM-related subcommands diff --git a/docs/commands/bbi_nonmem_summary.md b/docs/commands/bbi_nonmem_summary.md index f9047c14..c86a3c06 100644 --- a/docs/commands/bbi_nonmem_summary.md +++ b/docs/commands/bbi_nonmem_summary.md @@ -1,18 +1,30 @@ ## bbi nonmem summary -summarize the output of model(s) +Summarize model results ### Synopsis -summarize model(s), for example: -bbi nonmem summary run001/run001 -bbi nonmem summary run001/run001.lst -bbi nonmem summary run001/run001.res -bbi nonmem summary run001/run001 run002/run002 - +Summarize the results of the specified *.lst files. By default, this +prints a table of parameter estimates preceded by a lines with details about +the run. Pass the --json flag to get a machine-readable output that includes +more details. + +The path may also be specified without the trailing ".lst". *.res files are +also supported. + +``` +bbi nonmem summary [flags] [...] +``` + +### Examples ``` -bbi nonmem summary [flags] + # Summarize run001 + bbi nonmem summary run001/run001.lst + # The extension may be omitted + bbi nonmem summary run001/run001 + # Output JSON summary for run001 and run002 + bbi nonmem summary --json run001/run001 run002/run002 ``` ### Options @@ -52,5 +64,5 @@ bbi nonmem summary [flags] ### SEE ALSO -* [bbi nonmem](bbi_nonmem.md) - nonmem a (set of) models locally or on the grid +* [bbi nonmem](bbi_nonmem.md) - Entry point for NONMEM-related subcommands diff --git a/docs/commands/bbi_version.md b/docs/commands/bbi_version.md index 9f90f744..ee13d4ec 100644 --- a/docs/commands/bbi_version.md +++ b/docs/commands/bbi_version.md @@ -1,12 +1,6 @@ ## bbi version -check version - -### Synopsis - -check the current bbi version -bbi version - +Print bbi's version and exit ``` bbi version [flags] @@ -31,5 +25,5 @@ bbi version [flags] ### SEE ALSO -* [bbi](bbi.md) - manage and execute models +* [bbi](bbi.md) - Manage and execute models