ndcn / omicser

The NDCN omics browser app for browsing and sharing general omics data.
https://ndcn.github.io/omicser
Other
3 stars 3 forks source link

X11 dependency for raster images #86

Open ergonyc opened 3 years ago

ergonyc commented 3 years ago

In order to make the visualizaitons more performant we needed to use rasterization.

On Mac OS X if you use RStudio or R from the terminal, you must have a copy of XQuartz, the X11 window manager, installed. This is no longer a default install since Mac OS X 10.8. You need to install XQuartz, before installing the omicser package (dependency via ComplexHeatmaps and magick). Logout and login for the installation to take effect. You can get it from https://www.xquartz.org/. This page is also linked from the Download R for (Mac) OS X page.

ergonyc commented 3 years ago

from [ComplexHeatmap-book](https://jokergoo.github.io/ComplexHeatmap-reference/book/a-single-heatmap.html#heatmap-as-raster-image

Rasterization is a way to covnert the vector graphics into a matrix of colors. In this case, an image is represented as a matrix of RGB values, which is called a raster image. If the heatmap is larger than the size of the screen or the pixels that current graphics devices can support, we can convert the heatmap and reduce it, by saving it in a form of a color matrix with the same dimension as the device.

ergonyc commented 2 years ago

Need to change the code in fct_expression.R to test if X11 is available, and if it is use rasterization. else NOT.