Learn R Programming

enrichR (version 3.4)

printEnrich: printEnrich

Description

Print Enrichr results

Usage

printEnrich(
  data,
  prefix = "enrichr",
  showTerms = NULL,
  columns = c(1:9),
  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. * Results without background: 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". * In results with background, the second column is "Rank" if terms are not identical with those annotated in the Enrichr GMT files

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 or a Excel spreadsheet.

Examples

Run this code
# data(input) # Load example input genes
# if (getOption("enrichR.live")) {
#   enrichRLive <- TRUE
#   dbs <- listEnrichrDbs()
#   if(is.null(dbs)) enrichRLive <- FALSE
#   dbs <- c("GO_Molecular_Function_2023", "GO_Cellular_Component_2023",
#            "GO_Biological_Process_2023")
#   enriched <- enrichr(input, dbs)
#   print(head(enriched[[1]]))
#   # if (enrichRLive) printEnrich(enriched, outFile = "excel")
# }

Run the code above in your browser using DataLab