Skip to content

SidhuK/metaboheatmap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MetaboHeatMap

A R/Shiny based app for visualizing metabolomics data through heatmaps

GitHub last commit DOI

Available online at here or locally using the source code in this repository.

MetaboHeatMap The Shiny App Home Page

Introduction

MetaboHeatMap is a R/Shiny based app for visualizing metabolomics data through heatmaps. It is designed specifically to be used for small to medium sized metabolomics datasets (<=500 compounds for best results) .Ideally, the data is normalized and filtered before being used in the app. The app can be used in two ways:

  1. Online: The app is available online at here. The app is hosted on a free account and may be slow at times. The app is also limited to 25 concurrent users. If you are unable to access the app, please try again later, or contact me on Twitter or Mastodon and I will try my best to resolve the issue.

  2. Locally: The app can be run locally using the source code in this repository. Any IDE configured to run R/Shiny apps can be used.

Example Heatmaps

Features

This R/Shiny based app is designed to be used for visualizing metabolomics data through heatmaps. It is based on the PHeatMap Package and uses the Shiny Package to create a web app interface. In its current release, the app has the following features:

  • Heatmap Generation: The app can be used to generate heatmaps from metabolomics data.
  • Clustering: The app can be used to cluster the samples and compounds/metabolites in the heatmap.
    • The major clustering algorithms supported by the app are:
      • Correlation
      • Euclidean
      • Manhattan
      • Maximum
      • Canberra
      • Binary
    • Sample Clustering: The app can be used to cluster the samples in the heatmap.
    • Compound Clustering: The app can also be used to cluster the compounds/metabolites in the heatmap.
  • Color Schemes: The app can be used to select the color scheme for the heatmap.
  • Heatmap Size: The app can be used to select the size of the heatmap.
  • Display Cell Values: The app can be used to display the values corresponding to each cell in the heatmap.
  • Download Heatmap: The app can be used to download the heatmap as a high quality PNG image.
  • Heatmap Legend: The app can be used to display the legend for the heatmap.

Additionally, the app has some custom CSS Formatting to ensure it is responsive and can be used on any device with a web browser, including mobile devices, although desktops are recommended for best results.

Data Preprocessing & Upload

Before starting the app, the data must be preprocessed and uploaded to the app.

Data Preprocessing

The sample data provided in this repository and is a randomly generated dataset. The data is in the form of a comma-separated (CSV) text file and it is the only file format that is supported by the app for now.

The data must be in the following format:

  • The first column must be named 'compound' and contain the names of the compounds/metabolites. The names of the compounds must be unique, and the column heading is case sensitive.

  • The first row must be named 'sample' and contain the names of the samples. The names of the samples must be unique,

  • The remaining cells must contain the values of the metabolites for each sample. The values must be numeric.

  • The data must be in a rectangular format. That is, the number of columns must be equal to the number of samples, and the number of rows must be equal to the number of compounds/metabolites.

  • For best results, the data should be normalized and filtered before being used in the app. The app does not perform any normalization or filtering on the data.

Data Upload

To upload the data, simply click on the 'Browse' button on the home page of the app. This will open a file selection dialog box. Select the data file and click 'Open'. The app will then load the data for visualization.

Usage

Once the data is uploaded, you must then select the parameters for the heatmap. Once the parameters are selected, click on the 'Generate Heatmap' button to generate the heatmap. The heatmap generation could take from a few seconds to a few minutes depending on the size of the data and the parameters selected. Heatmap generated can be viewed and downloaded from the 'Heatmap' tab.

Online App

The app is available online at here. The app is hosted on a free account and may be slow at times. The app is also limited to 25 concurrent users. If you are unable to access the app, please try again later, or contact me on Twitter or Mastodon and I will try my best to resolve the issue.

Installation

To run the app locally:

  1. Clone the repository using the following command:
git clone https://github.com/SidhuK/metaboheatmap

or download the repository as a zip file and extract it.

  1. Open the project in RStudio or any other IDE configured to run R/Shiny apps.

  2. Install the required packages using the following command:

install.packages(c("shiny", "pheatmap"))
  1. Run the app using the following command:
shiny::runApp()
  1. The app will be available locally and can be accessed using the URL provided in the R console.

  2. Once the app starts, upload the data and proceed according to the instructions in the Usage section.

  3. To stop the app, press the 'Stop' button in the R console or simply close the R console.

License

This project is licensed under the MIT License - see the LICENSE file for details. This license applies to the source code of the app only. The data used in the app is randomly generated and is not licensed. The data is provided for demonstration purposes only, and should not be used for any other purpose.

Acknowledgments

The app uses the following packages:

Citation

If you use this app in your research, please use the following citation:

@software{karat_sidhu_2023_7631526,
  author       = {Karatatiwant Singh Sidhu},
  title        = {SidhuK/metaboheatmap: Version 1.0},
  month        = feb,
  year         = 2023,
  publisher    = {Zenodo},
  version      = {Shiny\_1},
  doi          = {10.5281/zenodo.7631526},
  url          = {https://doi.org/10.5281/zenodo.7631526}
}

Planned Features

This app is still in development and is not yet complete. The following features are planned for future releases:

  • Annotations
  • Data Filtering
  • Data Normalization
  • Font Size
  • More Color Schemes
  • Font Colors

The list of planned features is not exhaustive and may be updated at any time.

Contact

If you have any questions or suggestions, please contact me on Twitter or Mastodon. You can also open an issue on the GitHub Repository.