Create a histogram plot to plot geneset names / identifiers against their size.

gsHistogram(
  genesets,
  gs_names,
  start = 0,
  end = 0,
  binwidth = 5,
  color = "#0092AC"
)

Arguments

genesets

a list, A list of genesets where each genesets is represented by list of genes.

gs_names

character vector, Name / identifier of the genesets in genesets

start

numeric, Optional, describes the minimum gene set size to include. Defaults to 0.

end

numeric, Optional, describes the maximum gene set size to include. Defaults to 0.

binwidth

numeric, Width of histogram bins. Defaults to 5.

color

character, Fill color for histogram bars. Defaults to #0092AC.

Value

A ggplot2::ggplot() plot object.

Examples

## Mock example showing how the data should look like
gs_names <- c("a", "b", "c", "d", "e", "f", "g", "h")
genesets <- list(
  c("PDHB", "VARS2", "IARS2", "PDHA1"),
  c("AAAS", "ABCE1"), c("ABI1", "AAR2", "AATF"), c("AMFR"),
  c("BMS1", "DAP3"), c("AURKAIP1", "CHCHD1"), c("IARS2"),
  c("AHI1", "ALMS1")
)

p <- gsHistogram(genesets, gs_names, binwidth = 1)

## Example using the data available in the package
data(macrophage_topGO_example_small,
     package = "GeDi",
     envir = environment())
genes <- GeDi::getGenes(macrophage_topGO_example_small)
p <- gsHistogram(genes, macrophage_topGO_example_small$Genesets)