Commit 436ba8fb authored by Lukas Jelonek's avatar Lukas Jelonek
Browse files

Adapt blastp result to hmmer output

parent 36b489b9
......@@ -35,18 +35,20 @@ with open(filename) as f:
documents[split[0]] = {"id": split[0], "computations": [{'tool':tool, 'results':[]}]}
results = documents[split[0]]['computations'][0]['results']
result = {}
result["dbxref"] = "UniProtKB/Swiss-Prot:"+split[header['subject id']].split("|")[1]
result = {'target':{}, 'query':{}}
result['target']["dbxref"] = "UniProtKB/Swiss-Prot:"+split[header['subject id']].split("|")[1]
if '% identity' in header:
result["percent_identity"] = float(split[header['% identity']])
result['target']["percent_identity"] = float(split[header['% identity']])
if 'q. start' in header and 'q. end' in header:
result['qloc'] = split[header['q. start']] + '-' + split[header['q. end']]
result['query']['start'] = split[header['q. start']]
result['query']['end'] = split[header['q. end']]
if 's. start' in header and 's. end' in header:
result['sloc'] = split[header['s. start']] + '-' + split[header['s. end']]
result['target']['start'] = split[header['s. start']]
result['target']['end'] = split[header['s. end']]
if 'evalue' in header:
result['evalue'] = float(split[header['evalue']])
result['target']['evalue'] = float(split[header['evalue']])
if 'BTOP' in header:
result['btop'] = split[header['BTOP']]
result['target']['btop'] = split[header['BTOP']]
results.append(result)
......
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