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

With Missing/Incorrectly Specified NORMBS/NORMBSU entries in MCT Computation Engine must not compute Body Size normalized Parameters #252

Open TomTensfeldt opened 4 years ago

TomTensfeldt commented 4 years ago

When NORMBS and NORMBSU entries in MCT are missing or not correctly specified (set but are missing in dataset for example), Body Size normalized parameters such as CLFOW, CLFPW,CLFTAUWi,CLOW,CLPW,CLTAUWi,VSSOW,VSSOWi,VSSPW,VSSPWi,VZFTAUWi,VZOW,VZPW,VZTAUWi,VZFOW, VZFPW should not be attempted to be computed.

Currently if NORMBS/NORMBSU are empty/NA/missing or are set to values for fields that do not appear in the input concentration dataset, causes the computation engine to fail to compute ANY parameters. The computation engine should print error messages about each incorrect specification for NORMBS or NORMBSU and in the message indicate which selected parameters from the PARAMETERLIST or PARAMETERDISPLAYLIST will not be computed as a consequence.

Testcase ID

tensfeldt commented 3 years ago

Note that in performing qualification checkout for implementation of the v3.0 scope item:

3.32 "When NORMBS and NORMBSU entries in MCT are missing or not correctly specified (set but are missing in dataset for example), Body Size normalized parameters such as CLFOW, CLFPW,CLFTAUWi,CLOW,CLPW,CLTAUWi,VSSOW,VSSOWi,VSSPW,VSSPWi,VZFTAUWi,VZOW,VZPW,VZTAUWi,VZFOW, VZFPW should not be attempted to be computed. Github #252"

This functionality failed. Note that this was tested with M1SD where Body Size/WT normalized parameters CLFOW, CLFPW, VZFOW, and VZFPW were retained in PARAMETERLIST but no entry in MCT was made for NORMBS or NORMBSU. Computation engine v3.0 commit c3d3f48 failed to complete execution with the errors highlighted/bolded below, neither of which are expected outcomes:

There were 26 warnings (use warnings() to see them) [1] "openNCA: Model: M1 DosingType: SD AUCMETHOD: LINLOG" openNCA computation engine version 3.0.0 Computation Run Date/Time: 2021-02-11 18:17:31 unit_conversion : Unit Class 1 (Time) time_col: TMAX TMIN TLAST TLAG KELTMLO KELTMHI THALF LASTTIME MRTLAST MRTEVIFO MRTEVIFP parameters are scaled from HR to HR via scaling factor: 1 unit_conversion : Unit Class 3 (Dose) dose_col: DOSE parameters are scaled from MG to MG via scaling factor: 1 unit_conversion : Unit Class 4 (Volume) volume_col: VZFO VZFP parameters are scaled from ML to L via scaling factor: 0.001 unit_conversion : Unit Class 5 (Amount/Volume) conc_col: CMAX CMIN CLAST CEST KELC0 parameters are scaled from NG/ML to NG/ML via scaling factor: 1 unit_conversion : Unit Class 6 (1/Time) kel_col: KEL parameters are scaled from 1/HR to 1/HR via scaling factor: 1 unit_conversion : Unit Class 7 (Volume/Time) cl_col: CLFO CLFP parameters are scaled from ML/HR to L/HR via scaling factor: 0.001 unit_conversion : Unit Class 8: (Amount.Time/Volume) auc_col: AUCALL AUCLAST AUCLASTC AUC1 AUC2 AUC3 AUC4 AUC5 AUC6 AUC7 AUC8 AUC9 AUC10 AUC11 AUC12 AUC0_12 AUC0_24 AUCINFO AUCINFP AUCINFOC AUCINFPC parameters are scaled from NG.HR/ML to NG.HR/ML via scaling factor: 1 unit_conversion : Unit Class 9: (Amount.Time.Time/Volume) aumc_col: AUMCLAST AUMCINFO AUMCINFP parameters are scaled from NG.HR.HR/ML to NG.HR.HR/ML via scaling factor: 1 unit_conversion : Unit Class 10: ([Amount.Time/Volume]/Amount) aucdn_col: AUCALLDN AUCLASTDN AUC1DN AUC2DN AUC3DN AUC4DN AUC5DN AUC6DN AUC7DN AUC8DN AUC9DN AUC10DN AUC11DN AUC12DN AUCINFODN AUCINFPDN parameters are scaled from NG.HR/ML/MG to NG.HR/ML/MG via scaling factor: 1 unit_conversion : Unit Class 12: ([Amount/Volume]/Amount) concdn_col: CMAXDN CMINDN parameters are scaled from NG/ML/MG to NG/ML/MG via scaling factor: 1 Error in [.data.frame(data_data, , map_data$NORMBSU) : undefined columns selected Calls: run_computation ... unit_conversion -> toupper -> unique -> [ -> [.data.frame In addition: Warning messages: 1: In validate_timeconc_data(map, data, flag, verbose = verbose) : No tau information provided in 'map'. 2: In validate_timeconc_data(map, data, flag, verbose = verbose) : No told information provided in 'map'. 3: In run_computation(data = data, map = mct, flag = flags, parameterset = parameterset) : 'TAUs and TOLDs values are not provided via 'flag'! Using values provided via 'data' instead (if present)! 4: In run_M1_SD_computation(data = merged_data, map = map_data, method = method, : Flag 'FLGEMESIS' is not present in the dataset 5: In unit_conversion(data = data_data, map = map_data, result = computation_df, : 'AMOUNTU' #2# is not present in the dataset provided via 'map' 6: 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' Execution halted

tensfeldt commented 3 years ago

Issue is addressed in openNCA CE release 3.0.3 (not yet committed to repo - will update comment when git history cleaned up and pushed)