printEnrich: printEnrich

View source: R/functions.R

printEnrichR Documentation

printEnrich

Description

Print Enrichr results

Usage

printEnrich(
  data,
  prefix = "enrichr",
  showTerms = NULL,
  columns = c(1:9),
  write2file = TRUE,
  outFile = c("txt", "excel")
)

Arguments

data

(Required). Output list object from the "enrichr" function.

prefix

(Optional). Prefix of output file. Default is "enrichr".

showTerms

(Optional). Number of terms to show. Default is NULL to print all terms.

columns

(Optional). Columns from each entry of data. Default is c(1:9) to print all columns. 1-"Term", 2-"Overlap", 3-"P.value", 4-"Adjusted.P.value" 5-"Old.P.value", 6-"Old.Adjusted.P.value" 7-"Odds.Ratio" 8-"Combined.Score" 9-"Combined.Score"

write2file

(Optional). Set to TRUE if you would like this functino to output a file

outFile

(Optional). Output file format, choose from "txt" and "excel". Default is "txt".

Details

Print Enrichr results from the selected gene-set libraries to individual text files.

Author(s)

Wajid Jawaid wj241@alumni.cam.ac.uk

I-Hsuan Lin i-hsuan.lin@manchester.ac.uk

Examples

if (getOption("enrichR.live")) {
  enrichRLive <- TRUE
  dbs <- listEnrichrDbs()
  if(is.null(dbs)) enrichRLive <- FALSE
  dbs <- c("GO_Molecular_Function_2018", "GO_Cellular_Component_2018",
           "GO_Biological_Process_2018")
  enriched <- enrichr(c("Runx1", "Gfi1", "Gfi1b", "Spi1", "Gata1", "Kdr"), dbs)
  if (enrichRLive) printEnrich(enriched, write2file = FALSE)
}

enrichR documentation built on April 14, 2023, 5:14 p.m.