How to visualise differential expression analysis
2
0
Entering edit mode
16 months ago
rw579 • 0

Hiya, new here,

Im trying to decide how to visualise Deseq2 results. I want to plot the relationship between Log2 Fold change in expression against Base mean and/or gene length. I have the data for these parameters. Is there a cool graph type on ggplot that is purpose built for this kind of thing?

many thanks!

expression Differential RNAseq • 950 views
0
Entering edit mode

Are you looking for something like MAplot (log2fold vs normalized counts)?

And, I can't figure out why are you interested in plotting log2fold vs gene length, but probably are you looking for a corplot?

0
Entering edit mode

Note that EnhancedVolcano can make both the mentioned MA plots and volcano plots.

0
Entering edit mode

If thats what you want to plot just put Log2 fold change on one axis and your other variable on the other axis and use geom_point() to visualize the correlation.

3
Entering edit mode
16 months ago

Loosely related, I usually try to show the degree of overlap of the datapoints. A solution is a heatmap-like colour scheme with red meaning higher density of points. If any useful this is an example of code to do that:

library(ggplot2)

# Some simulated data
dge <- data.frame(
logFC= rnorm(20000),
logCPM= rnorm(20000)
)

# Assign colour to points according to density
dge$coldens <- densCols(dge$logCPM, dge\$logFC, colramp = colorRampPalette(rev(rainbow(10, end = 4/6))))

# Then plot as usual with base R. With ggplot set scale_color_identity
gg<- ggplot(data= dge, aes(x= logCPM, y= logFC)) +
geom_point(aes(logCPM, logFC, col = coldens), size = 0.5, shape= 20, stroke= 0, alpha= 1) +
scale_color_identity() +
theme_light() 0
Entering edit mode
16 months ago

Most people do volcano plots of fold change along the X, and the log of the padj along the Y.