Skip to main content

A Python wrapper for accessing KEGG REST API, inspired by KEGGREST in Bioconductor

Project description

KEGGRESTpy

KEGGRESTpy is a Python package providing a simple interface to access the KEGG (Kyoto Encyclopedia of Genes and Genomes) REST API. This package allows users to fetch and interact with data from KEGG databases, enabling bioinformatics research on genomic and pathway data.

Note: This package was modified based on the KEGGREST package from Bioconductor.

Installation

Clone the repository and install with:

pip install KEGGRESTpy

Overview KEGGRESTpy offers several key functions for querying the KEGG REST API:

kegg_info(): Retrieve information about KEGG databases. kegg_list(): List entries in a KEGG database. kegg_get(): Retrieve specific entries from KEGG databases. kegg_find(): Search by keywords within KEGG databases. kegg_conv(): Convert identifiers between KEGG and external databases. kegg_link(): Link entries across KEGG databases. Each of these functions interacts directly with the KEGG API, handling data parsing and returning structured results.

Usage

1. Exploring KEGG Resources with kegg_list()

To list all available databases:

from KEGGRESTpy import list_databases

print(list_databases())

To list all organisms in KEGG:

from KEGGRESTpy import kegg_list

pathway = kegg_list("pathway")
print(pathway)

2. Retrieving Specific Entries with kegg_get()

To retrieve detailed information about specific entries in KEGG, such as genes:

from KEGGRESTpy import kegg_get

data = kegg_get(["hsa:10458", "ece:Z5100"])
print(data)

You can also retrieve amino acid or nucleotide sequences:

sequences = kegg_get(["hsa:10458", "ece:Z5100"], option="aaseq")
print(sequences)

3. Searching by Keywords with kegg_find()

To search for entries related to a keyword:

from KEGGRESTpy import kegg_find

results = kegg_find("genes", "shiga toxin")
print(results)

4. Converting Identifiers with kegg_conv()

To convert identifiers between KEGG and other databases:

from KEGGRESTpy import kegg_conv

conversion = kegg_conv("ncbi-proteinid", ["hsa:10458", "ece:Z5100"])
print(conversion)

5. Linking Across Databases with kegg_link()

To find relationships between different entities in KEGG:

from KEGGRESTpy import kegg_link

pathways = kegg_link("pathway", "hsa")
print(pathways)

Contributing

Contributions to KEGGRESTpy are welcome! Please submit pull requests or open issues to discuss features, bugs, or improvements.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Citation and Restrictions

The KEGG API is provided for academic use by researchers affiliated with academic institutions. Please refer to the official KEGG REST API documentation for more information.

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

KEGGRESTpy-0.1.2.tar.gz (8.5 kB view details)

Uploaded Source

File details

Details for the file KEGGRESTpy-0.1.2.tar.gz.

File metadata

  • Download URL: KEGGRESTpy-0.1.2.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.3

File hashes

Hashes for KEGGRESTpy-0.1.2.tar.gz
Algorithm Hash digest
SHA256 bb1aca72c997b31154a1505d20729a718f63fc6f2027a9a92a15170cf2b8f902
MD5 da50c50902561b3c655224e3cf51c699
BLAKE2b-256 6e2cb200eb3f37028dbe6e0c5900727a021f43f9886c46de57af37d908a8fb67

See more details on using hashes here.

Supported by

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