-
Notifications
You must be signed in to change notification settings - Fork 13
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
Feature Request: code generation feature #107
Labels
enhancement
New feature or request
Comments
Thanks Ram, I will give it a try. |
edgar-manukyan
added a commit
that referenced
this issue
Nov 27, 2024
edgar-manukyan
added a commit
that referenced
this issue
Nov 28, 2024
edgar-manukyan
added a commit
that referenced
this issue
Dec 1, 2024
14 tasks
The POC for one topic CM code generation (full domain 💯 ) is ready for discussion at #108 The code to run:
spec <- read_spec("cm_sdtm_oak_spec_cdash.csv")
spec <- spec |>
dplyr::filter(
!is.na(target_sdtm_variable),
!is.na(mapping_algorithm),
!target_sdtm_variable %in% c("DOMAIN")
)
domain <- "cm"
generate_code(spec, domain)
# One can use option width to control the width of the code
# Twenty will almost always place every parameter on a separate line
old_width <- options(width = 20)
generate_code(spec, domain)
# Restore original width
options(width = old_width$width) Generated code
Generated cm |
edgar-manukyan
added a commit
that referenced
this issue
Dec 3, 2024
edgar-manukyan
added a commit
that referenced
this issue
Dec 8, 2024
edgar-manukyan
added a commit
that referenced
this issue
Dec 8, 2024
edgar-manukyan
added a commit
that referenced
this issue
Dec 8, 2024
edgar-manukyan
added a commit
that referenced
this issue
Dec 8, 2024
edgar-manukyan
added a commit
that referenced
this issue
Dec 9, 2024
edgar-manukyan
added a commit
that referenced
this issue
Dec 11, 2024
edgar-manukyan
added a commit
that referenced
this issue
Dec 11, 2024
edgar-manukyan
added a commit
that referenced
this issue
Dec 11, 2024
Multi-topic VS pocSpecGenerated code
Resultant vsAlso, please consider the updated cm spec |
edgar-manukyan
added a commit
that referenced
this issue
Dec 11, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature Idea
The specification format for OAK is almost ready. Can we try the code generation feature?
The feature will accept the spec in a csv format and domain name as parameters and it will generate the R code required. We may have to make some changes to the spec as we develop this feature. It may be beneficial to add the associated topic variable for each qualifier. We can brainstorm these requirements.
Also, we can think about a JSON format as input for the specification.
Relevant Input
CM domain:
Spec - https://github.com/pharmaverse/rinpharma-2024-SDTM-workshop/blob/main/specs/cm_cdash/cm_sdtm_oak_spec_cdash.csv
VS DOmain -
Spec - https://github.com/pharmaverse/rinpharma-2024-SDTM-workshop/blob/main/specs/vs/vs_sdtm_oak_spec.csv
Relevant Output
CM domain Program - https://github.com/pharmaverse/rinpharma-2024-SDTM-workshop/blob/main/exercises/create_cm_cdash.R
VS Domain Program - Program - https://github.com/pharmaverse/rinpharma-2024-SDTM-workshop/blob/main/exercises/create_vs.R
Reproducible Example/Pseudo Code
sdtm.oak::generate_code(spec = "cm_cdash/cm_sdtm_oak_spec_cdash.csv" domain = 'cm')
The text was updated successfully, but these errors were encountered: