Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SOaAS
dbxref
Commits
81860f7a
Commit
81860f7a
authored
Oct 27, 2020
by
Lukas Jelonek
Browse files
Add documentation how to use dbxref as a python library
parent
ac2a06c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
README.rst
View file @
81860f7a
...
...
@@ -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': ['https://www.ebi.ac.uk/ena/data/taxonomy/v1/taxon/tax-id/12345'], 'xml_ncbi': ['https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=taxonomy&id=12345'], 'xml': ['http://www.uniprot.org/taxonomy/12345.rdf'], 'html': ['http://www.uniprot.org/taxonomy/12345']}, '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'}]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment