The shape of the graph outputed by REVIGO is broken.
1
0
Entering edit mode
3.1 years ago
Riku ▴ 80

Hi all.

I'm performing GO enrichment analysis in de novo RNAseq analysis.

So, I created a graph with REVIGO and outputed it in R using script exported by REVIGO. But the shape of outputed graph was broken, and the position of value and log_size were reversed.

Why do I get different output even though I use the same script? Is there any way to fix this?

I really appreciated in advanceenter image description here!

GO ggplot2 Enrichment_analysis REVIGO • 1.6k views
ADD COMMENT
4
Entering edit mode
3.1 years ago

I've had the same problem recently! I think some publications just screenshot the default output.

The rrvgo package can make a similar plot using the scatterPlot() function: http://www.bioconductor.org/packages/release/bioc/vignettes/rrvgo/inst/doc/rrvgo.html

My own modified R-code based on revigo looks more like this (currently :) ). There are three comments in there where you should customise stuff.

  # data loading here
  library(tidyverse) 
  names(dat) <- c("term_ID","description","frequency", 'plot_X', 'plot_Y', 'log_size', 'value', 'uniqueness', 'dispensability', 'eliminated', 'representative')
  one.data <- dat

  one.data <- one.data [(one.data$plot_X != "null" & one.data$plot_Y != "null") & (! is.na(one.data$frequency)) & (one.data$value != 'null'), ];
  one.data <- type_convert(one.data)

  p1 <-
    ggplot(data = one.data, aes(plot_X, plot_Y, label = description)) +
    geom_point(aes(colour = log(value), size = log_size), alpha = I(0.6)) + # to revert color and size, change the two arguments here
    scale_size_area() +
    scale_colour_gradientn(colours = col_pal, # whatever col_palette you like 
                           limits = c(min(log(one.data$value)), 0)) +
    geom_point(
      aes(plot_X, plot_Y, size = log_size),
      shape = 21,
      fill = "transparent",
      colour = I (alpha ("black", 0.6))
    ) +
    scale_size_area() +
    geom_label_repel(max.overlaps = 5, box.padding = 0.5, # play with max.overlaps to get more or fewer text-boxes
                     aes(point.size = log_size)) +
    theme_minimal() +
    labs(y = "Semantic space x",
         x = "Semantic space y",
         color = 'Log(p-value)',
         size = 'Frequency') +
    theme(
      axis.text.x = element_blank(),
      axis.ticks.x = element_blank(),
      axis.text.y = element_blank(),
      axis.ticks.y = element_blank()
    )
  p1
ADD COMMENT
0
Entering edit mode

Sorry for late reply. I'm relieved that you have a solution. I try to use your command before I use screenshots.

Thank you very much for your help!

ADD REPLY

Login before adding your answer.

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