Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

PETAL (ParallEl paThways AnaLyzer)

python version coverage requirements last_update license doi

PETAL software is written in the Python 3 programming language. It contains a set of tools for pathway analysis and discovery of novel therapeutic targets. The approach allows you to scan and perform a in-depth search of the biological pathway to analyze less recurrent pathways, detect nodes that are far from the initial target nodes and showing the pathway of origin from which it was taken the gene.



Please cite our paper if you want to use PETAL for your research.

DOI: 10.1093/bioinformatics/btaa1032

BibTex format

    author = {Sgroi, Giuseppe and Russo, Giulia and Pappalardo, Francesco},
    title = "{PETAL: a python tool for deep analysis of biological pathways}",
    journal = {Bioinformatics},
    year = {2020},
    month = {12},
    abstract = "{Although several bioinformatics tools have been developed to examine signaling pathways, little attention has been given to ever long-distance crosstalk mechanisms. Here, we developed PETAL, a Python tool that automatically explores and detects the most relevant nodes within a KEGG pathway, scanning and performing an in-depth search. PETAL can contribute to discovering novel therapeutic targets or biomarkers that are potentially hidden and not considered in the network under study.PETAL is a freely available open-source software. It runs on all platforms that support Python3. The user manual and source code are accessible from}",
    issn = {1367-4803},
    doi = {10.1093/bioinformatics/btaa1032},
    url = {},
    note = {btaa1032},
    eprint = {},



Download zip



Clone repository

git clone

Setting Environment

A typical user can install the libraries using the following command:

python3 -m pip install -r requirements.txt


You can test that you have correctly installed the PETAL by running the following command:

python3 -m <mode> -p <pathway> -g <gene> -d <depth> -c <CPUs>

Before starting the breadth analysis, PETAL requires the setting of five mandatory and optional input parameters:

  • Mode (-m or --mode): if it is set to 0, the entire analysis will start; if it is equal to 1, the analysis will be extended to the new maximum depth considered;
  • Pathway (-p or --pathway): represents the biological pathway (in hsa format) from which the analysis will start (e.g., hsa04010);
  • Gene (-g or --gene): represents the starting gene present in the selected pathway. If the inserted gene is not detected in the biological pathway, the analysis will fail (e.g., MAPK1);
  • Depth (-d or --depth): indicates the maximum search depth of the analysis;
  • CPUs (-c or --cpu): indicates the maximum number of CPUs used during the analysis. If it is set to 0 or its value exceeds the number of installed CPUs, the analysis will be automatically set to the maximum number.

Viewing the results

After PETAL has finished the analysis, to view the final output generated you need to run the following commands:

cd export_data/demo_radialtree/
python3 -m http.server 8080 --bind

After starting the local server, now you can open the browser with the url, so the PETAL GUI will be shown.

This method it has been tested on both Firefox, Chrome and Safari.

Filtering the results

You can filter the results obtained based on a target gene.

python3 -t <target>

Before filtering the results, PETAL requires an input parameter:

  • Target (-t or --gtarget): represents the target gene to be found in the results obtained during the analysis (e.g., AKT3)

Single target

You can filter the results by passing a single target gene. For example:

python3 -t AKT3

Multi target

Or you can filter the results by passing multiple target genes, as long as they are separated by commas. For example:

python3 -t MAPK1,EGFR

If one of the targets is not found, an on-screen message will be returned while execution continues.

Common errors

certificate verify failed

If at the first run of PETAL on Mac OS, the following error occurs:

urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed

You can try to solve in two ways:

  1. Via PIP:
pip3 install --upgrade certifi
  1. If it doesn't work, try to run a Cerificates.command that comes bundled with Python 3.x for Mac:
open /Applications/Python\ 3.9/Install\ Certificates.command

One way or another, you should now have certificates installed, and Python should be able to connect via HTTPS without any issues.

bz2 error

When trying to execute the python script, if the following error occurs:

from _bz2 import BZ2Compressor, BZ2Decompressor ImportError: No module named '_bz2'

You need to install libbz2 and .so files, so that python will be compiled with bz2 support.

sudo apt install libbz2-dev  # on ubuntu/debian or
sudo yum install bzip2-devel # on fedora

cp /usr/lib/python3.8/lib-dynload/  /usr/local/lib/python3.8/

lzma error

When trying to execute the python script, if the following error occurs:

UserWarning: Could not import the lzma module. Your installed Python is incomplete. Attempting to use lzma compression will result in a RuntimeError.

You need to install liblzma and .so files, so that python will be compiled with lzma support.

sudo apt install liblzma-dev  # on ubuntu/debian or
sudo yum install -y xz-devel  # on fedora

cp /usr/lib/python3.8/lib-dynload/ /usr/local/lib/python3.8/