Question: How to generate dotplot for gene expression data differential gene expression analysis ?
0
gravatar for sunnykevin97
5 weeks ago by
sunnykevin9750
sunnykevin9750 wrote:

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 • 150 views
ADD COMMENTlink modified 5 weeks ago by antonioggsousa920 • written 5 weeks ago by sunnykevin9750

Cross-posted: https://support.bioconductor.org/p/132369/

ADD REPLYlink written 5 weeks ago by Kevin Blighe63k
2
gravatar for antonioggsousa
5 weeks ago by
antonioggsousa920 wrote:

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 COMMENTlink modified 5 weeks ago by genomax87k • written 5 weeks ago by antonioggsousa920

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 REPLYlink written 5 weeks ago by sunnykevin9750
1

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 REPLYlink modified 5 weeks ago • written 5 weeks ago by antonioggsousa920

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

ADD REPLYlink modified 5 weeks ago • written 5 weeks ago by sunnykevin9750
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 695 users visited in the last hour