Commit 81860f7a authored by Lukas Jelonek's avatar Lukas Jelonek
Browse files

Add documentation how to use dbxref as a python library

parent ac2a06c1
......@@ -54,3 +54,18 @@ Setup a virtualenv for development and install it in editable mode::
Use the application::
dbxref resolve GO:0097281
Use it as a library::
# resolve urls for an entry
from dbxref import resolver
resolver.resolve([{'db': 'taxid', 'id': '12345'}])
# => [{'dbxref': 'taxid:12345', 'locations': {'json': [''], 'xml_ncbi': [''], 'xml': [''], 'html': ['']}, 'status': 'found'}]
# retrieve an entry
from dbxref import retriever
retriever.retrieve([{'db':'taxid', 'id': '12345'}])
# => [{'geneticCodes': {'geneticCode': '11'}, 'scientificName': 'Bacillus virus GA1', 'lineage': ['Viruses', 'Duplodnaviria', 'Heunggongvirae', 'Uroviricota', 'Caudoviricetes', 'Caudovirales', 'Podoviridae', 'Picovirinae', 'Salasvirus'], 'id': 'taxid:12345', 'rank': 'species'}]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment