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.framerepresenting gene set enrichment results.- pvalueCutoff
numericvalue range 0 to 1, to define the P-value threshold for enrichment results to be considered in downstream processing.- pAdjustMethod
characterstring to define the P-value adjustment method, or"none"for no additional adjustment. Seestats::p.adjust()for valid values.- keyColname
charactervalue of thecolnames(enrichDF)containing the unique row identifier. It can be a pathway_ID or any uniquely identifying value.- pathGenes
characteror value of thecolnames(enrichDF)containing the number of genes in each pathway. This value will be derived fromgeneRatioColnameif needed.- geneColname
charactervalue of thecolnames(enrichDF)containing delimiited genes in each pathway.- geneHits
charactervalue of thecolnames(enrichDF)containing the integer count of the gene hits in each pathway. This value will be derived fromgeneRatioColnameif needed.- geneRatioColname
charactervalue of thecolnames(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
characterregular expression pattern used to separate genes in thepathGenescolumn into a vector of character values.- geneSep
characterstring with separator to use for output genes. Only'/'is supported for mostenrichResultmethods.- pvalueColname, padjustColname, qvalueColname
charactervector to searchcolnames(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
enrichResultconvention.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
charactervector to searchcolnames(enrichDF), for pathway or gene set description.- readable
logicaldefault NULL, sets the 'readable' flag for the resultingenrichResultobject.- msigdbGmtT
optional 'GmtT' object (not currently implemented)
- verbose
logicalindicating whether to print verbose output.- ...
additional arguments are ignored.
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()