-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: main
Are you sure you want to change the base?
Conversation
…rt for non-c0 parameters
…d renamed (select_X)
…adjust reshape for it
Merge remote-tracking branch 'origin/main' into bug/auc-start-0 # Conflicts: # inst/shiny/tabs/nca.R # inst/shiny/tabs/outputs.R
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey,
Are the diffs displayed by github accurate? Seems like a lengthy change, are there any artifacts/errors that happened due to merge (it did happen to me on occasions)? If the diffs are inaccurate, please point out the actual changes and disregard the below.
I do not have the time to do a detailed review (it is quite a lengthy change), but after a quick look there is some general things I want to point out:
- Please do not any files that solely generate UI to the
/R
folder - this is a folder for our logic. Filepartial_auc_input
belongs in theinst/shiny
folder, either in/modules
(if there is any server logic attached, here it isnt, but might be added) or folder likefunctions
. We can also create a new folder for UI elements, calledui
orelements
orwidgets
or whatever you find suitable. - If you are creating new files or adding new functions in the
/R
folder, please make sure that this logic is testable and do take some effort to write at least basic unit tests. Adding tests back to existing logic is tough and time consuming, so we should at least make sure that our testing suite keeps up with any new features or major changes to the old ones.
Merge branch 'main' into bug/auc-start-0 # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
Merge branch 'main' into bug/auc-start-0 # Conflicts: # inst/shiny/tabs/outputs.R
…create_start_impute)
Hello and happy new year @m-kolomanski ! You are right, this is a very lengthy change but I re checked and everything was intentional. Most of them are new created manuals for each function. As requested I also:
Don't hesitate to let me know if there is anything else I can do or if there are other concerns that I can address! I also asked @js3110 for re-review to make sure all looks as expected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, happy new year to you too and thank you for all the hard work!
I have to request some changes and have some suggestions/nitpicks to consider. I know that some of my comments refer to lines that were not changed in this PR, but since we are working on those functions I think it would be beneficial to go back and improve the code, even if it is not directly related to the changes.
R/PKNCA_impute_method_additions.R
Outdated
|
||
PKNCA_impute_method_start_log <- function(conc, time, start, end, ..., options = list()) { # nolint | ||
|
||
ret <- data.frame(conc = conc, time = time) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: What is ret
in this context? Might I suggest a more descriptive name for the variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I asked Bill because I actually followed his syntax from the other parallel functions. Apparently is from the word return
(of the function). But I will change it to something more intuitive now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I put d_conc_time
, hope that makes more sense!
…thod_start_log(slope)
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:
Change description.
Definition of Done
C0 imputation option for the user specified in Setup > Data Selection
How to test
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
Notes to reviewer
Anything that the reviewer should know before tacking the pull request?