Skip to content

Commit

Permalink
Merge branch 'main' into vignette-pkncaest
Browse files Browse the repository at this point in the history
  • Loading branch information
billdenney committed Oct 22, 2023
2 parents 6c2cbf0 + 8590765 commit 8361702
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 16 deletions.
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
changes in `focei`'s output (`$parHist` is now derived).

* Changed the solving options to match the new steady state options in
`rxode2` and how NONMEM implements them. Also changed the itwres
`rxode2` and how NONMEM implements them. Also changed the iwres
model to account for the `rxerr.` instead of the `err.` which was
updated in `rxode2` as well.

Expand Down
6 changes: 3 additions & 3 deletions R/convert.R
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ bblDatToMonolix <- function(model, data, table=nlmixr2est::tableControl(), rxCon
call.=FALSE)
}
if (.conv0$hasTinf) {
warning("monolix changes infusion times for `tinf` with bioavailability differently than `nlmixr2`, make sure there is no bioavailibilty changes for this infusion in the model",
warning("monolix changes infusion times for `tinf` with bioavailability differently than `nlmixr2`, make sure there is no bioavailability changes for this infusion in the model",
call.=FALSE)
}
if (.conv0$hasPhantom) {
Expand Down Expand Up @@ -303,7 +303,7 @@ bblDatToNonmem <- function(model, data, table=nlmixr2est::tableControl(),
.xtra <- paste0(" to convert the data with 'bblDatToNonmem'")
model <- rxode2::assertRxUi(model, extra=.xtra)
model <- rxode2::rxUiDecompress(model)
.ret <- .bblDatToNonmem (model, data, table, rxControl,
.ret <- .bblDatToNonmem (model, data, table, rxControl,
fun="bblDatToNonmem", replaceEvid=5L,
replaceOK=FALSE, software="NONMEM", env=env)
nlmixr2est::nmObjUiSetCompressed(FALSE)
Expand Down Expand Up @@ -374,7 +374,7 @@ bblDatToPknca <- function(model, data, table=nlmixr2est::tableControl(),
rxControl=rxode2::rxControl(), env=NULL) {
newData <-
.bblDatToNonmem(
model, data, table, rxControl,
model, data, table, rxControl,
fun="bblDatToPknca", replaceEvid=5L,
replaceOK=TRUE, software="pknca", env=env
)
Expand Down
4 changes: 2 additions & 2 deletions R/monolixNlmixr2est.R
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
if (!exists("parHistData", .ret$env)) {
.tmp <- .ret$ui$monolixParHistory
if (is.null(.tmp)) {
.minfo("monolix parameter history needs expoted charts, please export charts")
.minfo("monolix parameter history needs exported charts, please export charts")
} else {
.tmp$type <- "Unscaled"
assign("parHistData", .tmp, .ret$env)
Expand Down Expand Up @@ -303,7 +303,7 @@
.tmp <- .ret$ui$monolixParHistory
assign("message", paste(.msg$message, collapse="\n "), envir=.ret$env)
if (is.null(.tmp)) {
.minfo("monolix parameter history needs expoted charts, please export charts")
.minfo("monolix parameter history needs exported charts, please export charts")
} else {
.tmp$type <- "Unscaled"
assign("parHistData", .tmp, .ret$env)
Expand Down
1 change: 1 addition & 0 deletions R/pknca.R
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ ini_transform <- function(x, ..., envir = parent.frame()) {
#' @param ncaResults Already computed NCA results (a PKNCAresults object) to
#' bypass automatic calculations. At least the following parameters must be
#' calculated in the NCA: tmax, cmax.dn, cl.last
#' @param rxControl Control options sent to `rxode2::rxControl()`
#' @return A list of parameters
#' @export
pkncaControl <- function(concu = NA_character_, doseu = NA_character_, timeu = NA_character_,
Expand Down
26 changes: 22 additions & 4 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
@@ -1,32 +1,42 @@
Babelmixr
CMD
CWRES
Cmax
CodeFactor
Codecov
DV
ETAs
ISCALE
Iaccept
Isample
MAPINTER
Monolix
Monolix’
NCA
NOABORT
NONMEM
NONMEM's
ODEs
PKNCA
PKNCAresults
PreciseSums
RxODE
SAEM
Tmax
UI
VPC
addl
adm
advan
al
amtu
api
babelmixr
bblDatToMonolix
bioavailability
cancelled
clearanceu
cmax
cov
dn
doi
dvu
Expand All @@ -36,31 +46,37 @@ evid
exploratoryAutoStop
fim
firstStage
focei
foceiFit
foceiPreProcessData
https
ie
iwres
ka
lixoft
lixoftConnectors
lixoftconnectors
lixoftConnectors’
maxeval
monolix
mrgsolve
nca
nlmixr
nlmixr's
nlmixrDataToMrgsolve
nlmixrDataToNonmem
nlmixrDataToRxode
nlmixrMuDerCov
nmfe
nonmem
objf
pharmacokinetic
pknca
posthoc
psp
rxControl
rxode
saem
sigdig
sigl
tableControl
th
timeu
tmax
Expand All @@ -69,3 +85,5 @@ unitless
vc
volumeu
vp
vpc
warfarin
2 changes: 2 additions & 0 deletions man/pkncaControl.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions vignettes/articles/running-monlix.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ To use `Monolix` with nlmixr2, you do not need to change your data or your
You do need to setup how to run `Monolix`. If you have setup the
`lixoftConnectors` package from Monolix, no further setup is needed.
Instead if you run `Monolix` from the command line for grid processing
(for example) you can figure out the command to run `Monlix` (it is
(for example) you can figure out the command to run `Monolix` (it is
often useful to use the full command path and set it in the options,
ie `options("babelmixr2.monolix"="monolix")` or use
`monolixControl(runCommand="monolix")`. If needed, I prefer the
Expand Down Expand Up @@ -107,7 +107,7 @@ fit <- nlmixr(pk.turnover.emax3, nlmixr2data::warfarin, "monolix",

This fit issues an informational tidbit -

- monolix parameter history needs expoted charts, please export charts
- monolix parameter history needs exported charts, please export charts

This will automatically be generated as well when `lixoftConnectors`
package is generated and you have a recent version of Monolix. If you
Expand Down Expand Up @@ -171,7 +171,7 @@ v1s
v2s
```

# Notes about Monlix data translation
# Notes about Monolix data translation

The input dataset expected to be compatible with `rxode2` or
`nlmixr2`. This dataset is then converted to Monolix format:
Expand All @@ -184,13 +184,13 @@ The input dataset expected to be compatible with `rxode2` or

- `babelmixr2` also creates a macro for each type of dosing:

- Bolus/infusion uses `depot()` and adds modeled lag time (`Tlag`) or bioavailibilty (`p`) if specified
- Bolus/infusion uses `depot()` and adds modeled lag time (`Tlag`) or bioavailability (`p`) if specified

- Modeled rate uses `depot()` with `Tk0=amtDose/rate`. `babelmixr2`
also adds modeled lag time (`Tlag`) or bioavailibilty (`p`) if
also adds modeled lag time (`Tlag`) or bioavailability (`p`) if
specified

- Modeled duration uses `depot()` with `Tk0=dur`, also add adds
modeled lag time (`Tlag`) or bioavailibilty (`p`) if specified
modeled lag time (`Tlag`) or bioavailability (`p`) if specified
Turning off a compartment uses empty macro

0 comments on commit 8361702

Please sign in to comment.