This is the function to do pathway enrichment analysis (and visualization) with rWikipathways (also KEGG, REACTOME & Hallmark) from a summary statistics table generated by
differential expression analysis like limma
or DESeq2
.
plot_pathway(
data = ~df,
comp.names = NULL,
gene.id.type = "ENSEMBL",
FC.cutoff = 1.3,
FDR.cutoff = 0.05,
FCflag = "logFC",
FDRflag = "adj.P.Val",
Fisher.cutoff = 0.1,
Fisher.up.cutoff = 0.1,
Fisher.down.cutoff = 0.1,
plot.save.to = NULL,
pathway.db = "rWikiPathways",
customized.pathways = NULL,
...
)
A summary statistics table (data.frame) or data.list
generated by DE analysis software like limma or DEseq2, where rownames are gene id.
A character vector containing the comparison names corresponding to the same order of the data.list
. Default = NULL.
The gene id format in data
should be one of: ACCNUM, ALIAS, ENSEMBL, ENSEMBLPROT,
ENSEMBLTRANS, ENTREZID, ENZYME, EVIDENCE, EVIDENCEALL, GENENAME, GO, GOALL, IPI, MAP, OMIM,
ONTOLOGY, ONTOLOGYALL, PATH, PFAM, PMID, PROSITE, REFSEQ, SYMBOL, UCSCKG, UNIGENE, UNIPROT.
The fold change cutoff (numeric) selected to subset summary statistics table. Default = 1.5.
The FDR cutoff selected (numeric) to subset summary statistics table. Default = 0.05.
The column name (character) of fold change information, assuming the FC is log2 transformed. Default = "logFC".
The column name (character) of adjusted p value or FDR. Default = "adj.P.Val".
The FDR cutoff selected (numeric) for the pathway enrichment analysis' Fisher's exact test with all determined
Differentially Expressed (DE) genes by FC.cutoff
and FDR.cutoff
.
The FDR cutoff selected (numeric) for the pathway enrichment analysis' Fisher's exact test with the upregulated gene set.
The FDR cutoff selected (numeric) for the pathway enrichment analysis' Fisher's exact test with the downregulated gene set.
The address to save the plot from simplified cutoff combination with FDR of 0.01, 0.05, 0.1, and 0.2.
The databse to be used for encrichment analysis. Can be one of the following, "rWikiPathways", "KEGG", "REACTOME", "Hallmark","rWikiPathways_aug_2020".
the customized pathways in the format of two column dataframe (column name as "gs_name" and "entrez_gene") to be used in analysis.
pass on variables
The function returns a list of 5 objects:
result table from directional pathway enrichment analysis
result table from non-directional pathway enrichment analysis
plot from directional pathway enrichment analysis
plot from non-directional pathway enrichment analysis
plot combining both directional and non-directional plot
The function takes the summary statistics table and use user selected parameter based on check.cutoff to do pathway enrichment analysis
Xingpeng Li & Siddhartha Pachhai RVA - RNAseq Visualization Automation tool.
# NOT RUN {
result <- plot_pathway(data = Sample_summary_statistics_table,
gene.id.type = "ENSEMBL",
FC.cutoff = 1.5,
p.cutoff = 0.05,
pathway.db = "rWikiPathways_aug_2020"
)
# }
Run the code above in your browser using DataLab