From 73058b1190aabf3c921afaaf9fe95e199317b339 Mon Sep 17 00:00:00 2001 From: Thomas Cokelaer Date: Sat, 1 Oct 2022 23:24:22 +0200 Subject: [PATCH] Update KEGG documentation fixes #233 --- README.rst | 6 ++++-- doc/index.rst | 1 - src/bioservices/kegg.py | 6 ++++++ src/bioservices/uniprot.py | 9 +++++++++ test/webservices/test_kegg.py | 2 ++ 5 files changed, 21 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 201c8f5..49c4d2c 100644 --- a/README.rst +++ b/README.rst @@ -13,11 +13,12 @@ BIOSERVICES: access to biological web services programmatically :target: http://bioservices.readthedocs.org/en/main/?badge=main :alt: Documentation Status +.. image:: https://static.pepy.tech/personalized-badge/bioservices?period=month&units=international_system&left_color=black&right_color=orange&left_text=Downloads + :target: https://pepy.tech/project/bioservices + .. image:: https://raw.githubusercontent.com/cokelaer/bioservices/main/doc/_static/bioservices2_logo_256.png :target: https://raw.githubusercontent.com/cokelaer/bioservices/main/doc/_static/bioservices2_logo_256.png -.. image:: https://static.pepy.tech/personalized-badge/bioservices?period=month&units=international_system&left_color=black&right_color=orange&left_text=Downloads - :target: https://pepy.tech/project/bioservices :Python_version_available: BioServices is tested for Python 3.7, 3.8, 3.9 :Contributions: Please join https://github.com/cokelaer/bioservices @@ -192,6 +193,7 @@ Version Description ========= ==================================================================== 1.10.3 * Update pdb service to use v2 API * remove biocarta (website not accesible anymore) + * Update Chembl (no API changes) 1.10.2 * Fix #226 and applied PR from Fix from @GianArauz https://github.com/cokelaer/bioservices/pull/232 about UniProt error diff --git a/doc/index.rst b/doc/index.rst index c2f9a13..3a1c3cb 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -62,5 +62,4 @@ User guide references external_references.rst faqs - ChangeLog.rst contributors diff --git a/src/bioservices/kegg.py b/src/bioservices/kegg.py index f0f2ae4..74ca0f5 100644 --- a/src/bioservices/kegg.py +++ b/src/bioservices/kegg.py @@ -542,6 +542,10 @@ def get(self, dbentries, option=None, parse=False): # same as above s.get("hsa05130", "image") + # to retrieve genome, you must preceed the entry with gn: + s.get('gn:T01001') + # to retrieve a network, you must preceed it with network: + s.get('network:nt06214') Another example here below shows how to save the image of a given pathway:: @@ -1366,6 +1370,7 @@ def _parse(self, res): "KEYWORDS", "HISTORY", "MASS", + "MAP", "ORGANISM", "ORG_CODE", "POSITION", @@ -1455,6 +1460,7 @@ def _parse(self, res): "COMPOUND", "RMODULE", "PATHWAY_MAP", + "MEMBER", "STR_MAP", "OTHER_MAP", "PATHWAY", diff --git a/src/bioservices/uniprot.py b/src/bioservices/uniprot.py index d0a1847..4bfd28e 100644 --- a/src/bioservices/uniprot.py +++ b/src/bioservices/uniprot.py @@ -771,6 +771,15 @@ def get_df(self, entries, nChunk=100, organism=None, limit=10): set it to None to keep all entries but this will be very slow :return: dataframe with indices being the uniprot id (e.g. DIG1_YEAST) + To get about 100 columns related to the accession P62988, type: + + df = u.get_df('P62988') + + Note that you may preceed the accesion by the keyword **sec_acc) to access secondary + accessions numbers:: + + df = u.get_df('sec_acc:P62988') + """ if isinstance(entries, str): entries = [entries] diff --git a/test/webservices/test_kegg.py b/test/webservices/test_kegg.py index 2938339..16c0ead 100644 --- a/test/webservices/test_kegg.py +++ b/test/webservices/test_kegg.py @@ -159,6 +159,8 @@ def test_get(kegg): assert False except: assert True + res = kegg.get('network:nt06214') + def test_parse(kegg, parse_input):