Erva Ulusoy commited on
Commit
8fa6245
1 Parent(s): 4bd44bb

Update run_domain2go_app.py

Browse files
Files changed (1) hide show
  1. run_domain2go_app.py +3 -2
run_domain2go_app.py CHANGED
@@ -73,8 +73,9 @@ def find_domains(email, sequence, name):
73
 
74
  entries[entry['accession']]['locations'] = list(set(entries[entry['accession']]['locations']))
75
  # sort locations by both start and end position
76
- # entries[entry['accession']]['locations'] = sorted(entries[entry['accession']]['locations'], key=lambda x: [int(i) for i in x.split('-')])
77
- entries[entry['accession']]['locations'] = sorted(entries[entry['accession']]['locations'], key=lambda x: int(x.split('-')[0]))
 
78
  entries[entry['accession']]['locations'] = '|'.join(entries[entry['accession']]['locations'])
79
 
80
  if entries:
 
73
 
74
  entries[entry['accession']]['locations'] = list(set(entries[entry['accession']]['locations']))
75
  # sort locations by both start and end position
76
+ # entries[entry['accession']]['locations'] = sorted(entries[entry['accession']]['locations'], key=lambda x: int(x.split('-')[0]))
77
+ entries[entry['accession']]['locations'] = sorted([i.split('-') for i in entries[entry['accession']]['locations']], key=lambda x: (int(x[0]), int(x[1])))
78
+ entries[entry['accession']]['locations'] = ['-'.join(i) for i in entries[entry['accession']]['locations']]
79
  entries[entry['accession']]['locations'] = '|'.join(entries[entry['accession']]['locations'])
80
 
81
  if entries: