Nonlinear mixed effect modeling – a bed time story

A long time ago before AI generated children’s books were a thing, I made children’s books using biorender for fun. Here’s one that I have not released before. I found it to be a fun way to explain what I do in my field to others. Hope you enjoy!

Btw, I do have a RShinyApp that allows you to optimize your caffeine dose too https://lnkd.in/d_dPRtnt

Like what you see? Check out my website at https://lnkd.in/gjHdmwSt too!
#Singaporepharmacometrics

Posted in Uncategorized | Leave a comment

Export control in a digital world – is synthetic data the future for clinical studies?

Part 5 of ScienceJournalJourneys – Hi I am your SG pharmacometrician, an early career researcher here to share the latest trends and interesting facts in pharmacometrics

When you bring goods to another country, it is normal for the goods to be subject to import and export controls, limiting what you can bring in and out.

Similarly, with data sharing, proper regulations are required. Without proper controls, data sharing could result in the leak of personal private information, causing disastrous implications on the affected individuals. However, controls that are too strict hamper research. Data sharing promotes scientific reproducibility, collaborations and even new discoveries. Researchers thus have a straddle a fine line between data protection and data sharing.

At A*STAR, clinical data is often anonymized according to a list of rules by the personal data protection act (PDPA). However, due to the amount of information present in clinical data, there is still a chance of being able to trace the data back to an individual. Synthetic data presents a potential solution. Based on a real-world population, a virtual population is generated with similar characteristics, but without any identifying information to trace back to an individual. This would allow data sharing to become much easier, bringing us to today’s paper by JB Woillard et al, https://pmc.ncbi.nlm.nih.gov/articles/PMC11706419/#psp413240-sec-0013 on the use of synthetic data in pharmacogenomics.

In this paper, 3 synthetic data generation methods Avatar, CT‐GAN and TVAE were tested for how well the synthetic data could retain the population trends while preventing data reidentification. In their dataset of renal transplant patients, all 3 methods were able to reidentify the significant variable of haplotype in the risk of graft loss, matching the original study. However, other variables of donor age and donor CYP3A5 also came up as significant with CT-GAN and augmented Avatar. The algorithms also showed differing performances in estimating the hazard ratio for the haplotype variable, with CT-GAN having the closest prediction, while Avatar overestimated the hazard ratio significantly. CT-GAN also demonstrated the best performance in terms of privacy.

Overall, this is an important study evaluating the utility of synthetic data for clinical pharmacology studies. While current tools to generate synthetic data might not be ready to generate evidence for clinical decisions, the tools show good promise in being able to mirror a real world population. As data privacy becomes of increasing concern in our rapidly digitized world, it would only make sense to develop these synthetic data methods further to allow researchers to continue making important discoveries while reducing the risk of data privacy breaches.

Hope you learnt something with me today~

Subscribe to my site to never miss a post from me! https://singaporepharmacometrics.com/

Posted in Uncategorized | Tagged , , , , , , , | Leave a comment

Neural ODEs vs ODEs – what’s the difference?

Part 4 of ScienceJournalJourneys – Hi I am your SG pharmacometrician, an early career researcher here to share my expertise and learnings about everything pharmacometrics.

For any PK/PD modeler, ODEs are a staple in our models that help us to describe the dynamic processes of absorption, distribution and elimination. To a computer scientist though, ODEs are great for introducing structure into neural networks as neural ODEs, helping these models handle time series predictions much better. See https://lnkd.in/dhyBeVy3

What about the benefit of adding a neural network to our ODE structure though? Neural networks allow for more flexible model fitting for highly nonlinear dynamics. I am interested in seeing how it could benefit PD modeling, where biological response tends to be nonlinear, and therefore harder to capture when the drug’s full mechanism of action may not be well described.

The main downside is that most of these models are done in either Python or Julia, while pharmacometricians prefer to work in NONMEM. This brings us to today’s paper by DS Baram et al. https://lnkd.in/dJqB3PzH, a tutorial on how to implement neural ODEs in popular modeling softwares NONMEM and Monolix. They also compared the fitting of neural ODEs against traditional ODE fits using mean squared error (MSE), which tells you how close the model’s predictions are to the actual values. In this case, I was surprised to see that the MSE was rather similar in both neural ODE and regular ODEs as some claim neural ODEs tend to give better fits. This could be because their example data is rather clean (see Fig 4), and because this is a low dimensional neural ODE, meaning that it may not capture as many complex relationships as a high dimensional neural ODE would.

I will still be interested to try this out though, especially to see if a low dimensional neural ODE can help me to capture more complex PD relationships without being computationally too expensive, or if I should move to python to do higher dimensional analysis.

Example code is available in their supplementary material too if you are interested in trying it out.

Are you using neural ODEs in your PK/PD workflow? Comment down below!

Pic credit: Dall.E an “Ode to Neural ODE”—a fusion of neural networks, differential equations, and cosmic inspiration.

Posted in Uncategorized | Tagged , , , , , , | Leave a comment

ScienceJournalJourney3 – the translation problem in drug development

Drug development often follows a series of experiments of exponentially increasing costs. After identifying a target and a few hits, novel drugs are then tested in large scale against in vitro assays e.g. bacterial kill in a 96 well plate, for efficacy. After this, the most promising hits are prioritized for animal testing. Depending on who you ask though, the most promising hit can differ, depending on what kind of in vitro assay was done. This is a problem in drug development for tuberculosis, the top infectious disease killer in the world, where multiple in vitro assays exist, but it remains unclear which ones are informative for further translation into animal studies.

In vitro assays are also hard to compare to efficacy in animals, as drug dosing in animals is dynamic, with a rise in concentration as drug is absorbed orally, before dropping as the drug is cleared. In vitro assay readouts however, tend to focus on a single potency value e.g. concentration to achieve 50% effect, (EC50) instead. Thankfully, with PK-PD modeling, we can account for these dynamic drug levels in animals and measure an in vivo potency. This allows us to compare drug efficacy between systems, and by doing so, select the best in vitro assay, or combination of assays that are informative of drug efficacy in animals.

These informative in vitro assays can then be used to predict drug efficacy of more novel compounds in animals when incorporated back into a PK-PD model.

Read all about it here https://www.cell.com/iscience/fulltext/S2589-0042(25)00192-0

Posted in Uncategorized | Leave a comment

ScienceJournalJourney2 – The one surprising use of Fexofenadine (Telfast)

To the average consumer, fexofenadine, or better known by its brand name, Telfast, is a non-sedating anti-allergy medication that can help to stop itches and runny noses. Fexofenadine is an over-the-counter medication that does not require frequent monitoring or dose titration. It is thus surprising to find that there are 22 papers related to fexofenadine population pharmacokinetics on PubMed.

Turns out, fexofenadine is really useful for measuring drug transporter activity as its drug exposure is very sensitive to changes in the function of these transporters (e.g. OATP1B1 and P-gp). These are referred to as probe substrates in literature, and are often used as a proxy to study the impact loss of transporter function might make to other drugs cleared by similar transporter pathways. Furthermore, a healthy person can take fexofenadine without experiencing severe side effects, allowing it to be used safely in clinical trials.

In this paper by Frédéric Gaspar et al. https://pubmed.ncbi.nlm.nih.gov/39798016/, they precisely do just that to study how drugs cleared by P-gp may be impacted in older adults alongside impaired renal function and concomitant medications that inhibit P-gp.  Previously, most of these studies have been done in healthy volunteers who are younger. They found that age, renal function and P-gp inhibitors all contribute to an increase in fexofenadine concentrations, suggesting that clinicians should pay closer attention to drugs that are P-gp substrates in older adults, especially those with reduced renal function. Interestingly, only 10% of fexofenadine is cleared by the kidneys. Furthermore, two-thirds of the study population had reduced P-gp activity even without P-gp inhibitors, suggesting a potential link between reduced kidney function and P-gp activity that might contribute to this decreased drug clearance. This is another nice study that clearly applies useful pharmacological concepts of using a probe drug to understand drug disposition better. Hope you learnt something with me!

Posted in Uncategorized | Leave a comment

Infinity stoned – a pharmacometrician’s take on Thanos in Squid Game 2

Disclaimer: this is purely a tongue in cheek article for educational purposes. In no way do I condone the use of illegal drugs or encourage its use. Also, potential spoilers ahead.

