Skip to content
Snippets Groups Projects
Commit 0cdb14ce authored by Lukas Jelonek's avatar Lukas Jelonek
Browse files

Fix bug: Feature coordinates are stored as strings

parent 2f4bd01f
No related branches found
No related tags found
No related merge requests found
...@@ -52,11 +52,11 @@ with open(filename) as f: ...@@ -52,11 +52,11 @@ with open(filename) as f:
if '% identity' in header: if '% identity' in header:
result['target']["percent_identity"] = float(split[header['% identity']]) result['target']["percent_identity"] = float(split[header['% identity']])
if 'q. start' in header and 'q. end' in header: if 'q. start' in header and 'q. end' in header:
result['query']['start'] = split[header['q. start']] result['query']['start'] = int(split[header['q. start']])
result['query']['end'] = split[header['q. end']] result['query']['end'] = int(split[header['q. end']])
if 's. start' in header and 's. end' in header: if 's. start' in header and 's. end' in header:
result['target']['start'] = split[header['s. start']] result['target']['start'] = int(split[header['s. start']])
result['target']['end'] = split[header['s. end']] result['target']['end'] = int(split[header['s. end']])
if 'evalue' in header: if 'evalue' in header:
result['target']['evalue'] = float(split[header['evalue']]) result['target']['evalue'] = float(split[header['evalue']])
if 'BTOP' in header: if 'BTOP' in header:
......
...@@ -43,13 +43,13 @@ with open(result_filename) as f: ...@@ -43,13 +43,13 @@ with open(result_filename) as f:
elif args.acc_split: elif args.acc_split:
accession = acession.split(args.acc_split)[0] accession = acession.split(args.acc_split)[0]
result['query'] = { result['query'] = {
'start': split[6], 'start': int(split[6]),
'end': split[7] 'end': int(split[7])
} }
result['target'] = { result['target'] = {
'dbxref': args.dbxref + ':' + accession, 'dbxref': args.dbxref + ':' + accession,
'start': split[8], 'start': int(split[8]),
'end': split[9], 'end': int(split[9]),
'evalue': float(split[10]), 'evalue': float(split[10]),
'percent_identity': float(split[2]), 'percent_identity': float(split[2]),
'score': float(split[11]) 'score': float(split[11])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment