Advancing FDA Clinical Trial Submissions with R: Reproducing the R Submissions Pilot 2 Shiny App Using Rhino

[This article was first published on Tag: r - Appsilon | Enterprise R Shiny Dashboards, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Advancing FDA Clinical Trial Submissions with R Shiny and Rhino framework

A Brief Overview of the RConsortium Submissions Working Group

The RConsortium Submissions working group is dedicated to promoting the use of R in the life science industry, particularly in FDA submissions. RConsortium’s mission is centered around creating example R-based submissions for various scenarios, demonstrating the potential of R and Shiny apps for clinical trial data analysis and visualization.

Importance of R in the Life Science Industry and FDA Submissions

R has been gaining traction in the life science industry, emerging as a powerful alternative to traditional tools like SAS for data analysis, visualization, and statistical modeling. Historically, the pharmaceutical industry has heavily relied on SAS. However, R’s open-source nature provides significant advantages in terms of reproducibility and accessibility. 

The efforts of the RConsortium working group in showcasing R-based submissions not only emphasize the potential of R but also highlight the possibility of revolutionizing the management and submission of clinical trial data. This, in turn, fosters a more collaborative and transparent environment within the industry.

RConsortium Submissions Working Group Pilots

Background of the Pilots

The RConsortium working group has initiated several pilots aimed at demonstrating the capabilities of R and Shiny apps in various FDA submission scenarios.

Overview of Pilot 1, 2, 3, and 4

Pilot 1 focused on showcasing an R-based submission containing common analyses within the current FDA e-submission system and process.

Pilot 2 expanded upon Pilot 1 by including a Shiny app developed using the {golem} framework, and was also submitted through the FDA e-submission system and process.

Pilots 3 and 4 are currently ongoing, with the aim of further demonstrating the potential of R in various submission scenarios.

Achievements of Pilot 1 and Pilot 2

The successful completion of Pilot 1 and Pilot 2 has demonstrated the potential of R and Shiny apps in the context of FDA submissions, paving the way for wider adoption of R in the life science industry.

Pilot 2 App Technical Deep-Dive

The “submissions-pilot2 repository” was used for the development of the Shiny app in the Pilot 2 submission, while the “submissions-pilot2-to-fda” repository contained the files for the eCTD submission.

The Shiny app is built using the teal package with six teal modules:

    1. `App Information` – Render the `about.md` markdown to display some information about the app. Rendered using `shiny::includeMarkdown()`
    2. `Demographic Table` – A table with summary statistics associated with baseline clinical characteristics and other demographic factors is shown. Built using rtables.
    3. `KM-Plot for TTDE` – A Kaplan-Meier (KM) plot of the Time to First Dermatologic Event (TTDE) with strata defined by treatment group is displayed along with an informative risk set table across time. Built using the packages visR, and cowplot.
    4. `Primary Table` – A summary table of the primary efficacy analysis is shown for each of the time points of assessment (baseline and week 24) comparing each treatment group. The primary efficacy variable (change from baseline in ADAS Cog (11)) was analyzed using an Analysis of Covariance (ANCOVA) model with treatment and baseline value as covariates, comparing Placebo to Xanomeline High Dose. Built using Tplyr, and huxtable.
    5. `Efficacy Table` – A summary table of an additional efficacy analysis is shown for baseline and week 20. The efficacy variable (Glucose) was analyzed using ANCOVA model with treatment and baseline value as covariates, comparing Placebo to Xanomeline High Dose. Built using reactable.
    6. `Visit Completion Table` – A summary table of the number of patients remaining in the treatment period for each scheduled visit from baseline to week 24. Built using huxtable.

The teal app is wrapped using the golem framework. Additionally, the renv package is employed to create a reproducible environment of R packages for the Shiny app.

To comply with the Electronic Submission File Formats and Specifications for the eCTD submission, it is crucial that the programming code has a ‘.TXT’ extension. Consequently, the Shiny app files are converted into ‘.TXT’ format using the pkglite package. Detailed documentation on this process can be found in the adrg-prepare.Rmd vignette, providing step-by-step instructions for meeting this requirement.

Rhino FDA eCTD Shiny app rewrite

 

 

 

Rewriting the Pilot 2 App Using the {Rhino} Framework

Introducing Rhino

The Rhino framework was developed by Appsilon to create enterprise-level Shiny applications. It allows developers to apply the best software engineering practices, modularize code, test it well, make UI beautiful and to track user adoption.

Rhino provides support in 3 main areas:

    1. Clear code: scalable architecture, modularization based on Box and Shiny modules.
    2. Quality: comprehensive testing such as unit tests, E2E tests with Cypress, logging and monitoring and linting.
    3. Automation: project startup, CI with GitHub Actions, dependencies management with {Renv}, configuration management with config, Sass and JavaScript bundling with ES6 support via Node.js.

The Rhino framework is exceptionally well-suited for highly regulated environments, particularly those involved in regulatory submissions and drug development processes. Its capabilities align with the needs of these industries, ensuring compliance and streamlining the development of Shiny applications. While there are other projects aimed at improving the structure of Shiny applications, exploring the Rhino documentation will provide insights into how Rhino differentiates itself from these alternatives.

The motivation behind rewriting the app with Rhino

The motivation for selecting the Rhino framework to rewrite the Pilot 2 app was to offer an example of a Shiny app submission that is not an R package. Our FDA pilot app can be found on our Appsilon R Shiny Demo Gallery, providing a practical demonstration of the capabilities and advantages of a Rhino app.

Learnings from the Rewrite Process

During the rewriting process, a technical solution was developed to submit the non-R package Shiny app using the Rhino framework. This involved creating a simple DESCRIPTION file with just a package name. The `pkglite::pack()` function was utilized to pack the Shiny app into a text file suitable for submission through the eCTD gateway. This approach simulated the same submission approach used for the Pilot 2 app.

Broader Implications of Rhino, R Programming, and Clinical Trials

The successful rewriting of the Pilot 2 app using the Rhino framework holds significant potential for Shiny users in the life science industry. If accepted by the FDA, this achievement could have far-reaching implications, demonstrating the feasibility of submitting plain R code and Shiny apps without the need to wrap them into R packages. 

Such flexibility in the submission process would promote the wider adoption of R within the industry, particularly for regulatory submissions, fostering innovation and streamlining regulatory procedures.

Future Collaboration

Global consumers benefit from having access to safe and advanced pharmaceutical systems. The United States FDA’s Center for Drug evaluation and Research is one of the more advanced and stringent consumer watchdogs. 

R programming and Shiny applications are advancing in the pharmaceutical and biotechnology industries. The enormous amounts of data generated from clinical trials alone, requires tools like R for analysis and Shiny for automation, web deployment, end-user efficiency and more.

With the successful FDA Pilot 2 submission by the RConsortium, Shiny has proven itself capable of holding up to the needs and requirements that policy demands. With the Rhino FDA Pilot rewrite, R developers have an open source tool for the software engineering practices and development tools that meet software industry standards.

Achieve Results with Appsilon

Appsilon is a renowned technology consulting company specializing in advanced analytics and custom software development for Fortune 500s and Life Science teams. With their expertise in R programming and Shiny applications, Appsilon can assist pharmaceutical and biotechnology companies in building robust and compliant systems.

Appsilon Team – Domain Expertise and Data Science Solutions

Appsilon’s team of experienced data scientists and software engineers can collaborate with clients to design and develop tailored solutions that meet their specific project needs. Whether it’s creating interactive data dashboards, automating regulatory reporting processes, or implementing advanced analytics algorithms, Appsilon has the knowledge and skills to deliver high-quality and compliant solutions.

Rhino and the Life Sciences

The Rhino framework, built on top of R and Shiny, provides a comprehensive set of tools and functionalities that simplify the development of FDA-compliant applications. It offers features such as secure data management, audit trails, version control, and robust validation capabilities, ensuring that the developed systems meet the stringent requirements of regulatory agencies.

By leveraging Appsilon services or utilizing appropriate open source packages, organizations can navigate the complex landscape of engineering and industry compliance in the pharmaceutical sector. These solutions enable the development of reliable, secure, and compliant applications that adhere to the standards set by regulatory agencies like the FDA or EMA. 

With Appsilon’s expertise and the Rhino framework, organizations can confidently pursue their projects, knowing that they are equipped with the necessary tools and support to achieve solid engineering and industry compliance.

Learn, engage, and create an impact with R, Shiny, Rhino, and more:

Ready to move from analysis to action? Explore Appsilon’s case studies in the life sciences.

The post appeared first on appsilon.com/blog/.

To leave a comment for the author, please follow the link and comment on their blog: Tag: r - Appsilon | Enterprise R Shiny Dashboards.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.