This app generates heatmap figures, which are commonly used for showing gene expression data, as shown in the example below:
It uses R shiny to build the app and the pheatmap package to construct the figures. You can choose the parameters you want for your heatmap (Such as: Distance method, clustering method, color palettes, font size).
The input must be a .txt file containing a numeric matrix with the name of lines and columns, like this:
sample1 sample2 sample3 sample4
gene1 0.21 0.42 0.24 0.31
gene2 0.12 0.33 0.16 0.35
gene3 0.24 0.64 0.25 0.83
gene4 0.8 0.33 0.41 0.92
gene5 0.30 0.98 0.22 0.55
gene6 0.42 0.54 0.66 0.23
gene7 0.21 0.38 0.24 0.18
gene8 0.11 0.23 0.61 0.53
gene9 0.49 0.77 0.87 0.38
Please check the example input file here
- You will need to have R and Rstudio free IDE installed in your computer.
- The app uses a few R packages: shiny (to build the app), pheatmap (to create the heatmaps), gplots and Rcolorbrewer (for the color palletes). To install these packages, open Rstudio, type the following command in the Console tab and hit enter:
install.packages(c("shiny", "pheatmap", "gplots", "Rcolorbrewer"))
- Open the heatmap_app.R file in R studio. Click on the Run app button. You will see the app in a new window.
- Click on the browse button on the left to add your input file, making sure it is a .txt and it is formated as described above. You will see the heatmap figure, built using standard parameters, on the right panel.
- You can now change the parameters on the left panel, and see the resulting figure on the right panel.
- Once you are satisfied with the result, you can click on the Export.png button on the bottom left to export your figure as a .png file. Save it wherever you want on your computer. The resolution of this image is 300 dpi.