Skip to content
Ilia Popov edited this page May 30, 2025 · 11 revisions

KEGGaNOG Usage Guide

INSTALLATION

conda create -n kegganog pip -y
conda activate kegganog
pip install kegganog

HELP

! KEGGaNOG -h
usage: KEGGaNOG [-h] [-M] -i INPUT -o OUTPUT [-overwrite] [-dpi DPI]
                [-c COLOR] [-n NAME] [-g] [-V]

KEGGaNOG: Link eggNOG-mapper and KEGG-Decoder for pathway visualization.

options:
  -h, --help            show this help message and exit
  -M, --multi           “Multi” mode allows to run KEGGaNOG on multiple
                        eggNOG-mapper annotation files (a text file with file
                        location paths must be passed to the input)
  -i INPUT, --input INPUT
                        Path to eggNOG-mapper annotation file
  -o OUTPUT, --output OUTPUT
                        Output folder to save results
  -overwrite, --overwrite
                        Overwrite the output directory if it already exists
  -dpi DPI, --dpi DPI   DPI for the output image (default: 300)
  -c COLOR, --color COLOR, --colour COLOR
                        Cmap for seaborn heatmap. Recommended options: Greys,
                        Purples, Blues, Greens, Oranges, Reds (default: Blues)
  -n NAME, --name NAME  Sample name for labeling (default: SAMPLE) (not active
                        in `--multi` mode)
  -g, --group           Group the heatmap based on predefined categories
  -V, --version         show program's version number and exit

USAGE EXAMPLE

Single MODE

As the demo data for this usage guide eggNOG-mapper output of Lpb. plantarum IS-10506 is used
It is a probiotic from I am better than I look: genome based safety assessment of the probiotic Lactiplantibacillus plantarum IS-10506 study

First, download the demo data

Input

! wget https://github.com/iliapopov17/KEGGaNOG/raw/refs/heads/dev/demo_data.zip && \
    unzip demo_data.zip && rm -rf demo_data.zip

Then run KEGGaNOG

Input

! KEGGaNOG -i demo_data/LaPla/LaPla.emapper.annotations -o LaPla

By the key -i the input (eggNOG-mapper output file) must be provided By the key -o the path to output directory (it will be created if it does not exist) must be provided

The resulted figure:

heatmap_figure

The dpi of the resulted heatmap can be adjusted by using -dpi key
300 dpi is used by default

The color of the heatmap can be adjusted by using -c key
'Blues' are used by default

The sample name can be adjusted by using -n key
'SAMPLE' is the default sample name
It supports regular expressions, so to make some words in italics (e.g.: Lpb. plantarum IS-10506) please use $\it{Lpb. plantarum}$ IS-10506

This is not recommended while using CLI functionality of KEGGaNOG — using regular expressions for sample naming can be more helpful in Heatmap API

Grouping

Alternatively, all the pathways can be grouped by their functions using -g key — gaps between groups will be added on the heatmap

Input

! KEGGaNOG -i demo_data/LaPla/LaPla.emapper.annotations -o LaPla_grouped -g -n 'Lpb. plantarum IS-10506'

The resulted figure:

heatmap_figure

Multi MODE

As the demo data for this usage guide eggNOG-mapper output of:

  • Acidilobus saccharovorans 345-15 — AciSa
  • Bacillus subtilis subsp. subtilis str. 168 — BaSu
  • Bacteroides thetaiotaomicron VPI-5482 — BaThe
  • Clostridium acetobutylicum ATCC 824 — CloAce
  • Lactiplantibacillus plantarum strain IS-10506 — LaPla
  • Meiothermus ruber DSM 1279 — MeRu
  • Pseudomonas putida KT2440 — PsePu
  • Sorangium cellulosum So0157-2 — SoCe
  • Staphylococcus carnosus subsp. carnosus TM300 — StaCa
  • Thermotoga maritima MSB8 — TheMa

are used

The demo has been already downloaded (if not — run the code below)

Input

! wget https://github.com/iliapopov17/KEGGaNOG/raw/refs/heads/dev/demo_data.zip && \
    unzip demo_data.zip && rm -rf demo_data.zip

Create a list file for KEGGaNOG -M input

Input

! ls demo_data/*/*.emapper.annotations > demo_data/listFile.txt

Then run KEGGaNOG

Input

! KEGGaNOG -M -i demo_data/listFile.txt -o multi

By the key -i the input (eggNOG-mapper output file) must be provided
By the key -o the path to output directory (it will be created if it does not exist) must be provided

The resulted figure:

heatmap_figure

The dpi of the resulted heatmap can be adjusted by using --dpi key
300 dpi is used by default

The color of the heatmap can be adjusted by using -c key
'Blues' are used by default

The order of samples in multi-sample heatmap can be adjusted by using Heatmap API

Grouping

Alternatively, all the pathways can be grouped by their functions using -g key — gaps between groups will be added on the heatmap

Input

! KEGGaNOG -M -i demo_data/listFile.txt -o multi_grouped_color -c Greens -g

The resulted figure:

heatmap_figure

Clone this wiki locally