Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2020-04-01 tc155 M1SS computation engine doesn't generate error when duplicate time values appear with different concentration values #201

Closed
TomTensfeldt opened this issue Apr 1, 2020 · 3 comments

Comments

@TomTensfeldt
Copy link
Collaborator

  • Datasets supporting this test case are loaded to onedrive
    There are two requirements relative to data/record duplication scenarios
  1. If duplicate time but conc not exactly the same - ERROR condition - error message;fail the profile/run

  2. if duplicate time but concentration exactly the same - warning message - use 1 of the records, continue to successful execution

This test case probes the first scenario with the same time in PKATPD_TEST and differing concentrations in PKCNCN. When the computation engine runs, it should generate an error message recording the details of the duplication: "Error: records 22 and 23 are duplicated with TIME=11.5 and CONC=18.1 and TIME=11.5 and CONC=18.2, respectively." and then exit gracefully.

However the STDOUT (see below) for this example indicates that it continues to run with no indication of what is occurring with duplicate values placing the parameter results in uncertain status, i.e. they cannot be trusted but there's no indication that there's anything wrong with the input data.

Computation engine must be updated to react as indicated to both record duplication scenarios above.

relevant portion of input dataset

   PKDATAROWID     SDEID PERIOD VISIT   SUBJID PKPTMS PKATPD PKATPD_TEST PKCNCN
         <int>     <dbl> <chr>  <int>    <int>  <dbl>  <dbl>       <dbl>  <dbl>
 1          16 250852597 <NA>      21 10011001    0     0           0    11.4  
 2          17 250852597 <NA>      21 10011001    1.5   1.5         1.5  16.7  
 3          18 250852597 <NA>      21 10011001    3     3           3    17    
 4          19 250852597 <NA>      21 10011001    4     4           4    15.5  
 5          20 250852597 <NA>      21 10011001    6     6           6    14.4  
 6          21 250852597 <NA>      21 10011001   10     9.97        9.97 13    
 7          22 250852597 <NA>      21 10011001   11.5  11.5        11.5  18.1  
 8          23 250852597 <NA>      21 10011001   13    13          11.5  18.2  
 9          24 250852597 <NA>      21 10011001   14    14          14    15.1  
10          25 250852597 <NA>      21 10011001   16    16          16    15.1  
11          26 250852597 <NA>      21 10011001   24    24          24    10.4  
12          27 250852597 <NA>      21 10011001   48    48          48     4.45 
13          28 250852597 <NA>      21 10011001   72    72          72     1.73 
14          29 250852597 <NA>      21 10011001   96    96          96     0.833

STDOUT

There were 26 warnings (use warnings() to see them)
[1] "openNCA: Model: M1 DosingType: SS AUCMETHOD: LINLOG"
TAU1  as defined in 'map', do not appear in input concentration dataset 
TOLD1  as defined in 'map', do not appear in input concentration dataset 
unit_conversion : Unit Class 1 (Time) time_col:  TMAX1 TMIN1 TLAST1 TLAG KELTMHI THALF LASTTIME1 MRTLAST1 MRTEVIFO1 MRTEVIFP1 TAU1 TOLD1  parameters are scaled from  HR  to  HR  via scaling factor:  1 
unit_conversion : Unit Class 3 (Dose) dose_col:  DOSE1  parameters are scaled from  MCG  to  MG  via scaling factor:  0.001 
unit_conversion : Unit Class 4 (Volume) volume_col:  VZFTAU1  parameters are scaled from  ML  to  L  via scaling factor:  0.001 
unit_conversion : Unit Class 5 (Amount/Volume) conc_col:  CMAX1 CMIN1 CLAST1 CTROUGH1 CTROUGHEND1 KELC0 CEST CAV1  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:  CLFTAU1  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 AUCLAST1 AUCLASTC1 AUC1 AUC2 AUC3 AUC4 AUC5 AUC6 AUC7 AUC8 AUC9 AUC10 AUC11 AUC12 AUC13 AUCINFO AUCINFO1 AUCINFOC AUCINFP AUCINFP1 AUCINFPC AUCTAU1  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:  AUMCLAST1 AUMCINFO1 AUMCINFP1 AUMCTAU1  parameters are scaled from  NG.HR.HR/ML  to  NG.HR.HR/ML  via scaling factor:  1 
unit_conversion : Unit Class 12: ([Amount/Volume]/Amount) concdn_col:  CMAXDN1 CMINDN1  parameters are scaled from  NG/ML/MCG  to  NG/ML/MG  via scaling factor:  1000 
unit_conversion : Unit Class 14: (Volume/Body Weight) volumew_col:  VZFTAUW1  parameters are scaled from  ML/LB  to  L/KG  via scaling factor:  0.001 
unit_conversion : Unit Class 15: (Volume/Time/Body Weight) clw_col:  CLFTAUW1  parameters are scaled from  ML/HR/LB  to  ML/HR/KG  via scaling factor:  1 
There were 13 warnings (use warnings() to see them)
@TomTensfeldt TomTensfeldt added this to the 2.0.1_high_priority milestone Apr 2, 2020
@TomTensfeldt TomTensfeldt changed the title 2020-04-01 tc155 M1SS computation engine doesn't generate error when duplicate time values appear with difference concentration values 2020-04-01 tc155 M1SS computation engine doesn't generate error when duplicate time values appear with different concentration values Apr 3, 2020
@jhhughes256
Copy link
Collaborator

