plot.term_enrichment_by_subset: plot.term_enrichment_by_subset

Description Usage Arguments Value Examples

View source: R/lib_enrichment.R

Description

plot.term_enrichment_by_subset

Usage

1
2
3
4
5
6
7
8
## S3 method for class 'term_enrichment_by_subset'
plot(x, show_values = TRUE,
  annotation_matrix = NA, low = "white", high = "#2166AC",
  return_ggplot_object = FALSE, label_size_x = 16, label_angle_x = -30,
  label_size_y = 9, wrap_y_labels = 20, grid_line_color = "white",
  mid = 0, cap = NA, annotation_palates = c("Reds", "Greens", "Purples",
  "Greys", "BuPu", "RdPu", "BrBG", "PiYG", "Spectral"),
  annotation_legend_x = -0.3, ...)

Arguments

x

data frame returned by term_enrichment_by_subset

show_values

True or False, plot values on the heatmap

annotation_matrix

a matrix() of group-levle characteristics - same number of columns as "m"

low

color for low end of range

high

color for high end of range

return_ggplot_object

logical flag (default FALSE) that if TRUE, the ggplot object for the plot is returned

label_size_x

size of text for x label. Default lable_size_x=16

label_angle_x

angle for text for x label. Default is -30 degrees

label_size_y

size of text for y label. Default label_size_y=9

wrap_y_labels

Number of characters to wrap row labels

grid_line_color

color o grid lines between cells. Default is white.

mid

sets lower threshold for color scale

cap

Clip numeric values to this maximum threshold

annotation_palates

Color palates (RColorBrewer) used for each row of the annotation matrix

annotation_legend_x

offset for placing the legend

...

further areguments are not used at this time. If the user wants to modify the plot, use return_ggplot_object = TRUE.

Value

silent return, unless return_ggplot_object==TRUE. Then, the ggplot object for the plot is returned.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Create list of gene sets to evaluate.
##   This example is from a vaccine study where we pre-generated differentially expressed genes.
##   This object will be passed to the groups parameter.
require(RITANdata)
vac1.de.genes <- list(vac1.day0vs31.de.genes, vac1.day0vs56.de.genes)
names(vac1.de.genes) <- c("Day0vs31", "Day0vs56")
print(str(vac1.de.genes))

## Not run: 
## Run term_enrichment_by_subset on the two results.
##   This function usually takes a few seconds to a minute to run.
m <- term_enrichment_by_subset(groups = vac1.de.genes, q_value_threshold = .9)
summary(m)
plot( m, label_size_y = 4, show_values = FALSE )

## End(Not run)

RITAN documentation built on Nov. 8, 2020, 8:16 p.m.