Skip to contents

Convert data.frame to enrichResult

Usage

enrichDF2enrichResult(
  enrichDF = NULL,
  pvalueCutoff = 1,
  pAdjustMethod = "none",
  keyColname = c("itemsetID", "ID", "Name", "Pathway"),
  pathGenes = "pathGenes",
  geneColname = c("geneNames", "geneID", "Gene", "Genes"),
  geneHits = "geneHits",
  geneRatioColname = c("GeneRatio", "^Ratio"),
  geneDelim = "[,/ ]+",
  geneSep = "/",
  pvalueColname = c("P.Value", "Pvalue", "Pval", "FDR", "adj.P.Val"),
  padjustColname = c("p.adjust", "p.adjusted", "padjust", "adjp", "adj.P.Val", "FDR"),
  qvalueColname = c("Q.Value", "Qvalue", "qval", "FDR"),
  descriptionColname = c("Description", "Name", "Pathway", "ID"),
  readable = NULL,
  msigdbGmtT = NULL,
  verbose = FALSE,
  ...
)

Arguments

enrichDF

data.frame representing gene set enrichment results.

pvalueCutoff

numeric value range 0 to 1, to define the P-value threshold for enrichment results to be considered in downstream processing.

pAdjustMethod

character string to define the P-value adjustment method, or "none" for no additional adjustment. See stats::p.adjust() for valid values.

keyColname

character value of the colnames(enrichDF) containing the unique row identifier. It can be a pathway_ID or any uniquely identifying value.

pathGenes

character or value of the colnames(enrichDF) containing the number of genes in each pathway. This value will be derived from geneRatioColname if needed.

geneColname

character value of the colnames(enrichDF) containing delimiited genes in each pathway.

geneHits

character value of the colnames(enrichDF) containing the integer count of the gene hits in each pathway. This value will be derived from geneRatioColname if needed.

geneRatioColname

character value of the colnames(enrichDF) containing the character ratio of gene hits to pathway size, in format "50/100". This value is used when either "pathGenes" or "geneHits" are not supplied.

geneDelim

character regular expression pattern used to separate genes in the pathGenes column into a vector of character values.

geneSep

character string with separator to use for output genes. Only '/' is supported for most enrichResult methods.

pvalueColname, padjustColname, qvalueColname

character vector to search colnames(enrichDF), with enrichment P-value, adjusted P-value, and Q-value, respectively.

  • The P-value is stored in 'pvalue' in the output object, to match enrichResult convention.

  • When there is no adjusted P-value column matched, by default it uses the P-value without change, since some downstream methods require 'p.adjust' exists.

  • When there is no Q-value column matched, by default it uses the adjusted P-value column value 'p.adjust' without change. Note that the 'p.adjust' may also contain the value from 'pvalue' as described above.

descriptionColname

character vector to search colnames(enrichDF), for pathway or gene set description.

readable

logical default NULL, sets the 'readable' flag for the resulting enrichResult object.

msigdbGmtT

optional 'GmtT' object (not currently implemented)

verbose

logical indicating whether to print verbose output.

...

additional arguments are ignored.

Value

enrichResult object.

Details

This function takes a data.frame containing gene set enrichment results, and converts it to a proper enrichResult`` object defined in DOSEfor R-4.5 and older, orenrichit` for R-4.6 and newer.

This object is supported by other functions in the clusterProfiler suite of tools.

See also

Other jam import functions: IPAlist_to_hits(), importIPAenrichment()

Other jam conversion functions: cnet2df(), cnet2im(), enrichList2IM(), enrichList2df()