tensfeldt / openNCA

openNCA computation engine is an R package that provides for generation of pharmacokinetic parameter estimates using non-compartmental (NCA) pharmacokinetic analysis methods.
MIT License
27 stars 5 forks source link

2020-09-01 tc1577_M1SS-2 AUCT is missing and resets for subsequent AUCT for first AUCT to include TAU1 #271

Closed jhhughes256 closed 4 years ago

jhhughes256 commented 4 years ago

Issue

This testcase is the same as tc1577_M1SS-1, with the nominal 10 hour records removed. These records correspond with the TAU1, TOLD2 for profiles with two dosing intervals in this testcase. Both of these testcases are very similar to tc1577 and tc158.

For profiles with two dosing intervals (0-10h and 10-24h) the cumulative AUC (AUCT) is missing for the first AUCT to include TAU1. (i.e. AUC5 which is from 0h to ~11.5h). Note that CONC6 (concentration at ~11.5h) is not missing, so AUCT doesn't meet the conditions in the CE Specification for being missing. Output for tc1577_M1SS-2 shown below.

knitr::kable(head(dplyr::select(r, SDEID, AUC3, AUC4, AUC5, AUC6, AUC7, CONC4, CONC5, CONC6, CONCTIME4, CONCTIME5, CONCTIME6, CTOLDest2, TAU1, TOLD1, CMIN2, AUCTAU1)))
SDEID AUC3 AUC4 AUC5 AUC6 AUC7 CONC4 CONC5 CONC6 CONCTIME4 CONCTIME5 CONCTIME6 CTOLDest2 TAU1 TOLD1 CMIN2 AUCTAU1
42088261 28.27324 43.24313 82.98679 92.67470 98.72953 7.45 7.52 6.94 4.000000 6.000000 11.5 NA 24 0 NA 154.00084
110358863 17.38236 26.50222 NA 7.22250 12.52250 4.92 4.52 4.72 4.066667 6.000000 11.5 3.50 10 0 3.50 44.86989
180819268 16.31162 24.18127 43.58767 48.17490 51.00373 3.98 3.89 3.19 4.000000 6.000000 11.5 NA 24 0 NA 74.19601
212373988 20.67750 31.72054 NA 10.10145 16.42634 5.74 5.22 7.21 4.000000 6.016667 11.5 4.24 10 0 4.24 55.15527
483025130 35.47978 53.23615 NA 14.38500 23.92823 9.10 8.66 9.41 4.000000 6.000000 11.5 7.80 10 0 7.80 88.94377
782312460 19.15190 28.57796 48.22973 52.69973 55.57345 5.22 4.24 2.98 4.000000 6.000000 11.5 NA 24 0 NA 76.60242

After this it appears to reset the AUCi accumulation, beginning from zero again. Output for tc1577_M1SS below, that shows the difference between AUC7 (AUC6 in tc1577_M1SS-2) and AUC6 (AUC5 in tc1577_M1SS-2). This supports the hypothesis that AUCT accumulation is reset.

knitr::kable(head(r[,c("SDEID", "AUC6", "AUC7", "AUC7MINUSAUC6")]))
SDEID AUC6 AUC7 AUC7MINUSAUC6
42088261 81.73844 91.42634 9.687905
110358863 49.02882 56.25132 7.222500
180819268 43.87734 48.46458 4.587237
212373988 59.95860 70.06005 10.101451
483025130 99.25885 113.64385 14.385000
782312460 49.05875 53.52875 4.470000

Warnings provided below for extra information.

Warning messages:
1: In run_computation(data = d, map = mct, flag = flags,  ... :
  Map 'OPTMIZEKEL' does not have a valid value! Not using KEL optmization for this computation
2: In run_M1_SS_computation(data = merged_data, map = map_data,  ... :
  Flag 'FLGEMESIS' is not present in the dataset
3: In run_M1_SS_computation(data = merged_data, map = map_data,  ... :
  Map 'OPTIMIZEKEL' does not have a valid value! Not using KEL optimization for this computation
4: In doTryCatch(return(expr), name, parentenv, handler) :
  Missing concentration at TAU and/or TOLD for SDEID: '110358863'
5: In doTryCatch(return(expr), name, parentenv, handler) :
  Missing concentration at TAU and/or TOLD for SDEID: '110358863'
... more of the same ...
28: In doTryCatch(return(expr), name, parentenv, handler) :
  Missing concentration at TAU and/or TOLD for SDEID: '4245137068'
29: In doTryCatch(return(expr), name, parentenv, handler) :
  Missing concentration at TAU and/or TOLD for SDEID: '4245137068'
30: In unit_conversion(data = data_data, map = map_data, result = computation_df,  ... :
  'AMOUNTU' #2# is not present in the dataset provided via 'map'
31: In unit_conversion(data = data_data, map = map_data, result = computation_df,  ... :
  'PKATPDU' and 'PKCNCU' #10# are not present in the dataset provided via 'map'
jhhughes256 commented 4 years ago

As of commit 82b3953 this issue no longer occurs.