Get startedGet started for free

DESeq2 visualizations - heatmap

NOTE: It may take a bit longer to load this exercise.

Visualizations can also be helpful in exploring the significant genes in more detail. The expression heatmap can be helpful in looking at how different the expression of all significant genes are between sample groups, while the expression plot can look at the top significant genes or choose individual genes of interest to investigate the expression levels between samplegroups.

This exercise is part of the course

RNA-Seq with Bioconductor in R

View Course

Exercise instructions

  • Subset the normalized counts to only include the significant genes. Use the row names of the smoc2_res_sig significant results to subset the normalized counts, normalized_counts_smoc2.

  • Create the heatmap using sig_norm_counts_smoc2. Color the heatmap using the palette, heat_colors, cluster the rows without showing row names, and scale the values by "row". For the annotation, use select() to select only the condition column from the smoc2_metadata.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Subset normalized counts to significant genes
sig_norm_counts_smoc2 <- ___[___(___), ]

# Choose heatmap color palette
heat_colors <- brewer.pal(n = 6, name = "YlOrRd")

# Plot heatmap
pheatmap(___, 
         color = ___, 
         cluster_rows = ___, 
         show_rownames = ___,
         annotation = ___(___, ___), 
         scale = ___)
Edit and Run Code