Since the season 2 release, Squid Game is once again trending. Season 2 introduces new and interesting characters, one of which is Thanos, a drug addicted rapper who falls into debt from bad crypto investments. Somehow, Thanos was able to smuggle illict drugs into the games, which he is seen taking throughout the games. As a pharmacometrician, of course I had to review this.

In the show, Thanos is observed consuming oral tablets. In order for a drug to exert its effects, it needs to first be released from the tablet, get absorbed in the small intestine and then be transported to the site of action, in this case, the brain. For most of the games, we can see Thanos and his friend take the tablets while they are waiting for the game to start. This allows for sufficient time for the drug to be absorbed and take effect. Possibly, this is at least 30min or more. We thus observe that Thanos has peculiar behavior throughout the games compared to other participants.

Interestingly, when we first see Thanos with his drugs during Red Light, Green Light, there is only 2min and 45s left on the clock. However, within the 2min time span where the participants scramble toward the finish line, we observe Thanos push other participants to their death, and switch from being terrified to happy and playful. This is generally not possible with oral tablets.

What happens if he knew to take the tablets sublingually, by crushing it up with his teeth and putting the powder under his tongue to hasten absorption? We never see Thanos or his friend take the tablets with water in the show, suggesting this might be occurring. It would speed up the absorption, but this is unlikely sufficient to achieve efficacy levels within 2 min. Such a short onset of action is generally achieved only with an intravenous injection, allowing the drug to enter systemic circulation instantaneously. Knowing that Thanos tends to pre-medicate prior to a game, the timing of drug onset during Red Light Green Light is thus a pharmacologic inconsistency I noticed in Squid Game.

Perhaps, Thanos had a very strong placebo effect upon taking the drug, or his character is erratic with or without his drugs.

Overall though, I thoroughly enjoyed T.O.P’s performance as Thanos and thought this character was highly entertaining to the show. Did you know, aside from T.O.P, 3 other K-pop idols are also Squid Game cast?

Posted in Uncategorized | Leave a comment

Has AI taken over my job? A comparison of ChatGPT and DeepSeek for generating NONMEM scripts


Prompt: Develop a 1 compartment oral absorption PK model with linear elimination in NONMEM

I did a direct comparison of the script outputs in the table below. For the sake of brevity, only CL was discussed in the $PK block, as the other outputs are similar. You can leave a comment for the full script if you would like.

•For a very niche coding task, it is rather impressive for both ChatGPT and DeepSeek to get almost all components right

•A few typos were present, however, and this requires familiarity with NONMEM to spot and correct

•Both error models only gave proportional error models. Most modelers will test a combination of both additive and proportional errors.

•DeepSeek was missing the INTERACTION term in the $ESTIMATION block

•For basic PK modeling for beginners, using a standard template from NONMEM tutorial part 1 https://lnkd.in/g2-ujU4k might be easier than troubleshooting the errors from LLMs.

** As a side note, if you were wondering if NONMEM can actually write to csv, it works. However, this output still requires parsing to obtain proper rows and columns. While not wrong as well, INTERACTION as a term in $EST is generally recommended with METHOD=1 to allow for FOCE with INTERACTION, the classical method used for modeling in NONMEM.

Have you tried to use LLMs in your PK/PD modeling workflow too? Let me know in the comments!

Posted in Uncategorized | Tagged , , , , , , , , , | Leave a comment

ScienceJournalJourney 1:  How do drug manufacturers make dosing recommendations?

Hi all, Happy New Year to everyone! I’m starting a new series this year called #ScienceJournalJourney where I review an interesting journal article and give a quick layman summary on it. As your favorite post doc influencer on LinkedIn, I will be mainly focusing on journals related to pharmacology and pharmacometrics.

Let’s begin our series with a nice paper from the Clinical and Translational Science journal titled “Population pharmacokinetics of iruplinalkib in healthy volunteers and patients with solid tumors”, by GH Yang et al. https://ascpt.onlinelibrary.wiley.com/doi/10.1111/cts.70099

According to the American Cancer Society, non small cell lung cancer (NSCLC) also has a dismal overall survival rate of 28%, hence new therapies such as iruplinalkib are sorely needed.

