Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
In this edition of Shiny Gatherings x Pharmaverse, we were thrilled to welcome Nina and Dony, Principal Data Scientists at Genentech, for an insightful session on building clinical data analysis apps using the {teal} framework.
Explore how {teal} and {pharmaverseadam} simplify clinical dashboards for faster insights. Learn how these tools streamline data management so you can focus on what matters.
Both Nina and Dony shared their experiences in R and open-source development in the pharmaverse and walked us through {teal}, an R/Shiny-based framework designed to simplify data exploration in clinical research and beyond. Here’s a summary of the session, including key demos and takeaways.
Watch the Video:
What is {teal}?
{teal} is an open-source, scalable R/Shiny framework developed by Roche and Genentech and later made open-source to facilitate interactive data exploration. While primarily created to support clinical trial analysis,{teal} is robust enough to also handle a wide range of general data exploration use cases.
Some key features of {teal} include:
- Dynamic filtering for tailored data exploration
- *Code reproducibility via built-in code generation
- *Report generation with easy export options
- Modular framework to enhance reusability
*When supported by the module.
How {teal} Works: Anatomy of a {teal} App
Nina introduced the basic structure of a {teal} app, walking attendees through the anatomy of the app’s components:
- Header: Customized by the developer to show app titles or navigation links.
- Filter Panel: Enables dynamic filtering of datasets, giving users flexibility to explore subsets of the data.
- Encoding Panel: Allows users to configure and modify how variables are analyzed and visualized.
- Output Panel: Displays the results (tables, plots) based on user selections.
- Show R Code Feature: Provides the exact R code used to generate the outputs, aiding reproducibility.
- Reporter Module: Lets users generate and download custom reports based on their analysis.
The {teal} framework offers modular building blocks through R packages like {teal.slice}, {teal.reporter}, and {teal.widgets}, allowing users to create feature-rich, interactive data apps with minimal effort.
Creating a Custom {teal} Module: Dony’s Workshop
Dony’s segment focused on developing a custom {teal} module to demonstrate the power of the framework. He shared code templates and explained key concepts step-by-step.
Shiny Gatherings x Pharmaverse: Building Clinical Data Analysis Apps with {teal}
Step-by-Step: Custom {teal} Module
Here’s a quick rundown of what Dony demonstrated during the webinar:
- Initializing a {teal} App:
- The app requires three key elements: init(), data, and modules.
- Users must define a {teal_data} object to specify which datasets to load.
Example datasets like iris and mtcars were used for illustration.
- Building a Simple App:
- Dony showcased how to load data into a {teal} app and display it in a data table.
- He added dynamic filtering to allow users to explore datasets interactively.
- Enhancing the App with a Plot Module:
- A histogram plot was introduced to visualize continuous variables.
- Using input() functions, users could switch between datasets and adjust bin widths for the histogram interactively.
- Enabling Code Reproducibility:
- Dony demonstrated the Show R Code feature by integrating a button that allows users to see and copy the exact code used to generate their analysis.
- This feature ensures transparency and reproducibility across projects.
- Generating Reports with {teal.reporter}:
- Dony walked through the reporting module, allowing users to save outputs in R Markdown or PNG formats.
- He added custom filters to the report and showed how to include relevant plots and code snippets.
Catch up on Shiny Gatherings #8 with Paweł Rucki to see how {teal} drives pharma innovation. Explore key insights and its impact on clinical data management.
What’s New With Teal
Nina concluded the session by providing insights into upcoming updates and enhancements for {teal}:
- Teal Gallery: A collection of {teal} apps showcasing different modules and their use cases.
- teal_transform_module(): Enables users to transform data within the app interface, extending module behavior with custom operations applied during load and data updates.
- UI/UX Improvements: The team is working on a visual overhaul to make apps more intuitive.
- Cross-industry Collaboration: {teal} is expanding through partnerships, working on new modules and enhancements.
Nina also invited attendees to explore the {teal} roadmap on GitHub, where they can track the progress of new features and contribute to the project.
Summing Building Clinical Data Apps with teal
The Shiny Gathering offered a deep dive into the capabilities of the {teal} framework, highlighting its potential for simplifying clinical data analysis while ensuring reproducibility and interactivity.
Whether you’re a seasoned R user or new to Shiny, {teal} provides a robust platform for building analytical applications that meet the evolving needs of the healthcare and pharmaceutical industries.
Be sure to explore {teal} and start building your own custom modules!
Tickets are still available for our GxP Validation Summit which is now fully online and free! Learn more and sign up today using this link.
Resources
- Join the conversation on the Pharmaverse Slack and stay up-to-date with the latest developments in {teal} and other open-source tools for pharma
- Teal Gallery
- Teal Roadmap on GitHub
- Teal Introduction Video on YouTube
- The presentation slides are available here
- All the materials from the workshop are available in this GitHub repository
- Feel free to explore the {teal} gallery for more ideas and examples
- And if you want to learn more, the {teal} documentation is a great resource
- Be on the lookout for the next Shiny Gathering
- Register for the GxP Validation Summit
The post appeared first on appsilon.com/blog/.
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.