Session Ready
Exercise

Hierarchical heatmap by condition

When performing quality assessment of our count data, we need to transform the normalized counts for better visualization of the variance for unsupervised clustering analyses. To assess the similarity of the smoc2 samples using hierarchical heatmaps, transform the normalized counts and perform hierarchical clustering analysis. Assume all libraries have been loaded, the DESeq2 object created, and the size factors have been stored in the DESeq2 object, dds_smoc2.

Instructions
100 XP
  • Transform the normalized counts from the dds_smoc2 object using the vst() function with the blind argument and save to vsd_smoc2.
  • Extract the matrix of transformed normalized counts from the vsd_smoc2 object using the assay() function and save as vsd_mat_smoc2.
  • Calculate the correlation values between samples and save to vsd_cor_smoc2.
  • Create a heatmap of the correlation values using pheatmap() with an annotation bar designating condition from the smoc2_metadata data frame.