GO_GEM: Run g:profiler enrichment analysis

View source: R/GO.R

GO_GEMR Documentation

Run g:profiler enrichment analysis

Description

This function runs a g:profiler gost enrichment analysis on a query list of genes and export a complete results table, a .gem file for use with EnrichmentMap Cytoscape app, and a pdf of the top enriched and significant terms.

Usage

GO_GEM(
  geneList,
  species = "hsapiens",
  bg = NULL,
  source = NULL,
  corr = "fdr",
  iea = FALSE,
  ord = FALSE,
  prefix = "GO_analysis",
  ts = c(10, 500),
  pdf = TRUE,
  fig = TRUE,
  figCols = c("blue", "orange"),
  returnGost = FALSE,
  writeRes = TRUE,
  writeGem = FALSE,
  writeGene = FALSE,
  returnRes = FALSE
)

Arguments

geneList

A character vector or named list of genes to query. If a named list is provided, the name of each list element is appended to the prefix for GO output.

species

A character vector of the organism name to use. Concatenate the first letter of the name and family name. Default is 'hsapiens'

bg

A character vector describing the genes making up the background. Default NULL

source

A vector of data sources to use. Currently: GO (GO:BP, GO:MF, GO:CC), KEGG, REAC, TF, MIRNA, CORUM, HP, HPA, WP.

corr

A character vector describing the correction method to use. One of 'gSCS', 'fdr', or 'bonferroni'. Default is 'fdr'

iea

Boolean values indicating if electronic annotations should be excluded. Default FALSE.

ord

Boolean indicating if ranked GO analysis should be performed. Default=FALSE.

prefix

A character vector describing the path and prefix of the output files (should not include any file extensions)

ts

Vector of length 2 indicating the minimum and maximum term size - the minimum/maximum number of genes per term when generating the plot of most enriched/significant terms. Default is c(10,500).

pdf

Boolean indicating if bar plots should be exported to pdf. Default is TRUE.

fig

Boolean indicating if bar plots should be printed to R output. Default is TRUE.

figCols

Character indicating the RColorBrewer palette name or list of colours (hex, name, rgb()) to be used for enrichment and significance, respectively in the output figures. Default is c("blue","orange").

returnGost

Boolean indicating if gost results should be returned for future use with gprofiler2 functions. Default is FALSE.

writeRes

Boolean indicating if GO.txt results should be written to file 'prefix.GO.txt'

writeGem

Boolean indicating if gem.txt results should be written to file.

writeGene

Boolean indicating if gene.txt results should be written to file.

Value

Exports a table of analysis results in 'prefix.GO.txt', a gem file in 'prefix.gem', and a pdf with two figures: top ten enriched terms followed by top ten significant terms in 'prefix.top10.pdf'


kevincjnixon/BinfTools documentation built on July 10, 2024, 11:46 a.m.