Get startedGet started for free

DE analysis

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

We are going to continue using the full dataset comparing the genes that exhibit significant expression differences between normal and fibrosis samples regardless of genotype (design: ~ genotype + condition). Therefore, we will use our dds_all DESeq2 object created in the previous exercise. Assume this object is created and all libraries are loaded. In this exercise let's perform the unsupervised clustering analyses to explore the clustering of our samples and sources of variation.

This exercise is part of the course

RNA-Seq with Bioconductor in R

View Course

Exercise instructions

  • Log transform the normalized counts inside the dds_all object using the vst() function, being blind to sample group information.

  • Create the correlation heatmap of the correlation values of the log normalized counts using the pheatmap() function. Include annotation bars for genotype and condition.

  • Plot the PCA with the plotPCA() function using vsd_all. Color the plot by condition.

  • Plot the PCA with the plotPCA() function using vsd_all. Color the plot by genotype.

Hands-on interactive exercise

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

# Log transform counts for QC
vsd_all <- ___(___, blind = ___)

# Create heatmap of sample correlation values
vsd_all %>% 
        ___() %>%
        ___() %>%
        ___(annotation = select(all_metadata, c("___", "___")))

# Create the PCA plot for PC1 and PC2 and color by condition       
___(___, ___ = ___)

# Create the PCA plot for PC1 and PC2 and color by genotype       
___(___, ___ = ___)
Edit and Run Code