Skip to main content

A Python package for comparing the effect of pathway database choice in functional enrichment and classification methods

Project description

A Python package for benchmarking pathway databases with functional enrichment and prediction methods tasks.

Installation Current version on PyPI Stable Supported Python Versions Apache-2.0

pathway_forte can be installed from PyPI with the following command in your terminal:

$ python3 -m pip install pathway_forte

The latest code can be installed from GitHub with:

$ python3 -m pip install git+

For developers, the code can be installed with:

$ git clone
$ cd pathway-forte
$ python3 -m pip install -e .

Main Commands

The table below lists the main commands of PathwayForte.

Command Action
datasets Lists of Cancer Datasets
export Export Gene Sets using ComPath
ora List of ORA Analyses
fcs List of FCS Analyses
prediction List of Prediction Methods

Functional Enrichment Methods

  • ora. Lists Over-Representation Analyses (e.g., one-tailed hyper-geometric test).
  • fcs. Lists Functional Class Score Analyses such as GSEA and ssGSEA using GSEAPy.

Prediction Methods

pathway_forte enables three classification methods (i.e., binary classification, training SVMs for multi-classification tasks, or survival analysis) using individualized pathway activity scores. The scores can be calculated from any pathway with a variety of tools (see [1]) using any pathway database that enables to export its gene sets.

  • binary. Trains an elastic net model for a binary classification task (e.g., tumor vs. normal patients). The training is conducted using a nested cross validation approach (the number of cross validation in both loops can be selected). The model used can be easily changed since most of the models in scikit-learn (the machine learning library used by this package) required the same input.
  • subtype. Trains a SVM model for a multi-class classification task (e.g., predict tumor subtypes). The training is conducted using a nested cross validation approach (the number of cross validation in both loops can be selected). Similarly as the previous classification task, other models can quickly be implemented.
  • survival. Trains a Cox’s proportional hazard’s model with elastic net penalty. The training is conducted using a nested cross validation approach with a grid search in the inner loop. This analysis requires pathway activity scores, patient classes and lifetime patient information.


  • export. Export GMT files with current gene sets for the pathway databases included in ComPath [2].
  • datasets. Lists the TCGA data sets [3] that are ready to run in pathway_forte.


[1]Lim, S., et al. (2018). Comprehensive and critical evaluation of individualized pathway activity measurement tools on pan-cancer data. Briefings in bioinformatics, bby125.
[2]Domingo-Fernández, D., et al. (2018). ComPath: An ecosystem for exploring, analyzing, and curating mappings across pathway databases. npj Syst Biol Appl., 4(1):43.
[3]Weinstein, J. N., et al. (2013). The cancer genome atlas pan-cancer analysis project. Nature genetics, 45(10), 1113.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pathway-forte, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size pathway-forte-0.0.2.tar.gz (1.4 MB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page