How to visualise differential expression analysis
2
0
Entering edit mode
4 weeks 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 • 314 views
ADD COMMENT
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?

ADD REPLY
0
Entering edit mode

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

ADD REPLY
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.

ADD REPLY
3
Entering edit mode
4 weeks 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()

enter image description here

ADD COMMENT
0
Entering edit mode
4 weeks ago

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

ADD COMMENT

Login before adding your answer.

Traffic: 2207 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6