Coder Social home page Coder Social logo

bodymapr's Introduction

Overview

BodyMapR (pronounced "body mapper") an R package and Shiny application that generates anatomical visualizations of cancer lesions from structured data. The package centralizes around two core functions bodymapr_df() and bodymapr_plot() which transposes structured data from REDCap® onto an anatomical map to yield an interactive data visualization.

We have also created a front-end Shiny application that uses the core functions of BodyMapR on the server side of the app. The Shiny app of BodyMapR allows for an interactive component to facilitate user-directed data visualizations. The package does not require the use of the Shiny app, but the app enhances the usability of the package. The BodyMapR Shiny application is launched via the function launch_BodyMapR(). This function takes one argument, “Data”, a raw csv file exported from REDCap®. launch_BodyMapR() is the only function an end user needs to call to execute and utilize BodyMapR. Once launched, clinical researchers interface with BodyMapR in a web browser.

A video demonstration of BodyMapR can be seen here.

BodyMapR provides a set of verbs that wrangle, process and graph clinical tumor characteristics from structured data:

Verbs Function
bodymapr_df() creates a data frame of clinical tumor characteristics from a structured electronic data collection instrument (e.g. the Lesion Information instrument) and maps them to lookup tables that contain a coordinate system for the Body Map
bodymapr_plot() creates an interactive data visualization of clinical tumor characteristics from a structured EDC lesion instrument that has been processed by bodymapr_df().
genomics.df.unite() wrangles and processes genomics data from a REDCap project that has incorporated the Genomics Instrument. Genetic alterations are listed in wide format with a concatenation of genomic alterations in one cell. This function is called within BodyMapR's bodymapr_df() function.
genomics.df.long() wrangles and processes genomics data from a REDCap project that has incorporated the Genomics Instrument. This allows for expedited analysis of patient-level data from REDCap. Genetic alterations are listed in long format. This function is called within BodyMapR's genomics.df.unite() function.

Dependencies

Software Dependencies

BodyMapR is written in R (version 4.0.0), organized using roxygen2, and utilizes the following packages dplyr, tidyr, readr, stringr, purrr, magrittr, plotly, shinydashboard and Shiny.

Clinical Informatics Dependencies

BodyMapR facilitates data visualizations from structured data contained in the Lesion Information instrument stored within REDCap® project. The data dictionary for this form has been previously published[@LesionInstrument]. BodyMapR also integrates clinico-genomic data from the Genomics data capture instrument, which is has been previously described([https://www.themillerlab.io/post/optimizing_rwd_collection-clinical_genomics) and is freely available on GitHub(https://github.com/TheMillerLab/genetex/blob/main/data-raw/genomics_data_dictionary.csv).

Installation

Development version

To get a bug fix or to use a feature from the development version, you can install the development version of BodyMapR from GitHub.

devtools::install_github("TheMillerLab/BodyMapR")

Usage

library(BodyMapR)

BodyMapR Input

BodyMapR takes data from a REDCap® project that has incorporated the Lesion Information instrument as the input. This csv file is loaded into the Shiny application. End users control what information is displayed onto a Biorender-generated anatomical map via the application's sidebar in the BodyMapR browser-based user interface.

BodyMapR Output

BodyMapR creates a plotly visualization, with topographical represenations of cancer lesions displayed on a BioRender-generated image using ggplot2.

Getting help

If you encounter a clear bug, please file an issue with a minimal reproducible example on GitHub.

Disclaimer and Acknowledgements

BodyMapR is for research purposes only. No clinical decisions should be made with the information obtained from its output.

bodymapr's People

Contributors

themillerlab avatar

Stargazers

Andrew Allen Bruce avatar KoryClik avatar  avatar Duy Tran avatar ancbiosoc avatar

Watchers

 avatar  avatar

bodymapr's Issues

BodyMapR shiny

Hello
First of all, thank you for developing such a great package! it has inspired me for my own projects.
I tried to integrate some body visualization into a shiny app. It works well locally BUT whenever I publish my app, I always get the same error: the app is being disconnected when calling bodymapR (no error, other app functions work well)

Screen Shot 2024-01-06 at 2 01 39 PM

It may be a memory issue but I was wondering if you ever encountered such problem
I originally thought it could be related to plotly but it also happens with standard ggplots.
all suggestions are very welcome!
thank you again.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.