Commit b789b9ea by Riccardo Vicedomini

domain annotation is now sorted by sequence-id and sequence-start for simple architecture output

parent 32ef540c
...@@ -147,10 +147,9 @@ def main(): ...@@ -147,10 +147,9 @@ def main():
taxid2name[taxid] = name taxid2name[taxid] = name
with open(finalPredictionsFile,'w') as outFile: with open(finalPredictionsFile,'w') as outFile:
for query in objReturn: for query in sorted(objReturn.keys()):
for i in range(0,len(objReturn[query])): sortedHits = sorted( (data for data in objReturn[query] if data is not None), key=lambda d:d[SEQ_START] )
if not objReturn[query][i] is None: for data in sortedHits:
data = objReturn[query][i]
evalue = data[I_EVALUE] evalue = data[I_EVALUE]
bitscore = data[SCORE] bitscore = data[SCORE]
modid = data[MODEL_NAME] modid = data[MODEL_NAME]
......
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