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
.
Cet exercice fait partie du cours
RNA-Seq with Bioconductor in R
Instructions
- Transform the normalized counts from the
dds_smoc2
object using thevst()
function with theblind
argument and save tovsd_smoc2
. - Extract the matrix of transformed normalized counts from the
vsd_smoc2
object using theassay()
function and save asvsd_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 designatingcondition
from thesmoc2_metadata
data frame.
Exercice interactif pratique
Essayez cet exercice en complétant cet exemple de code.
# Transform the normalized counts
vsd_smoc2 <- ___(___, ___)
# Extract the matrix of transformed counts
vsd_mat_smoc2 <- ___(___)
# Compute the correlation values between samples
vsd_cor_smoc2 <- ___(___)
# Plot the heatmap
___(___, annotation = select(___, ___))