Skip to content

Commit

Permalink
Update KEGG documentation fixes #233
Browse files Browse the repository at this point in the history
  • Loading branch information
cokelaer committed Oct 1, 2022
1 parent 104d1fe commit 73058b1
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 3 deletions.
6 changes: 4 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,4 @@ User guide
references
external_references.rst
faqs
ChangeLog.rst
contributors
6 changes: 6 additions & 0 deletions src/bioservices/kegg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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::
Expand Down Expand Up @@ -1366,6 +1370,7 @@ def _parse(self, res):
"KEYWORDS",
"HISTORY",
"MASS",
"MAP",
"ORGANISM",
"ORG_CODE",
"POSITION",
Expand Down Expand Up @@ -1455,6 +1460,7 @@ def _parse(self, res):
"COMPOUND",
"RMODULE",
"PATHWAY_MAP",
"MEMBER",
"STR_MAP",
"OTHER_MAP",
"PATHWAY",
Expand Down
9 changes: 9 additions & 0 deletions src/bioservices/uniprot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 2 additions & 0 deletions test/webservices/test_kegg.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ def test_get(kegg):
assert False
except:
assert True
res = kegg.get('network:nt06214')



def test_parse(kegg, parse_input):
Expand Down

0 comments on commit 73058b1

Please sign in to comment.