How to visualise differential expression analysis

2

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

• 188 views

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

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


Login
before adding your answer.



Source link