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,
col = NULL,
base.ploidy = 2,
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 |
col |
optional color map, if NULL colors are dependent on the sample ploidy: For base.ploidy = 2; values are 0 = yellow, 1 = blue, 2 = white, 3-10 reds, >10 greyscale For base.ploidy = 4; values are a <4 = dark to light blues, 4 = yellow, >4 = light to dark reds if cnr$bulk = TRUE, ratios are blue, white, and red. |
base.ploidy |
base ploidy, values must be 2 or 4. Defaults to 2. Ignored if setting color pallete |
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.
Returns a simple ComplexHeatmap plot clustered using Bray-Disimilarity with vegan::vegdist, and sorted by chromosome location.
For custumizing your heatmap, please visit the ComplexHeatmap documentation:
https://jokergoo.github.io/ComplexHeatmap-reference/book/
## load example
data(cnr)
HeatmapCNR(cnr)
HeatmapCNR(cnr, 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.