feat: add option to drop end-interval concentration for regular parameters - #1411
Open
Gero1999 wants to merge 6 commits into
Open
feat: add option to drop end-interval concentration for regular parameters#1411Gero1999 wants to merge 6 commits into
Gero1999 wants to merge 6 commits into
Conversation
Gero1999
force-pushed
the
feat/drop-end-conc
branch
from
July 24, 2026 14:11
1e1c4dd to
37a4c34
Compare
Gero1999
force-pushed
the
feat/drop-end-conc
branch
from
July 28, 2026 12:47
deeaa48 to
8162fa1
Compare
Gero1999
marked this pull request as ready for review
July 28, 2026 12:59
Shaakon35
reviewed
Jul 29, 2026
Shaakon35
reviewed
Jul 29, 2026
Collaborator
Author
|
@Shaakon35 both comments do not need to be addressed, should be fine |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Closes #1414
Description
Adds a global "Drop End Concentration" switch in NCA Setup → Data Imputation. When enabled, for regular (non-interval/partial) parameter calculations it drops the concentration measured exactly at the end of each main interval (
time == end) before NCA runs.Useful for multiple-dose profiles where the concentration at the interval end really belongs to the next dose (e.g. an imputed C0). Including that boundary point can distort Cmax, Tmax, and AUC. Genuine troughs are unaffected because the method is a no-op when no point sits exactly at the interval end.
Implemented via a self-contained
PKNCA_impute_method_end_conc_drop()mirroring humanpred/pknca#572, with a TODO to remove it once that method ships in a released PKNCA.Definition of Done
How to test
Added a tiny reproducer dataset for manual testing:
tests/testthat/data/test-end-conc-leak-ADNCA.csv(1 subject, 2 IV-bolus dose profiles, 14 rows).How to use in the app:
DOSNOP → ATPTREF).Notes to reviewer