Skip to content

Commit

Permalink
Merge pull request #160 from Biogen-Inc/submit_cran020
Browse files Browse the repository at this point in the history
Next Release: `v0.2.0`
  • Loading branch information
AARON-CLARK committed Feb 8, 2023
2 parents d391daf + 28d491a commit 38cb7da
Show file tree
Hide file tree
Showing 49 changed files with 1,139 additions and 695 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ vignettes/x0*
^doc$
^Meta$
^CRAN-SUBMISSION$
^scripts$
2 changes: 1 addition & 1 deletion .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [main, master]
pull_request:
branches: [main, master, for_cranny]
branches: [main, master, devel]
release:
types: [published]
workflow_dispatch:
Expand Down
3 changes: 3 additions & 0 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Version: 0.2.0
Date: 2023-02-03 16:27:30 UTC
SHA: d30f87b5819d7624f7ef1a8527430cbe747255ce
50 changes: 25 additions & 25 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
Package: tidyCDISC
Title: Quick Table Generation & Exploratory Analyses on ADaM-Ish Datasets
Version: 0.1.1
Version: 0.2.0
Authors@R: c(
person("Aaron", "Clark", , "[email protected]",
role = c("aut", "cre"), comment = c(ORCID = "0000-0002-0123-0970")),
person("Aaron", "Clark", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-0123-0970")),
person("Jeff", "Thompson", , "[email protected]", role = "aut"),
person("Teresa", "Wilson", , "[email protected]", role = "aut"),
person("Nate", "Mockler", , "[email protected]", role = c("ccp", "led")),
person("Maya", "Gans", , "[email protected]", role = "aut"),
person("Robert", "Krajcik", , "[email protected]", role = "ctb"),
person("Marly", "Gotti", , "[email protected]", role = "ctb"),
person(given = "Jeff", family = "Thompson",
email = "[email protected]", role = "ctb"),
person("Biogen", "Inc", role = "cph")
)
Description: Provides users a quick exploratory dive into common
visualizations without writing a single line of code given the users
data follows the Analysis Data Model (ADaM) standards put forth by
the Clinical Data Interchange Standards Consortium
(CDISC) <https://www.cdisc.org>. Prominent modules/ features of the application are the Table
Generator, Population Explorer, and the Individual Explorer. The Table
Generator allows users to drag and drop variables and desired statistics
(frequencies, means, ANOVA, t-test, and other summary statistics) into
bins that automagically create stunning tables with validated
information. The Population Explorer offers various plots to visualize
general trends in the population from various vantage points. Plot
modules currently include scatter plot, spaghetti plot, box plot,
histogram, means plot, and bar plot. Each plot type allows the user to
plot uploaded variables against one another, and dissect the
population by filtering out certain subjects. Last, the Individual
Explorer establishes a cohesive patient narrative, allowing the user
to interact with patient metrics (params) by visit or plotting
important patient events on a timeline. All modules allow for concise
filtering & downloading bulk outputs into html or pdf formats to save
for later.
data follows the Analysis Data Model (ADaM) standards put forth by the
Clinical Data Interchange Standards Consortium (CDISC)
<https://www.cdisc.org>. Prominent modules/ features of the
application are the Table Generator, Population Explorer, and the
Individual Explorer. The Table Generator allows users to drag and drop
variables and desired statistics (frequencies, means, ANOVA, t-test,
and other summary statistics) into bins that automagically create
stunning tables with validated information. The Population Explorer
offers various plots to visualize general trends in the population
from various vantage points. Plot modules currently include scatter
plot, spaghetti plot, box plot, histogram, means plot, and bar plot.
Each plot type allows the user to plot uploaded variables against one
another, and dissect the population by filtering out certain subjects.
Last, the Individual Explorer establishes a cohesive patient
narrative, allowing the user to interact with patient metrics (params)
by visit or plotting important patient events on a timeline. All
modules allow for concise filtering & downloading bulk outputs into
html or pdf formats to save for later.
License: AGPL (>= 3)
URL: https://Biogen-Inc.github.io/tidyCDISC/
BugReports: https://github.com/Biogen-Inc/tidyCDISC/issues
Expand Down Expand Up @@ -65,11 +65,11 @@ Imports:
tippy (== 0.1.0)
Suggests:
knitr,
pkgdown,
spelling,
testthat
VignetteBuilder:
knitr
Encoding: UTF-8
Language: en-US
LazyData: true
RoxygenNote: 7.2.0
VignetteBuilder: knitr
50 changes: 29 additions & 21 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@

# tidyCDISC 0.2.0 (CRAN Release)

* Added RTF export option for download from the Table Generator.
* Cleaned up JS to 'standard analyses' drop down.
* Created "ALL" as dropdown option for 'standard analysis' Table 41 instead of auto populating all available weeks in the drop zone.
* added protocol / study id in prominent location on each tab
* designed `ATPT` variable integration in the Table Generator (when present in data)
* added `OS Health` & `riskmetric` badges to the `README`
* engineered more user-friendly function to create the table generator output from the block data
* ensured Table Generator output automatically updates the table name when a 'standard analysis' is selected
* Fixed some Population Explorer filtering issues
* Added an `app.R` file so that shiny app can be ran directly from `shiny::runGitHub()` or `runUrl()`


# tidyCDISC 0.1.1

* automated a footnote with **Source** and **Run Date** in table generation

* allowed custom user-defined footnotes

* allowed the selection of 'All' when a time/visit-based statistic is chosen in the table generator

* cleaned up downloadable R Script to replicate table generator output

* fixed bug where `data_from` was erroneously listed as a grouping option in the population explorer


# tidyCDISC 0.1.0 (CRAN Release)
* cleaning up `devtools::check()` & preparing for CRAN release.

* unfortunately, had to revert back to importing `tippy 0.1.0` since it is the latest available version on CRAN and CRAN pkgs cannot depend on package versions under development.

* created a new toggle on the `Data` tab that allows users to select which CDISC pilot study data sources they wish to use in the app.

* Minor bug improvements

# tidyCDISC 0.0.4
Expand All @@ -44,20 +52,20 @@ This release (PR #65) performs a lot of functions, testing on many non-pilot ADS
This release adds meat to the previous skeleton version of `tidyCDISC`. The initial development release was intended to be a "bare bones" platform that could serve as a foundation to build a great clinical data exploratory tool. Version `0.0.1` enriches the user experience by adding useful & commonly needed features for analysis. For more on this release, see [the announcement](https://biogen-inc.github.io/tidyCDISC/articles/Blog.html#announcing-tidycdisc-0-0-1-1) on our blog.


- Major Features added, by tab:
- **Table Generator**
- New "STAT Blocks", such as `Y FREQ`, `MAX FREQ`, `NON-MISSING`, and a pair of `NESTED FREQ` blocks
- Interact with `ADAE`
- 17 new 'standard analysis' tables in the `ADAE` and `ADLB` space.
- An R Script download-er to reproduce analysis performed in the app
- **Population Explorer**
- New Chart types
- line plot - means over time
- Heat map - endpoint correlations
- Kaplan Meier Curve (when `TTE` class data uploaded)
- Upgraded `pkgdown` site documentation to be more robust and hassle-free for developers
- Depends on updated version of IDEAFilter (>= 0.1.0.9000)
- Squashed bugs and other minor improvements
* Major Features added, by tab:
* **Table Generator**
* New "STAT Blocks", such as `Y FREQ`, `MAX FREQ`, `NON-MISSING`, and a pair of `NESTED FREQ` blocks
* Interact with `ADAE`
* 17 new 'standard analysis' tables in the `ADAE` and `ADLB` space.
* An R Script download-er to reproduce analysis performed in the app
* **Population Explorer**
* New Chart types
* line plot - means over time
* Heat map - endpoint correlations
* Kaplan Meier Curve (when `TTE` class data uploaded)
* Upgraded `pkgdown` site documentation to be more robust and hassle-free for developers
* Depends on updated version of IDEAFilter (>= 0.1.0.9000)
* Squashed bugs and other minor improvements

# tidyCDISC 0.0.0.9000

Expand Down
5 changes: 0 additions & 5 deletions R/data-phuse_TDF_ADaM.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#'
#' @source <https://github.com/phuse-org/TestDataFactory/blob/master/Updated/TDF_ADaM/adsl.xpt>, downloaded 2020-06-17
#' @format Data frame with 254 features and 51 fields
#'
"adsl"


Expand All @@ -16,7 +15,6 @@
#' @source <https://github.com/phuse-org/TestDataFactory/blob/master/Updated/TDF_ADaM/adlbc.xpt>, downloaded 2020-06-17
#'
#' @format Data frame with 32,740 features and 58 fields
#'
"adlbc"


Expand All @@ -27,7 +25,6 @@
#' @source <https://github.com/phuse-org/TestDataFactory/blob/master/Updated/TDF_ADaM/advs.xpt>, downloaded 2020-06-17
#'
#' @format Data frame with 32,139 features and 34 fields
#'
"advs"


Expand All @@ -38,7 +35,6 @@
#' @source <https://github.com/phuse-org/TestDataFactory/blob/master/Updated/TDF_ADaM/adae.xpt>, downloaded 2020-06-17
#'
#' @format Data frame with 32,139 features and 34 fields
#'
"adae"


Expand All @@ -49,5 +45,4 @@
#' @source <https://github.com/phuse-org/TestDataFactory/blob/master/Updated/TDF_ADaM/adtte.xpt>, downloaded 2021-01-26
#'
#' @format Data frame with 32,740 features and 58 fields
#'
"adtte"
7 changes: 7 additions & 0 deletions R/golem_utils_ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -246,40 +246,47 @@ col_12 <- function(...){
column(12, ...)
}

#' @noRd
#' @importFrom shiny column
col_10 <- function(...){
column(10, ...)
}

#' @noRd
#' @importFrom shiny column
col_8 <- function(...){
column(8, ...)
}

#' @noRd
#' @importFrom shiny column
col_6 <- function(...){
column(6, ...)
}


#' @noRd
#' @importFrom shiny column
col_4 <- function(...){
column(4, ...)
}


#' @noRd
#' @importFrom shiny column
col_3 <- function(...){
column(3, ...)
}


#' @noRd
#' @importFrom shiny column
col_2 <- function(...){
column(2, ...)
}


#' @noRd
#' @importFrom shiny column
col_1 <- function(...){
column(1, ...)
Expand Down
2 changes: 1 addition & 1 deletion R/mod_dataComplyRules_fct_helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ df_incl_rules <-
#'
#' @family dataComply Functions
#' @keywords internal
#'
#' @noRd
gather_rules <- function(input, output, session,
all_df_rules = list(error = c(""), warn = c("") ),
expl_rules = list( list(error = c(""), warn = c("")) ),
Expand Down
7 changes: 7 additions & 0 deletions R/mod_dataUpload.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ mod_dataUpload_ui <- function(id){
tooltip = shinyWidgets::tooltipOptions(title = "Click to change pilot data selections!")
))
),
div(uiOutput(ns("study_data_upload")), style = "padding-left: 20px", class = "studyid"),
fluidRow(
style = "padding: 20px",
column(3,
Expand Down Expand Up @@ -167,6 +168,12 @@ mod_dataUpload_server <- function(input, output, session){
paste0("Warning: data uploaded from multiple studies: ", paste(studies(), collapse = " & "))
})

output$study_data_upload <- renderUI({
req(studies())
study_ids <- paste(studies(), collapse = " & ")
h4(paste("Study ID: ", study_ids))
})

# upon a dataset being uploaded and selected, generate data preview
output$datapreview_header <- renderUI({
data_selected()
Expand Down
4 changes: 2 additions & 2 deletions R/mod_indvExpPatEvents.R
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ mod_indvExpPatEvents_server <- function(input, output, session,
shinyjs::show(id = "eventsPlot")

if("MH_" %in% substr(uni_rec$DOMAIN,1,3)){
tab <- uni_rec %>% select(-START, -END, -DOMAIN)
tab <- uni_rec %>% select(EVENTTYP, tab_st, tab_en, DECODE)
date_cols <- c("Start of Event","End of Event")
}
else{
date_cols <- "Date of Event"
tab <- uni_rec %>% select(-END, -tab_st, -tab_en, -DOMAIN)
tab <- uni_rec %>% select(EVENTTYP, START, DECODE)
}

output$eventsTable <- DT::renderDataTable(server = FALSE, { # This allows for downloading entire data set
Expand Down
8 changes: 4 additions & 4 deletions R/mod_indvExp_fct_buildEvents.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ build_events <- function(
tab_st = ifelse(as.character(START) == "", NA_character_, as.character(START)), # disp chr in DT
tab_en = ifelse(as.character(END) == "", NA_character_, as.character(END)) # disp chr in DT
) %>%
distinct(USUBJID, EVENTTYP, START, END,
tab_st,
tab_en,
DECODE, DOMAIN)%>%
distinct(USUBJID, START,
DECODE, EVENTTYP,
DOMAIN, END,
tab_st, tab_en)%>%
select(-starts_with("DS"))


Expand Down
8 changes: 8 additions & 0 deletions R/mod_indvExp_srv.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ mod_indvExp_server <- function(input, output, session, datafile){
}
})

output$study_indv_exp <- renderUI({
req(datafile())

studies <- unique(unlist(lapply(datafile(), `[[`, "STUDYID")))
study_ids <- paste(studies, collapse = " & ")
h4(paste("Study ID: ", study_ids))
})

# Only select data that starts with AD followed by one or more alphanumerics or underscore
my_loaded_adams <- reactive({
req(!is.null(datafile()))
Expand Down
1 change: 1 addition & 0 deletions R/mod_indvExp_ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ mod_indvExp_ui <- function(id){
tagList(
h1("Individual Explorer", align = "center"),
br(), br(), br(),
div(uiOutput(ns("study_indv_exp")), style = "padding-bottom: 20px", class = "studyid"),
fluidRow(
column(3,
wellPanel(
Expand Down
Loading

0 comments on commit 38cb7da

Please sign in to comment.