Skip to content

Commit

Permalink
Change order reactome
Browse files Browse the repository at this point in the history
  • Loading branch information
ddomingof committed Oct 8, 2018
1 parent f81b7fc commit 61a6ed3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pathme/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,16 +187,16 @@ def query_result_to_dict(entries, **kwargs) -> Dict[str, Dict[str, Dict[str, str
entries_dict = {}

for rdf_entry in entries:
dict_rdf_entry = entry_result_to_dict(rdf_entry, **kwargs)

if 'identifier' in rdf_entry.labels and rdf_entry.identifier is not None:
id_key = str(rdf_entry.identifier)

elif 'uri_id' in rdf_entry.labels and rdf_entry.uri_id is not None:
id_key = rdf_entry.uri_id

else:
raise Exception
raise Exception(f'invalid data: {rdf_entry}')

dict_rdf_entry = entry_result_to_dict(rdf_entry, **kwargs)

if id_key not in entries_dict:
entries_dict[id_key] = dict_rdf_entry
Expand Down

0 comments on commit 61a6ed3

Please sign in to comment.