Skip to main content

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)

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.

Metadata

Release files for KEGGRESTpy 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for KEGGRESTpy 0.1.2
File Size Uploaded
KEGGRESTpy-0.1.2.tar.gz 8.5 kB Details

Release files / KEGGRESTpy-0.1.2.tar.gz

Download URL KEGGRESTpy-0.1.2.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
bb1aca72c997b31154a1505d20729a718f63fc6f2027a9a92a15170cf2b8f902
BLAKE2b-256 checksum
How to use checksums
6e2cb200eb3f37028dbe6e0c5900727a021f43f9886c46de57af37d908a8fb67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.3

Release history Release notifications | RSS feed

This release

0.1.2 This release

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page