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

"Select a Biomarker" menu item construction. #239

Open
3 tasks done
npaszty opened this issue Sep 20, 2023 · 2 comments
Open
3 tasks done

"Select a Biomarker" menu item construction. #239

npaszty opened this issue Sep 20, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@npaszty
Copy link
Contributor

npaszty commented Sep 20, 2023

Feature description

  1. seems that there is a validation that the analysis variable has to be PARAMCD but PARAM would work equally well. Can PARAM be added to the validation so that it too is acceptable as this argument? param_var = "PARAM"?
  2. If above is acceptable then we need to deal with the menu item sorting. currently the sort looks like a regular case sensitive sort by ASCII collating sequence so upper case sorts first then lower case. but what we want is a case insensitive sort like in the following example
# Sample vector
my_vector <- c("apple", "Banana", "cherry", "Date")

# Perform case-insensitive sorting
sorted_vector <- my_vector[order(tolower(my_vector))]

# Display the sorted vector
print(sorted_vector)

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines.

Security Policy

  • I agree to follow this project's Security Policy.
@npaszty npaszty added the enhancement New feature or request label Sep 20, 2023
@Dura-Europos
Copy link

Dura-Europos commented Feb 15, 2024

Follow up: we encountered some challenges when we tried make the interface more user-friendly for Biomarker plots created by functions like tm_g_gh_boxplot, tm_g_gh_correlationplot, and so on.

Motivation: currently displayed choices in "Select a Biomarker" start with PARAMCD (like "A0000A") but our users are not familiar with them. We want to replace them with what the users are more familiar with: PARAM (like "Something_a_biomarker"). Ideally, PARAMCD should not appear in the choices.

First we passed a different list to param argument in the plotting functions; this list is built solely from PARAM column. But the functions failed to recognize datapoints correctly (and no plot created), possible due to mismatch between param_var and param.

Second, we passed PARAM to param_var, hopping to resolve the mismatch, but instead we triggered this error:

stop("param_var must be 'PARAMCD'. Otherwise, we cannot currently guarantee the correctness of the code.")

It appears that the function's current design limits its flexibility. Ideally, the argument param_var should accept columns other than PARAMCD without losing the ability to identify and use datapoints

@npaszty
Copy link
Contributor Author

npaszty commented Feb 15, 2024

thanks @Dura-Europos

we did also try to "subvert the system" by renaming PARAM <- PARAMCD and PARAMCD <- PARAM which did "work" but this kludge isn't really getting at the root cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants