Learn R Programming

GOplot (version 1.0.2)

GOBubble: Bubble plot.

Description

The function creates a bubble plot of the input data. The input data can be created with the help of the circle_dat function.

Usage

GOBubble(data, display, title, colour, labels, ID = T, table.legend = T, table.col = T, bg.col = F)

Arguments

data
A data frame with coloumns for category, GO ID, term, adjusted p-value, z-score, count(num of genes)
display
A character vector. Indicates whether it should be a single plot ('single') or a facet plot with panels for each category (default='single')
title
The title (on top) of the plot
colour
A character vector which defines the colour of the bubbles for each category
labels
Sets a threshold for the displayed labels. The threshold refers to the -log(adjusted p-value) (default=5)
ID
If TRUE then labels are IDs else terms
table.legend
Defines whether a table of GO ID and GO term should be displayed on the right side of the plot or not (default = TRUE)
table.col
If TRUE then the table entries are coloured according to their category, if FALSE then entries are black
bg.col
Should only be used in case of a facet plot. If TRUE then the panel backgrounds are coloured according to the displayed category

Details

The x- axis of the plot represents the z-score. The negative logarithm of the adjusted p-value (corresponding to the significance of the term) is displayed on the y-axis. The area of the plotted circles is proportional to the number of genes assigned to the term. Each circle is coloured according to its category and labeled alternatively with the ID or term name.If static is set to FALSE the mouse hover effect will be enabled.

Examples

Run this code
## Not run: 
# #Load the included dataset
# data(EC)
# 
# #Building the circ object
# circ <- circular_dat(EC$david, EC$genelist)
# 
# #Creating the bubble plot colouring the table entries according to the category
# GOBubble(circ, table.col = T)
# 
# #Creating the bubble plot displaying the term instead of the ID and without the table
# GOBubble(circ, ID = F, table.legend = F)
# 
# #Faceting the plot
# GOBubble(circ, display = 'multiple')
# ## End(Not run)

Run the code above in your browser using DataLab