How to generate dotplot for gene expression data differential gene expression analysis ?
1
0
Entering edit mode
4.4 years ago
sunnykevin97 ▴ 990

Hi Can any one show some good dot-plots showing the differential gene expression analysis for up/down regulated genes. I tried cluster profile, its not working for my data. Some other way how to generate good interpretation dotplots. Suggestions.

RNA-Seq • 4.0k views
ADD COMMENT
0
Entering edit mode
ADD REPLY
2
Entering edit mode
4.4 years ago

Hi,

The question is a bit ambigous. What do you want to plot precisely?

For instance you can use ggplot2 to do the doplot if you retrieve and tidy the data properly. Although depending on what do you want to plot on the dotplot (x and y axis) or providing an example together with the example data that you have, it's hard to elaborate more.

The following code makes a dotplot on the top n differently expressed genes. Though this is only the plot. Before I retrieved the most differently expressed gene names from a differently expressed gene table (obtained with edgeR or DESeq2) and I retrieved the normalized gene counts for these gene names (from a gene expressed table normalized) in order to plot the gene normalized counts per sample of the top n differently expressed genes. The y-axis is scaled by log10 and the different top n genes appeared by facet:

      ggplot( dge_df, aes( x = Samples, y = Counts, color = Condition, fill = Condition ) ) +
      geom_point() + 
      facet_wrap( ~ GeneID ) + 
      scale_y_log10() + ylab("Counts") + 
      #theme_bw() +
      theme(axis.text.x = element_text(angle = 90, hjust = 1, vjust = 0.5)) + 
      ggtitle( paste0("Top ", topUp_len, " upregulated genes") )

Have a look into the result:

dot-plot-example

I hope this helps,

António

ADD COMMENT
0
Entering edit mode

I'm looking for a dot plot something like this which has given in cluster profile manual section 11.2 https://yulab-smu.github.io/clusterProfiler-book/chapter11.html#visualization-of-profile-comparison explains both the up and down regulation genes. Thanks for the plot.

ADD REPLY
1
Entering edit mode

Hi,

To do a dotplot like that you can try something like this:

dot_plot <- ggplot(data = data, 
               aes( x = factor(genes), y = factor(samples)) ) + 
 geom_point(aes(size = GeneRatio, color = p.adjust)) + 
 theme_bw() +
 theme( panel.grid.major=element_blank(), 
     panel.grid.minor=element_blank(), 
     axis.text = element_text(size = 12, color = "black"), 
     axis.title = element_text(size = 12), 
     legend.text = element_text(size = 12)) + 
 scale_colour_gradient2(low = "blue", high = "red") +
 ylab("") + 
 xlab("") + 
 coord_flip() + 
 scale_y_discrete(position = "right")

Still, the main issue is to retrieve and tidy the data properly to input in ggplot2. This plot is putting the x-axis (that actually is the y-axis) on the top of the plot. It may need further improvement to adjust to your data frame and taste.

I hope this is what you're looking for.

António

ADD REPLY
0
Entering edit mode

Yes, helpful I'll try on my data and update you.Thanks.

ADD REPLY

Login before adding your answer.

Traffic: 1940 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