However,  the same dose of drug can give different drug levels, depending on a patient’s demographics, such as their weight, renal and liver function. The differing drug levels can impact whether a patient experiences severe toxicity or a lack of efficacy. During early clinical trials, these drug levels are collected from patients. Population pharmacokinetics models such as the one described in the paper are then used to find the reasons for variability in drug levels. This was done by first building a base model that describes all data, and then employing step-wise covariate modeling, where the patient demographics of weight, renal and liver function are tested to explain the model variability. The demographics that describe the variability best are selected to be part of the model as a factor that impacts model parameters such as drug clearance, which can impact drug levels. Knowing which covariates impact the drug’s levels can thus help the manufacturers recommend when a drug’s dose might be adjusted.

In this study, as all the covariates did not result in a change in drug exposure beyond the tolerated range of 0.8-1.25 fold from the population average, the investigators recommended no dose adjustment was necessary. This study however, had limited patients with severe liver or renal impairment, making it inconclusive if such patients would require special dose adjustments, which the investigators acknowledged.

This is a standard study often reported in clinical pharmacology journals for developing new drugs. It is, however, important to report this information to help other researchers and clinicians make decisions for subsequent trials. This was a nice, easy read with all the relevant evidence including model building diagnostics reported and a great paper to start our series!  

Posted in Uncategorized | Tagged , , , , , , | Leave a comment

Taking stock – has LinkedIn been useful for an early career scientist?

Its been slightly over a year since I started posting on LinkedIn. From approximately 300 ish followers, my following has grown to 2590 as of writing. Of note, I am happy to know that my coffee PK app has been adopted in workshops and lectures around the world to help spread how PK can be useful. Both scientists and non-scientists friends alike have also commented that they find my posts on LinkedIn interesting. This is all rather unexpected. Thank you all for being my followers!

I started out posting on Linkedin with the intent of sharing more about pharmacometrics with local Singaporean scientists. A secondary aim was also for me to read up more on literature to further expand my own skill sets and to try coding new things. Writing helps me to process my thoughts better. Also, prior to Linkedin, I never made an RShiny app myself! When I first started, I had just graduated from my PhD. I was not well known in any way or thought that people would want to listen to my thoughts. Never did I expect to have such a wide reach around the world! In fact, only 16.5% of my followers are based in Singapore. Singaporeans are still my top demographic on LinkedIn though.

So yes, LinkedIn has been beneficial as an early career scientist in the following ways.

  1. Improve my science communication skills  – some of my presentation ideas are workshopped on Linkedin first!
  2. Increase my visibility as an international scientist – prior to this, all my connections were people I knew in person either from school or work.
  3. Expand my network and helped me to forge high value connections in person – I have been able to get interns and collaborators via LinkedIn.
  4. Challenged me to intentionally read up and learn new things so I can post meaningful content.

Of course, none of these would have happened without your support and following. So thank you for following along too! Many of you have encouraged me, saying that you benefited from my posts. This gives me the motivation to continue with what I do.

It has been a rather hectic few weeks, but I do hope to be able to start posting again more regularly soon~

All my posts are also here singaporepharmacometrics.com

Happy holidays and a merry new year to all!

Posted in Uncategorized | Tagged , , , , | Leave a comment

Antibody pharmacokinetics (PK) and nonlinear clearance

Life has been rather busy lately, but I have been using my spare time to learn new things too. Having come from a background working mostly with small molecules, I have decided to take some time to learn about the PK of biologics too. I spent the past week learning about the PK of antibodies. Let me share with you some of my learnings with you!

Most antibodies tend to follow a 2 compartment PK, with a distribution and elimination phase. Unlike small molecules where total clearance can generally be lumped under a single term of CL, however, antibody PK can be described using 2 terms for clearance instead. This is because antibodies tend to have 2 distinct clearance pathways – a linear clearance pathway via either elimination or catabolism in cells, and a saturable clearance pathway with targeted antigen mediated clearance. As there are 2 clearance pathways instead of 1, this can make the elimination slope of the antibody with saturated clearance very different from that of a small molecule with saturated clearance.

Check out the RShiny app to try adjusting the parameters yourself!
https://janicegoh.shinyapps.io/AntibodyPK/

Hope you learnt something with me! Feel free to add in your suggestions on what other non-small molecule therapeutics are important to learn about too, and if I missed out any important points in this explanation.

Posted in Uncategorized | Tagged , , , , , , , | Leave a comment