Just an FYI, I can't find this testcase, so am unable to close the issue.

@jhhughes256
Copy link
Collaborator

I think this issue is still present as of commit f5bfc3a. CE provides a warning message that the issue has occurred but still produces parameters for the SDEID that the warning is about, as shown below for SDEID == 250852597.

## Warning in doTryCatch(return(expr), name, parentenv, handler): Removing
## SDEID: '250852597' due to duplicate TIME but different CONC values
## Warning in doTryCatch(return(expr), name, parentenv, handler): Removing
## SDEID: '2004533073' due to duplicate TIME but different CONC values
## Warning in doTryCatch(return(expr), name, parentenv, handler): Removing
## SDEID: '2831342063' due to duplicate TIME but different CONC values
SDEID DOSE1 DOSEC DOSEC1 CMAX1 CMAXDN1 FLGACCEPTPREDOSE CMIN1 CMINDN1 CLAST1 TMAX1 FLGACCEPTTMAX TMIN1 TLAST1 TLAG CTROUGH1 CTROUGHEND1 PTROUGHR1 PTROUGHREND1 KEL KELC0 KELTMLO KELTMHI KELNOPT KELR KELRSQ KELRSQA FLGACCEPTKEL THALF THALFF LASTTIME1 FLGACCEPTTAU AUCALL AUCALLDN1 AUCLAST1 AUCLASTDN1 AUMCLAST1 AUC1 AUC2 AUC3 AUC4 AUC5 AUC6 AUC7 AUC8 AUC9 AUC10 AUC11 AUC12 AUC13 AUC1DN AUC2DN AUC3DN AUC4DN AUC5DN AUC6DN AUC7DN AUC8DN AUC9DN AUC10DN AUC11DN AUC12DN AUC13DN AUCINT1 AUCINT2 AUCINT3 AUCINT4 AUCINT5 AUCINT6 AUCINT7 AUCINT8 AUCINT9 AUCINT10 AUCINT11 AUCINT12 AUCINT13 AUCINFO AUCINFO1 AUCINFODN CEST AUCINFP AUCINFP1 AUCINFPDN AUMCINFO1 AUMCINFP1 AUCTAU1 AUCTAUDN1 AUMCTAU1 MRTLAST1 MRTEVIFO1 MRTEVIFP1 AUCXPCTO1 AUCXPCTP1 AUMCXPTO1 AUMCXPTP1 CAV1 CLFTAU1 CLFTAUW1 PTF1 PTR1 VZFTAU1 VZFTAUW1 CONC1 CONC2 CONC3 CONC4 CONC5 CONC6 CONC7 CONC8 CONC9 CONC10 CONC11 CONC12 CONC13 CONC14 CONCTIME1 CONCTIME2 CONCTIME3 CONCTIME4 CONCTIME5 CONCTIME6 CONCTIME7 CONCTIME8 CONCTIME9 CONCTIME10 CONCTIME11 CONCTIME12 CONCTIME13 CONCTIME14 DI1 TAU1 TOLD1 CTOLDest1 AUMCLAST AUMCINFO AUMCINFP TIMEU AMOUNTU DOSEU VOLUMEU CONCU KELU CLU AUCU AUMCU AUCNORMU AURCU CONCNORMU RATEU VOLUMEWU CLWU STUDY SITEID SUBJID RAND TREATXT TRTCD PKCOLL PKBDFLD PKTERM PERIODU PERIOD VISITU VISIT PHASE DOSE HT WT AGEDERU AGEDER WTUNI WTRAW HTUNI HTRAW RACEOTH RACES SEX RACIALD ETHNIC PKRCOM PKPCOM
242759741 1.0 1e+06 1e+06 12.00 12.00 0 1.170 1.170 1.170 14.000 1 96 96 0 7.96 1.170 1.507538 10.256410 0.0267452 13.234099 3 96 12 0.9724133 0.9455877 0.9401464 0 25.91670 0 96 0 435.2653 435.2653 435.2653 435.2653 12508.434 13.8450 29.0100 39.42000 60.82000 98.76435 113.35085 129.02585 140.37585 164.07458 238.41293 348.7070 400.9023 435.2653 13.8450 29.0100 39.42000 60.82000 98.76435 113.35085 129.02585 140.37585 164.07458 238.4129 348.7070 400.9023 435.2653 0_1.5 0_3 0_4 0_6 0_9.967 0_11.5 0_13 0_14 0_16 0_24 0_48 0_72 0_96 479.0115 479.0115 479.0115 1.0153751 473.2301 473.2301 473.2301 18343.732 17572.550 435.2653 435.2653 12508.434 28.73749 38.38594 37.11082 9.132594 8.022475 31.81086 28.81834 4.534014 2.2974493 31.26551 2.388612 10.256410 85.90139 1.1690142 7.96 10.50 9.72 11.10 10.30 8.83 10.20 10.70 12.00 11.70 7.24 2.690 1.730 1.170 0 1.5 3 4.000 6 9.967 11.5 13 14 16.000 24 48 72 96 0-96 96 0 NA 12508.434 18343.732 17572.550 HR NA MG L NG/ML 1/HR L/HR NG.HR/ML NG.HR.HR/ML NG.HR/ML/MG NA NG/ML/MG NA L/KG ML/HR/KG A3051106 1001 10011058 112 Varenicline Weekly Titration Scheme B POINT PLASMA CP-526,555 NA NA DAY 21 NA 1000 162 73.47 YR 77 LB 162.0 IN 63.9 NA W M NA NA NA NA
250852597 1.0 1e+06 1e+06 18.10 18.10 0 0.833 0.833 0.833 11.500 1 96 96 0 11.40 0.833 1.587719 21.728692 0.0333668 21.001861 3 96 11 0.9893352 0.9787841 0.9764268 0 20.77358 0 96 0 609.8762 609.8762 609.8762 609.8762 16161.078 21.0750 46.3500 62.60000 92.50000 146.84790 170.68605 212.07285 242.27285 343.10716 511.32452 580.4198 609.8762 NA 21.0750 46.3500 62.60000 92.50000 146.84790 170.68605 212.07285 242.27285 343.10716 511.3245 580.4198 609.8762 NA 0_1.5 0_3 0_4 0_6 0_9.967 0_11.5 0_14 0_16 0_24 0_48 0_72 0_96 NA 634.8411 634.8411 634.8411 0.8533388 635.4507 635.4507 635.4507 19305.912 19382.698 609.8762 609.8762 16161.078 26.49895 30.42866 30.52461 3.932473 4.024626 16.28949 16.62111 6.352877 1.6396771 26.97666 2.717981 21.728692 49.14102 0.8084888 11.40 16.70 17.00 15.50 14.40 13.00 18.10 15.10 15.10 10.40 4.45 1.730 0.833 NA 0 1.5 3 4.000 6 9.967 11.5 14 16 24.000 48 72 96 NA 0-96 96 0 NA 16161.078 19305.912 19382.698 HR NA MG L NG/ML 1/HR L/HR NG.HR/ML NG.HR.HR/ML NG.HR/ML/MG NA NG/ML/MG NA L/KG ML/HR/KG A3051106 1001 10011001 1 Varenicline Weekly Titration Scheme B POINT PLASMA CP-526,555 NA NA DAY 21 NA 1000 146 60.77 YR 68 LB 134.0 IN 57.5 NA W F NA NA NA NA
276697939 0.5 5e+05 5e+05 4.87 9.74 0 0.412 0.824 0.412 4.000 1 96 96 0 3.13 0.412 1.555910 11.820388 0.0291577 5.612612 3 96 12 0.9815110 0.9633639 0.9597002 0 23.77236 0 96 0 170.4263 340.8526 170.4263 340.8526 4750.391 4.8975 11.0475 15.88250 25.07193 40.58698 46.01374 52.18974 56.95466 66.05586 94.15575 139.1694 158.9292 170.4263 9.7950 22.0950 31.76500 50.14385 81.17396 92.02749 104.37948 113.90931 132.11173 188.3115 278.3388 317.8584 340.8526 0_1.5 0_3 0_4 0_6 0_9.967 0_11.5 0_13 0_14 0_16 0_24 0_48 0_72 0_96 184.5564 184.5564 369.1127 0.3415975 182.1418 182.1418 364.2836 6591.486 6276.880 170.4263 340.8526 4750.391 27.87358 35.83295 34.47286 7.656232 6.432087 27.93140 24.31922 1.775274 2.9338195 35.34410 2.511162 11.820388 100.61906 1.2121707 3.13 3.40 4.80 4.87 4.33 3.52 3.56 4.73 4.80 4.31 2.82 1.170 0.553 0.412 0 1.5 3 4.000 6 9.967 11.5 13 14 16.000 24 48 72 96 0-96 96 0 NA 4750.391 6591.486 6276.880 HR NA MG L NG/ML 1/HR L/HR NG.HR/ML NG.HR.HR/ML NG.HR/ML/MG NA NG/ML/MG NA L/KG ML/HR/KG A3051106 1001 10011048 33 Varenicline Two-Week BID Titration Scheme C POINT PLASMA CP-526,555 NA NA DAY 21 NA 500 167 82.99 YR 66 LB 183.0 IN 65.9 NA W M NA NA NA NA

@jhhughes256
Copy link
Collaborator

Assessing this issue with the latest commit cca452d this issue no longer occurs and this issue will be closed. Profiles with duplicate times where the concentrations differ now correctly provide NA as output for all variables. Example below.

knitr::kable(r[r$SDEID %in% c("250852597", "2004533073", "2831342063"),1:10])
SDEID DOSE1 DOSEC DOSEC1 C0 CMAX CMAX1 CMAXC1 CMAXDN CMAXDN1
2 250852597 NA NA NA NA NA NA NA NA NA
18 2004533073 NA NA NA NA NA NA NA NA NA
27 2831342063 NA NA NA NA NA NA NA NA NA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants