Spaces:
Sleeping
Sleeping
Erva Ulusoy
commited on
Commit
·
be15ab3
1
Parent(s):
849b9bc
sort domain locations hopefully final try
Browse files- run_domain2go_app.py +3 -1
run_domain2go_app.py
CHANGED
|
@@ -72,7 +72,9 @@ def find_domains(email, sequence, name):
|
|
| 72 |
entries[entry['accession']]['locations'].extend(location_list)
|
| 73 |
|
| 74 |
entries[entry['accession']]['locations'] = list(set(entries[entry['accession']]['locations']))
|
| 75 |
-
|
|
|
|
|
|
|
| 76 |
entries[entry['accession']]['locations'] = ';'.join(entries[entry['accession']]['locations'])
|
| 77 |
|
| 78 |
if entries:
|
|
|
|
| 72 |
entries[entry['accession']]['locations'].extend(location_list)
|
| 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]), int(x.split('-')[1])))
|
| 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:
|