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

Bug: AUC start 0 (which also needs Feature: C0 imputation) #138

Open
wants to merge 45 commits into
base: main
Choose a base branch
from

Conversation

Gero1999
Copy link
Collaborator

@Gero1999 Gero1999 commented Nov 27, 2024

Issue

Closes #2 #60

Description

After running NCA, AUC calculations always consider the discrete start (start at where first concentration sample was collected). This can indeed alter slightly the real values of the AUC. This is a consequence of 2 problems:

  1. Doses times are being considered at the first measure, instead of at the real dose time
  2. No imputed measure at dose time is consdiered

Change description.

Definition of Done

C0 imputation option for the user specified in Setup > Data Selection

How to test

  • At "NCA">"NCA Results", when C0 is imputed it is expected that start=AFRLT-ARRLT (being AFRLT-ARRLT= 0 in DOSNO=1)
  • At "NCA">"NCA Results", when C0 is not imputed it is expected that start={time of 1st observation}
  • AUC values (auclast, aucinf...) from start=AFRLT-ARRLT are calculated when C0 is imputed
  • All variables that should only be based on observed data (cmax, tmax...) are not considering C0 imputations
  • Test that PKNCA also deals well with predoses as duplicates for the NCA
  • Check slope selector plots and NCA results remain well after running NCA
  • Check if in general C0 imputation logic works well (NCA experts):
    if C0 exists ~ C0=C0
    if DOSNO=1 & IV bolus (ADOSEDUR=0, ROUTE=intravascular) ~ C0=0
    if DOSNO>1 & not IV bolus ~ C0=predose
    if IV bolus and monoexponential data ~ logslope
    if IV bolus and not monoexponential data ~ C0=C1

Contributor checklist

  • Code passes lintr checks
  • Code passes all unit tests
  • New logic covered by unit tests
  • New logic is documented

Notes to reviewer

Anything that the reviewer should know before tacking the pull request?

@Gero1999 Gero1999 marked this pull request as draft November 28, 2024 09:37
Merge remote-tracking branch 'origin/main' into bug/auc-start-0

# Conflicts:
#	inst/shiny/tabs/nca.R
#	inst/shiny/tabs/outputs.R
@Gero1999 Gero1999 marked this pull request as ready for review December 3, 2024 14:02
@Gero1999 Gero1999 linked an issue Dec 3, 2024 that may be closed by this pull request
@js3110 js3110 mentioned this pull request Dec 4, 2024
7 tasks
@js3110 js3110 self-requested a review December 5, 2024 09:54
Copy link
Collaborator

@js3110 js3110 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Some requests:

Fixes:

  • App crashes if AUC rule sets are selected
  • Slope selector not working- i tested an exclusion and the app crashed. Haven't tried selections.
  • Data table in Data selection tab is not sorted- needs to be sorted by USUBJID for better visualisation.

Enhancements:

  • It would be good if the user can see an updated data table after the imputations, so they know what the data being used looks like. If this is too complex then maybe you can add an explanation of what the imputation is doing. But it would be good if they can see what data is being created.
  • Some clarification/relabelling is required in terms of what the imputation does. 'C0 missing' is not always accurate, for example if the predose value is present in the data set but ATime is <0, it gets excluded, but its not technically missing. Some more clarification on this would be good for the user so they know that imputation is also for predose samples.
  • Predose samples/ duplicates are not being included. Need to figure out a way to ensure they are- by creating duplicates manually or making sure PKNCA includes them.

@Gero1999 Gero1999 requested a review from js3110 December 9, 2024 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants