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

Enhancement/display pp adpp #141

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

Conversation

Gero1999
Copy link
Collaborator

@Gero1999 Gero1999 commented Dec 4, 2024

Issue

Closes #66

Description

Renaming the tab from "CDISC" to "PP/ADPP"
Showing an in-app-display of the datasets in the tab
Renaming the download button from "Export CDISC" to "Download PP/ADPP" (I ended up with Parameter datasets)

Definition of Done and how to test

  • After running NCA is easy to identify where to find PP/ADPP files
  • You can download each file
  • File formats seem correct

How to test

NCA > Choose the analyte > Submit > Settings > Choose the Dose Number > Run NCA > See Outputs > Parameter datasets

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 linked an issue Dec 4, 2024 that may be closed by this pull request
2 tasks
@js3110 js3110 self-requested a review December 5, 2024 10:41
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.

Looks good, a couple things I have noticed:

  1. In ADPP, the parameter is not specified. The PARAM column contains the analyte, which is also in another column.
  2. Spelling error- should be 'Unspecified' not 'Unespecified'

Another suggestion but not required is maybe moving this tab to the NCA section? As outputs will become visualisation section and I think this tab is more relevant in the NCA section. But can be reviewed later.

@Gero1999
Copy link
Collaborator Author

Gero1999 commented Dec 5, 2024

Good catch @js3110 , issues should be fine now, thanks!

And regarding the rearrangement, I agree with you that this makes a lot of sense in NCA results. Once our main issues are addresed we will rearrange all output tabs.

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.

@Gero1999 looks much better nice work !
Approved, but one optional thing that I think would look nicer is instead of having two separate buttons for csv and excel, you just have one download button and the user can choose between .csv and excel as the file type.

Copy link
Collaborator

@m-kolomanski m-kolomanski left a comment

Choose a reason for hiding this comment

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

Looks fine in general, I have a suggestion regarding pattern usage and readability.

R/export_cdisc.R Outdated
Comment on lines 208 to 209
# Elude potential collapse cases with PC variables
.[!names(.) %in% c("AVAL", "AVALC", "AVALU")] %>%
Copy link
Collaborator

Choose a reason for hiding this comment

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

issue: Try not mixing base R and dplyr patters, as the code becomes harder to comprehend. I would also clean up older code and do:

  adpp <- pp_info %>%
    # Elude potential collapse cases with PC variables
    select(-any_of(c("AVAL", "AVALC", "AVALU"))) %>%
    rename(AVAL = PPSTRESN, AVALC = PPSTRESC, AVALU = PPSTRESU)  %>%
    left_join(
      res_nca$data$dose$data %>%
        select(-any_of(setdiff(names(pp_info), "USUBJID"))),
      by = "USUBJID"
    ) %>%
    select(any_of(adpp_col))

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, I completely agree. I sometimes miss these things, I promise to pay more attention to this from now on!

R/export_cdisc.R Outdated Show resolved Hide resolved
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.

Enhancement: Aesthetics and description of ADPP/PP download
3 participants