Prepare the data for the gsHistogram() by generating a data.frame which maps geneset names / identifiers to the size of their size.

buildHistogramData(genesets, gs_names, start = 0, end = 0)

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.

Value

A data.frame mapping geneset names to sizes

Examples

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

p <- buildHistogramData(genesets, gs_names)

## 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 <- buildHistogramData(genes, macrophage_topGO_example_small$Genesets)