pathfindR
is an R package for pathway enrichment analysis of gene-level differential expression/methylation data utilizing active subnetworks. The package also enables hierarchical clustering of the enriched pathways. The method is described in detail in Ulgen E, Ozisik O, Sezerman OU. 2018. pathfindR: An R Package for Pathway Enrichment Analysis Utilizing Active Subnetworks. bioRxiv. https://doi.org/10.1101/272450
Our motivation to develop this package was that direct pathway enrichment analysis of differential RNA/protein expression or DNA methylation results may not provide the researcher with the full picture. That is to say; pathway enrichment of only the list of significant genes may not be informative enough to explain the underlying disease mechanisms.
An active subnetwork is defined as a group of interconnected genes in a protein-protein interaction network (PIN) that contains most of the significant genes. Therefore, these active subnetworks define distinct disease-associated sets of genes, whether discovered through differential expression analysis or discovered because of being in interaction with a significant gene.
Therefore, we propose to leverage information from a PIN to identify distinct active subnetworks and then perform pathway enrichment analyses on these subnetworks. Briefly, this workflow first maps the significant genes onto a PIN and finds active subnetworks. Next, pathway enrichment analyses are performed using each gene set of the identified active subnetworks. Finally, these enrichment results are summarized and returned as a data frame. This workflow is implemented as the function run_pathfindR()
and further described in the “Enrichment Workflow” section of this vignette.
This process usually yields a great number of enriched pathways with related biological functions. We therefore implemented a pairwise distance metric (as proposed by Chen et al. [1]) between pathways and based on this distance metric, also implemented hierarchical clustering of the pathways through a shiny app, allowing dynamic partitioning of the dendrogram into relevant clusters. Details of clustering and partitioning of pathways are presented in the “Pathway Clustering” section of this vignette.
The overview of the enrichment workflow is presented in the figure below:
For this workflow, the wrapper function run_pathfindR()
is used. This function takes in a data frame consisting of Gene Symbol
, log-fold-change
and adjusted-p values
. The first 6 rows of an example input dataset (of rheumatoid arthritis differential-expression) can be found below:
Gene.symbol | logFC | adj.P.Val |
---|---|---|
FAM110A | -0.6939349 | 0.0000034 |
RNASE2 | 1.3535210 | 0.0000101 |
S100A8 | 1.5448338 | 0.0000347 |
S100A9 | 1.0280904 | 0.0002270 |
TEX261 | -0.3236549 | 0.0002270 |
ARHGAP17 | -0.6919441 | 0.0002716 |
Executing the workflow is straightforward (but takes several minutes):
The user may want to change certain arguments of the function:
# to change the PIN (default = Biogrid)
result <- run_pathfindR(RA_input, pin_name = "IntAct")
# to use an external PIN of user's choice
result <- run_pathfindR(RA_input, pin_name = "/path/to/myPIN.sif")
# available gene sets are KEGG, Reactome, BioCarta, GO-BP, GO-CC and GO-MF
# default is KEGG
# to change the gene sets used for enrichment analysis
result <- run_pathfindR(RA_input, gene_sets = "BioCarta")
# to change the active subnetwork search algorithm (default = "GR", i.e. greedy algorithm)
# for simulated annealing:
result <- run_pathfindR(RA_input, search_method = "SA")
# to change the number of iterations (default = 10)
result <- run_pathfindR(RA_input, iterations = 5)
# to manually specify the number processes used during parallel loop by foreach
# defaults to the number of detected cores
result <- run_pathfindR(RA_input, n_processes = 2)
For a full list of arguments, see ?run_pathfindR
.
The workflow consists of the following steps :
After input testing, the program attempts to convert any gene symbol that is not in the PIN to an alias symbol that is in the PIN. Next, active subnetwork search is performed via the selected algorithm. The available algorithms for active subnetwork search are:
Next, pathway enrichment analyses are performed using the genes in each of the active subnetworks. For this, up-to-date information on genes contained in each human KEGG pathway was retrieved with the help of the R package KEGGREST
on Feb 26, 2018. These data are available in genes_by_pathway
and pathways_list
.
During enrichment analyses, pathways with adjusted-p values larger than the enrichment_threshold
(an argument of run_pathfindR()
, defaults to 0.05) are discarded. The results of enrichment analyses over all active subnetworks are combined by keeping only the lowest adjusted-p value for each pathway.
This process of active subnetwork search and enrichment analyses is repeated for a selected number of iterations (indicated by the iterations
argument of run_pathfindR()
), which is performed in parallel via the R package foreach
.
The wrapper function returns a data frame that contains the lowest and the highest adjusted-p values for each enriched pathway, as well as the numbers of times each pathway is encountered over all iterations. The first two rows of the example output of the pathfindR-enrichment workflow (performed on the rheumatoid arthritis data RA_output
) is shown below:
ID | Pathway | occurrence | lowest_p | highest_p | Up_regulated | Down_regulated |
---|---|---|---|---|---|---|
hsa03040 | Spliceosome | 10 | 1.10e-06 | 0.0000015 | SF3B6, LSM3, BUD31 | SNRPB, SF3B2, U2AF2, PUF60, HNRNPA1, PCBP1, SRSF5, SRSF8, SNU13, DDX23, EIF4A3 |
hsa05130 | Pathogenic Escherichia coli infection | 10 | 1.86e-05 | 0.0024737 | LY96, TLR5 | ABL1, ITGB1, TUBB, ACTB, ACTG1 |
The function also creates an HTML report results.html
that is saved in a directory named pathfindr_Results
in the current working directory. This report contains links to two other HTML files:
This document contains a table of the active subnetwork-oriented pathway enrichment results. Each enriched pathway name is linked to the visualization of that pathway, with the gene nodes colored according to their log-fold-change values. This table contains the same information as the returned data frame. Columns are:
This document contains a table of converted gene symbols. Columns are:
For this workflow, the wrapper function choose_clusters()
is used. This function first calculates the pairwise distances between the pathways in the input data frame, automatically determining the gene sets used for analysis. This step uses the distance metric described by Chen et al. [1]. Via a shiny app, presented as an HTML document, the hierarchical clustering dendrogram is visualized. In this HTML document, the user can select the agglomeration method and the distance value at which to cut the tree. The dendrogram with the cut-off value marked with a red line is dynamically visualized and the resulting cluster assignments of the pathways along with annotation of representative pathways (chosen by smallest lowest p value) are presented as a table. This table can be saved as a csv file by pressing the button Get Pathways w\ Cluster Info
.
# example run
choose_clusters(RA_output)
# to display the heatmap of pathway clustering
choose_clusters(RA_output, plot_heatmap = TRUE)
# to display the heatmap of pathway clustering
# and change agglomeration method (default = "average")
choose_clusters(RA_output, agg_method = "complete", plot_heatmap = TRUE)
[1] Chen YA, Tripathi LP, Dessailly BH, Nyström-persson J, Ahmad S, Mizuguchi K. Integrated pathway clusters with coherent biological themes for target prioritisation. PLoS ONE. 2014;9(6):e99030. 10.1371/journal.pone.0099030
[2] Ideker T, Ozier O, Schwikowski B, Siegel AF. Discovering regulatory and signalling circuits in molecular interaction networks. Bioinformatics. 2002;18 Suppl 1:S233-40.
[3] Ozisik O, Bakir-Gungor B, Diri B, Sezerman OU. Active Subnetwork GA: A Two Stage Genetic Algorithm Approach to Active Subnetwork Search. Current Bioinformatics. 2017; 12(4):320-8. 10.2174/1574893611666160527100444