Skip to content

change BLQ call to nca_setup.R & perform calculations#1062

Draft
Gero1999 wants to merge 1 commit intomainfrom
1057-bug-issue-with-hl-dependent-parameter-calculations-with-blq-start-concentration
Draft

change BLQ call to nca_setup.R & perform calculations#1062
Gero1999 wants to merge 1 commit intomainfrom
1057-bug-issue-with-hl-dependent-parameter-calculations-with-blq-start-concentration

Conversation

@Gero1999
Copy link
Copy Markdown
Collaborator

Issue

Closes #1057

Description

This pull request introduces several improvements and bug fixes to the PKNCA data processing pipeline, focusing on better handling of BLQ (Below Limit of Quantification) imputation, exclusion logic, and interval formatting. The changes enhance robustness and maintainability, especially regarding global environment side effects and parameter imputation rules.

  • Improved BLQ imputation logic in PKNCA_calculate_nca to avoid unintended side effects by only assigning the BLQ method globally if it is not already defined, and cleaning up after execution only if necessary.
  • Added a Shiny observer in nca_setup_server to keep the global PKNCA_impute_method_blq in sync with the user's BLQ setting, ensuring consistent behavior across both NCA calculations and slope selector operations.
  • Updated rm_impute_obs_params to ensure half-life category parameters retain imputation, while other parameters are properly filtered, improving scientific validity and preventing incorrect exclusions.
  • Refactored format_pkncadata_intervals and related code to improve readability and maintainability, including formatting the select statement and fixing function signatures for clarity and consistency.
  • Removed unnecessary blank lines and improved formatting in several functions for better code hygiene and readability.

Definition of Done

How to test

How to test features not covered by unit tests.

Contributor checklist

  • Code passes lintr checks
  • Code passes all unit tests
  • New logic covered by unit tests
  • New logic is documented
  • App or package changes are reflected in NEWS
  • Package version is incremented
  • R script works with the new implementation (if applicable)
  • Settings upload works with the new implementation (if applicable)

Notes to reviewer

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

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

Successfully merging this pull request may close these issues.

Bug: Issue with HL dependent parameter calculations with BLQ & start concentration

1 participant