Andy00000000000 / nonmem2mrgsolve

Automated NONMEM to mrgsolve Translation
GNU General Public License v3.0
9 stars 0 forks source link

Feature request: Converting the NONMEM synthax to mrgsolve with only the ctl file #35

Open Grindelwarudo opened 1 month ago

Grindelwarudo commented 1 month ago

Hello!

I'm trying to convert rxode2 models to mrgsolve, and to do that:

  1. I'm using babelmixr2 to convert the RxODE model to NONMEM (as a ctl file)
  2. Then the idea was to use your package to convert the ctl file to an mrgsolve compatible format.

The issue is, I only have the model file, not the data field for the classic babelmixr conversion.

As such, I'm using the result of this comment (which can be used as a working example btw) to write a ctl file, before using that file to convert to mrgsolve.

Currently, I realized that your package required both the ctl and ext files. As I currently have only the ctl file, how could I handle this "automatically"?

Thank you by advance!

Andy00000000000 commented 1 month ago

Hi,

I am hoping to remove the .ext (or .cnv) requirement eventually, but have not had time to build in that functionality yet. The difficulty would be in parsing the initial estimates from the .ctl since NONMEM $THETA and $OMEGA blocks can be written in many different text formats. In the short term (next month or so), I could create placeholder zeros in $THETA and $OMEGA of the mrgsolve code if the .ext is not provided/available.

In the meantime, there's a couple workarounds you could try:

  1. If you have the ability to run NONMEM, you could create the .ext by running FOCEI with MAXEVAL=0 on $EST. It sounds like this might not fit your goal though based on the babelmixr2 issue thread.

  2. You could use a dummy .ext (such as mod1.ext I have in the vignettes >> models >> drugx-oral-1cmt-101 folder) by renaming the .ext to match your .ctl filename (I also plan to add optional functionality to allow for .ext to have a different filename than the .ctl). Then after the nonmem2mrgsolve translation, you would need to manually update the $THETA and $OMEGA values to the initial estimates that you provided in the nlmixr2 ini block.

Let me know if any of these help and please feel free to provide suggestions,

Andy

Grindelwarudo commented 1 month ago

Hey again!

Using your second suggestion did the job! If I can update in a more automatic manner before this enhancement I will keep you updated.

Thanks!!