Commit 0cdb14ce authored by Lukas Jelonek's avatar Lukas Jelonek
Browse files

Fix bug: Feature coordinates are stored as strings

parent 2f4bd01f
......@@ -52,11 +52,11 @@ with open(filename) as f:
if '% identity' in header:
result['target']["percent_identity"] = float(split[header['% identity']])
if 'q. start' in header and 'q. end' in header:
result['query']['start'] = split[header['q. start']]
result['query']['end'] = split[header['q. end']]
result['query']['start'] = int(split[header['q. start']])
result['query']['end'] = int(split[header['q. end']])
if 's. start' in header and 's. end' in header:
result['target']['start'] = split[header['s. start']]
result['target']['end'] = split[header['s. end']]
result['target']['start'] = int(split[header['s. start']])
result['target']['end'] = int(split[header['s. end']])
if 'evalue' in header:
result['target']['evalue'] = float(split[header['evalue']])
if 'BTOP' in header:
......@@ -43,13 +43,13 @@ with open(result_filename) as f:
elif args.acc_split:
accession = acession.split(args.acc_split)[0]
result['query'] = {
'start': split[6],
'end': split[7]
'start': int(split[6]),
'end': int(split[7])
result['target'] = {
'dbxref': args.dbxref + ':' + accession,
'start': split[8],
'end': split[9],
'start': int(split[8]),
'end': int(split[9]),
'evalue': float(split[10]),
'percent_identity': float(split[2]),
'score': float(split[11])
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