Skip to content

uab-cgds-worthey/ptc-explorer

Repository files navigation

Pediatric Thyroid Cancer Explorer

Perform linting - Markdown

Current app version: v1.0.0

Pediatric Thyroid Cancer Explorer is an open-access resource for interactive exploration of rare pediatric differentiated thyroid cancer. It characterizes the whole-exome and transcriptome from 45 formalin-fixed paraffin-embedded (FFPE) surgical samples (tumor-normal) from pediatric patients with female predominance (<19 years).

Requirements

How to install

Option 1: Using renv (Recommended)

This project uses renv for reproducible dependency management. Using renv ensures that you have the exact same package versions as the development environment.

Step 1: Clone this repo locally

git clone "https://github.com/uab-cgds-worthey/ptc-explorer.git"
cd ptc-explorer

Step 2: Restore the R environment using renv

In R or R Studio:

# Install renv if not already installed
if (!requireNamespace("renv", quietly = TRUE)) {
  install.packages("renv")
}

# Restore all packages from the lock file
renv::restore()

Step 3: Run the app

shiny::runApp()

Or open global.R in R Studio and click "Run App" selecting "Run External"

Option 2: Manual installation

If you prefer to install packages manually without renv:

Step 1: Clone this repo locally

git clone "https://github.com/uab-cgds-worthey/ptc-explorer.git"
cd ptc-explorer

Step 2: Run R in terminal or skip this step if using R Studio

R

Step 3: Install R packages

if (!requireNamespace("pak", quietly = TRUE)) {
  install.packages("pak")
}

pak::pkg_install(c(
  "shiny",
  "shinybusy",
  "shinycssloaders",
  "shinyWidgets",
  "markdown",
  "dplyr",
  "reshape2",
  "scales",
  "stringr",
  "RColorBrewer",
  "plotly",
  "DT",
  "reactable",
  "httr",
  "jsonlite",
  "EnhancedVolcano",
  "ComplexHeatmap",
  "InteractiveComplexHeatmap",
  "wjawaid/enrichR"
))

Step 4: Run the app

shiny::runApp()

Or open global.R in R Studio and click "Run App" selecting "Run External"

How to run

Once dependencies are installed (via renv or manual installation), run the app:

shiny::runApp()

Or open global.R in R Studio and click "Run App" selecting "Run External"

Build and run with Docker

You can also run the app in a container without installing R packages locally. The Docker build now restores dependencies directly from renv.lock, so the container uses the same package versions as the project lockfile.

Build the image from the project root:

docker build -t ptc-explorer .

Run the container and expose the app on localhost:3838:

docker run --rm -p 3838:3838 ptc-explorer

Then open http://localhost:3838 in your browser.

Application Features

The PTCE application provides an intuitive interface with the following main sections:

  • Home: Overview of the study design, sample metadata, and clinical features
  • Gene Search: Interactive gene expression and variant lookup
  • WES Variants: Whole exome sequencing variant analysis
  • WES Additional: Additional genomic variant analyses (Signature, Clonal and MSI)
  • RNA Analysis: Downstream RNA-seq analysis including differential gene expression
  • RNA Fusion: Analysis of fusion gene events
  • Download: Access to latest versioned datasets in RDS format
  • User Guide: Comprehensive documentation for end users
  • Developer Guide: Technical documentation for developers and contributors
  • Team: Information about the research team
  • Cite Us: Citation information and formats for academic use

For detailed usage instructions, see the User Guide.

Repo's directory structure

The directory structure below shows the nature of files/directories used in this repo.

$ tree -a ptc-explorer/
├── CONTRIBUTING.md              <- Contribution guidelines
│
├── LICENSE.md                   <- License for the repo
│
├── README.md
│
├── .gitignore                   <- Specifies intentionally untracked files to ignore by git
│
├── .dockerignore                <- Excludes files from the Docker build context
│
├── .markdownlint.json           <- Markdown linting config
│
├── assets/                      <- Media files and resources
│   └── ptc-explorer-walkthrough.mp4  <- Application walkthrough video
│
├── global.R                     <- Load libraries, datasets
│
├── server.R                     <- Backend functions for shiny components
│
├── ui.R                         <- Frontend functions for shiny components
│
├── user_interface/              <- UI components for each page
│   ├── cite_us_ui.R             <- Citation information page layout
│   ├── contact_ui.R             <- Team information page layout
│   ├── developer_guide_ui.R     <- Developer documentation page layout
│   ├── download_ui.R            <- Data download page layout
│   ├── gene_search_ui.R         <- Gene search page layout
│   ├── home_ui.R                <- Home/landing page layout
│   ├── rna_downstream_ui.R      <- RNA downstream analysis page layout
│   ├── rna_fusion_ui.R          <- RNA fusion analysis page layout
│   ├── user_guide_ui.R          <- User documentation page layout
│   ├── wes_additional_ui.R      <- Additional WES analysis page layout
│   └── wes_variant_ui.R         <- WES variant analysis page layout
│
├── modules/                     <- Reusable UI and server modules
│   ├── dt_mod.R                 <- Enhanced DataTable components
│   ├── enrichr_mod.R            <- Pathway enrichment analysis
│   ├── fusion_filter_mod.R      <- RNA fusion filtering
│   ├── gene_info_mod.R          <- Gene annotation services
│   ├── gene_search_mod.R        <- Gene search functionality
│   ├── meta_plots_mod.R         <- Clinical metadata visualization
│   ├── profile_mod.R            <- Team photo and social media display
│   ├── reactable_mod.R          <- Modern interactive tables
│   ├── variant_filter_mod.R     <- Genomic variant filtering
│   └── volcano_mod.R            <- Interactive volcano plots
│
├── data/                        <- Sample datasets
│   ├── app_data_pack_*.rds      <- Main application datasets
│   └── ptc_onco_obj_list_*.rds  <- Oncoplot object data
│
├── R/                           <- Utility functions
│   ├── load_components.R        <- Component loading functions
│   └── utils.R                  <- General utility functions
│
├── docs/                        <- Documentation files
│   ├── DYNAMIC_DATA_LOADING.md  <- Dynamic data loading guide
│   ├── LINTING_GUIDE.md         <- Code linting and formatting guide
│   ├── MODULES_COMPONENTS.md    <- Module and component reference
│   ├── TECHNICAL_REFERENCE.md   <- Developer technical reference
│   └── USER_GUIDE.md            <- Comprehensive user guide
│
├── www/                         <- Static web assets
│   ├── css/                     <- Stylesheets
│   ├── img/                     <- Images and figures
│   └── js/                      <- JavaScript files
│
└── Dockerfile                   <- For containerization

Contributing

We welcome contributions! See the docs for guidelines.

Author

Samuel Bharti 📧 | Graduate Research Assistant

About

Pediatric Thyroid Cancer Explorer - A web application to explore PTC dataset

Topics

Resources

License

Contributing

Stars

2 stars

Watchers

3 watching

Forks

Packages

 
 
 

Contributors