Author: Alan O’Callaghan (alan.b.ocallaghan@gmail.com)
Due to the size of the objects, this file is seperated to three fils. You can view this series in the following links:
This is file 3 in the series.
# Let's load the packages
library(heatmaply)
#> Loading required package: plotly
#> Loading required package: ggplot2
#>
#> Attaching package: 'plotly'
#> The following object is masked from 'package:ggplot2':
#>
#> last_plot
#> The following object is masked from 'package:stats':
#>
#> filter
#> The following object is masked from 'package:graphics':
#>
#> layout
#> Loading required package: viridis
#> Loading required package: viridisLite
#>
#> ---------------------
#> Welcome to heatmaply version 0.11.1
#> Type ?heatmaply for the main documentation.
#> The github page is: https://github.com/talgalili/heatmaply/
#>
#> Suggestions and bug-reports can be submitted at: https://github.com/talgalili/heatmaply/issues
#> Or contact: <tal.galili@gmail.com>
#>
#> To suppress this message use: suppressPackageStartupMessages(library(heatmaply))
#> ---------------------
library(heatmaplyExamples)
Following normalization, gene expression patterns appear roughly similar. This indicates that relative expression levels have not been altered unduly. Furthermore, slightly increased concordance with the pre-assigned cluster labels is observed in normalized data. Samples appear to cluster based Sample-sample correlation appears to show less concordance with row annotations than clustering based on gene expression. However, the use of different linkage criteria or distance measures may alter the observed clusters.
pam50_genes <- intersect(pam50_genes, rownames(voomed_expression))
center_voom_mat <- voomed_expression[pam50_genes, ] -
apply(voomed_expression[pam50_genes, ], 1, median)
voom_max <- max(abs(center_voom_mat))
voom_limits <- c(-voom_max, voom_max)
heatmaply(t(center_voom_mat),
row_side_colors=tcga_brca_clinical,
fontsize_col = 7.5,
showticklabels = c(TRUE, FALSE),
col = cool_warm(50),
limits = voom_limits,
main = 'Normalised, centred log2 CPM, PAM50 genes',
plot_method = 'plotly')
heatmaply_cor(cor(center_voom_mat),
row_side_colors = tcga_brca_clinical,
showticklabels = c(FALSE, FALSE),
main = 'Sample-sample correlation based on centred, normalised PAM50 gene expression',
plot_method = 'plotly')