Commit b9901471 authored by Lukas Jelonek's avatar Lukas Jelonek
Browse files

register interpro provider

parent 5f55e6ba
......@@ -97,6 +97,9 @@
resources:
html: ["https://www.ebi.ac.uk/interpro/entry/%i"]
json: ["https://www.ebi.ac.uk/interpro/api/entry/InterPro/%i"]
retriever:
type: 'internal'
location: 'dbxref.retrieve.interpro'
# does not work
# check_existence: "http://www.ebi.ac.uk/interpro/entry/%i"
- name: GeneID
......
......@@ -49,7 +49,7 @@ def main():
print(json.dumps(documents, sort_keys=True, indent=4))
def retrieve(dbxrefs, basics, hierarchy, wikipedia, literature, cross_references, overlaps):
def retrieve(dbxrefs, basics=True, hierarchy=True, wikipedia=True, literature=True, cross_references=True, overlaps=True):
"""Retrieve json document from InterPro REST api, filter information by selected Options and parse into new json"""
resolved = dbxref.resolver.resolve(dbxrefs, check_existence=False)
documents = []
......@@ -62,7 +62,7 @@ def retrieve(dbxrefs, basics, hierarchy, wikipedia, literature, cross_references
ipro = json.loads(r.text)
# Parse retrieved json file by selected Options
output = {}
output = {"id": entry["dbxref"]}
if basics:
try:
output.update(accession=ipro["metadata"]["accession"], entry_type=ipro["metadata"]["type"],
......
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