Skip to main content

FEV@KEGG allows for easy analysis of metabolic networks of organisms in KEGG.

Project description

README

FEV@KEGG

FEV@KEGG allows for easy analysis of metabolic networks of organisms in KEGG (Kyoto Encyclopedia of Genes and Genomes). Read the API documentation here: https://fev-kegg.readthedocs.io

Restrictions

  • You MUST make absolutely sure to comply with the conditions of using KEGG and its API: http://www.kegg.jp/kegg/legal.html and http://www.kegg.jp/kegg/rest/.

  • If you have access to an offline copy of KEGG, you MUST NOT use the default Database and Download modules, since they cause a lot of load on KEGG servers. Instead, contact me, so we can integrate your offline copy to be used before anything is downloaded.

Features

  • convert data from KEGG PATHWAY and KEGG GENE to organism-specific graphs

  • graphs link substrates/products with reactions, genes, EC numbers, or abstract ‘enzymes’

  • cache downloads from KEGG, graphs, and any other computational result

  • build groups of organisms, allows for fusing their graphs into a common metabolism

  • gather groups from NCBI or KEGG taxonomy, using KEGG BRITE

  • gather clades from NCBI taxonomy and compare their ‘core’ metabolism

  • find paralogs/orthologs using KEGG SSDB

  • find possible gene duplications or neofunctionalisations

  • calculate robustness metrics between graphs, organisms, groups of organisms, or clades

  • … anything you can think of using graphs derived from KEGG

Install

Use pip to install FEV@KEGG and to automagically install all dependencies: pip install FEV_KEGG

If you are on Python 3.4, you will have to use pip install FEV_KEGG[python34] to pull in the backported typing package.

Where to start?

After successful installation, you might want to take a look at the “experiment” scripts in FEV_KEGG/Experiments. These scripts consecutively involve more and more functionality of this library. They were used during development, step by step adding and testing another layer of functionality or abstraction. Therefore, they might be useful to you in learning how to use this very functionality.

Also, take a look at the API documentation: https://fev-kegg.readthedocs.io

If any questions remain, feel free to report an issue: https://github.com/ryhaberecht/FEV-KEGG/issues

Dependencies

These are automatically installed by pip.

  • Python 3.4+

  • NetworkX

  • anytree

  • jsonpickle

  • tqdm

  • BeautifulSoup

  • retrying

  • appdirs

  • typing (for Python 3.4 only)

Optional Dependencies

If you want to draw a graph to an image file:

  • PyGraphviz

  • Graphviz (non-python software you will have to install manually!)

Use pip install FEV_KEGG[draw_image].


If you want to draw a graph in a pop-up window:

  • Matplotlib

Use pip install FEV_KEGG[draw_window]


Exporting to GraphML or GML works without any optional dependencies.

Included Dependencies

These have been partially copied into this project to avoid unnecessarily big dependencies and allow for minor changes.

  • Bio.KEGG from Biopython in lib.Biopython.KEGG

Recommendations

  • SSD

When handling 500 organisms from KEGG at once:

  • 64 bit operating system

  • 4 GB RAM

  • 20 GB disk space for cache

When handling all ~5000 organisms in KEGG at once:

  • 64 bit operating system

  • 12 GB RAM

  • 100 GB disk space for cache

Developer’s System

  • cPython 3.4.6

  • x86-64 Linux (OpenSUSE Leap 42.3)

  • 16 GB RAM

  • 1 CPU, 2 Cores, 4 Threads

  • SSD

Caching

  • The cache directory path is set up in the ‘settings.py’ file on the top level of the project. Per default, it points to your user’s cache directory as defined by your OS.

    • Linux/Unix: ~/.cache/FEV-KEGG

    • OS X: ~/Library/Caches/FEV-KEGG

    • Windows: C:\Users\username\AppData\Local\ryh\FEV-KEGG\Cache

  • All downloads from KEGG are cached automatically. Also, basic graphs are cached by organism. These default cachings alone can grow the cache directory to 100 GB size!

  • You can cache any function’s result using the @cache decorator, see FEV_KEGG.KEGG.File.cache. Watch out to remember the path and file name and not to overwrite any other cached files.

  • To cause a download of the newest version of data from KEGG, you have to delete the cached file manually. Have a look inside the ‘cache’ folder, file paths and names should be self-explanatory.

  • On Linux with supporting file systems, disabling atime (file access time) for the cache directory and all its contents might improve performance: sudo chattr -R +A ~/.cache/FEV-KEGG

Changelog

1.0.0 (2018-08-09)

  • Initial release.

1.1.1 (2018-08-18)

  • Bug-fix: When choosing the type of redundancy in the RedundancyType enum, TARGET_FLEXIBILITY and SOURCE_FELXIBILITY used to always equal to FLEXIBILITY, due to the scriptiness of Python. Now they are treated differently.

  • Added partial redundancy to the the RedundancyType enum, plus logic for the Redundancy and RedundancyContribution classes.

  • Added export of dictionaries containing Neofunctionalisation/FunctionChange/Element objects into a formatted HTML file.

  • Added three more experiments involving the above.

1.1.2 (2018-08-18)

  • Bug-fix: Added missing majority percentage parameter in several experiments.

  • Added new experiment.

  • Improved sorting of neofunctionalisations. Now they sort by EC number first.

  • Improved sorting for enzymes. Now they sort by EC number first.

  • Improved sorting for EC numbers. Now they sort naturally, not lexicographically.

1.1.3 (2019-01-07)

  • Bug-fix: Improved parsing and error handling of gene description files.

  • Bug-fix: Fixed deprecated API-calls in older experiments.

  • Bug-fix: Export of GraphML failed due to None values.

  • Added experiment 45.

  • Fixed typos.

  • Master’s thesis release!

1.1.4 (2022-05-20)

  • Bug-fix: non-existing attribute

  • Bug-fix: KEGG changed attributes of gene type

Project details


Download files

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

Source Distribution

FEV_KEGG-1.1.4.tar.gz (305.5 kB view details)

Uploaded Source

Built Distribution

FEV_KEGG-1.1.4-py3-none-any.whl (377.8 kB view details)

Uploaded Python 3

File details

Details for the file FEV_KEGG-1.1.4.tar.gz.

File metadata

  • Download URL: FEV_KEGG-1.1.4.tar.gz
  • Upload date:
  • Size: 305.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.23.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.15

File hashes

Hashes for FEV_KEGG-1.1.4.tar.gz
Algorithm Hash digest
SHA256 3e225325a18501150b193898e94a45584cd3b67012688a706be1fe919b490fe7
MD5 bffba759989b853265b9e9f04be6ae20
BLAKE2b-256 f6443ece50f270afe007a0297a1848fef19e991a8fa4ebb131930eadac2865d0

See more details on using hashes here.

File details

Details for the file FEV_KEGG-1.1.4-py3-none-any.whl.

File metadata

  • Download URL: FEV_KEGG-1.1.4-py3-none-any.whl
  • Upload date:
  • Size: 377.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.23.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.15

File hashes

Hashes for FEV_KEGG-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 bd581765721bad3730c68afacb936211f72401eb57bb3c585bef767c44ab2f28
MD5 5a790b1421d3e6db49c9eb6876372d4f
BLAKE2b-256 67ae212cf32ab5307032e390ed67e09d8309f20225513132daeea0fe9de7e3e7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page