Author

Alex Emmons, Ph.D.

Published

January 17, 2024

Modified

January 23, 2024

Volcano Quarto Demonstration

Here we will create a volcano plot from differential expression results.

Tip

Labels are ensembl IDs. For a more useful figure, add an annotation step.

Learn more about Volcano plots here.

Create a Volcano Plot from DESeq2 differential expression results

Load the libraries

Code
library(EnhancedVolcano)
library(dplyr)

Load the data from command line arguments

The data were filtered to remove adjusted p-values that were NA; these were genes excluded by DESeq2 as a part of independent filtering.

Code
data<-read.csv(params$data,row.names=1) %>% filter(!is.na(padj))

Plot

Create label subsets for plotting.

Code
labs<-head(row.names(data),5)

Figure 1 allows us to identify which genes are statistically significant with large fold changes.

Code
EnhancedVolcano(data,
                title = "Enhanced Volcano with Airways",
                lab = rownames(data),
                selectLab=labs,
                labSize=3,
                drawConnectors = TRUE,
                x = 'log2FoldChange',
                y = 'padj')   
Figure 1: Enhanced Volcano Plot of bulk RNA-seq data from the package airway

Other files in this working directory:

Code
ls
GettingStarted_with_Quarto.html
GettingStarted_with_Quarto.html.md
GettingStarted_with_Quarto.qmd
GettingStarted_with_Quarto_files
GettingStarted_with_Quarto_mkdocs.md
GettingStarted_with_Quarto_orig.html
Volcano_example.embed-preview.html
Volcano_example.embed_files
Volcano_example.html
Volcano_example.qmd
Volcano_example.rmarkdown
Volcano_example_files
deseq2_DEGs.csv
images