HeatmapCNR | R Documentation |
Wrapper function to the ultra-powerful ComplexHeatmap. It implements Bray-Curtis dissimilarity as the distance metric for clustering cells, and 'ward.D2' from 'hclust'. Bray-Curtis disimilarity is extensively used in Ecology for clustering comunities.
HeatmapCNR(cnr, what = "X", which.genes = NULL, show_row_dend = FALSE, ...)
cnr |
the CNR bundle |
what |
wether you want to plot bins or genes |
which.genes |
IF you chose genes, you need to specify which ones |
show_row_dend |
weather to show the row dendrogram, default is FALSE, |
... |
additional parameters from Heatmap |
If you prefer to use a different method, you can use the native Heatmap function. E.g. if you prefer genomic bins to cluster, and show a dendrogram when plotting X. By default bins are kept in chromosome order, however, when plotting genes, rows are cells, and these are clustered.
For convenience, GAC comes with several color palettes as part of the data. To use any of these run 'data(segCol)' for example. There are the different color palettes such as:
* segCol for segmentation colors: loss and deletions in blue and yellow, respectively, 2 in white, gains and amplifications in red to gray scale
* lowCol for log2 ratio colors: blue-to-red scale from -2 to +2
* ampCol for amplification : yellow to red scale from 0 to Inf.
* fgaCol for Fraction of genome altered: from 0 to 1 light yellow to 1 in blue
* ploidyCol for ploidy : gradient of purples starting at 1.5
* ccClustCol : yellow to blue from 0 to 1 for co-clustering frequencies
Returns a simple ComplexHeatmap plot clustered using Bray-Disimilarity with vegan::vegdist, and sorted by chromosome location. Several color scales are provided in the package, see segCol, lowCol, ampCol, fgaCol, and ploidyCol. These are useful for setting additional rowAnnotation and HeatmapAnnotations. A default chromosome color palette was left out as different organisms have different chromosome numbers and naming conventions.
For custumizing your heatmap, please visit the ComplexHeatmap documentation:
https://jokergoo.github.io/ComplexHeatmap-reference/book/
## load example data(cnr) ## load color map for segment colors data(segCol) HeatmapCNR(cnr, col = segCol) HeatmapCNR(cnr, col = segCol, what = "genes", which.genes = c("CDK4", "MDM2"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.