Mercurial > repos > fabio > btman
comparison query.py @ 14:9ec4acef30ed draft
Uploaded 20180424
author | fabio |
---|---|
date | Tue, 24 Apr 2018 13:29:11 -0400 |
parents | 19ac771cf32a |
children | ba9d0fc8657f |
comparison
equal
deleted
inserted
replaced
13:4646e524cd43 | 14:9ec4acef30ed |
---|---|
104 else: # all-some | 104 else: # all-some |
105 accessions_list = accessions_list + str(hit) + "\n"; | 105 accessions_list = accessions_list + str(hit) + "\n"; |
106 if is_sabutan: | 106 if is_sabutan: |
107 sorted_accessions = sorted(accessions_dict, key=lambda i: float(accessions_dict[i]["score"]), reverse=True); | 107 sorted_accessions = sorted(accessions_dict, key=lambda i: float(accessions_dict[i]["score"]), reverse=True); |
108 for acc in sorted_accessions: | 108 for acc in sorted_accessions: |
109 accessions_list = accessions_list + str(acc) + "\t" + str(accessions_dict[acc]) + "\n"; | 109 accessions_list = accessions_list + str(acc) + "\t" + str(accessions_dict[acc]["fraction"]) + "\t" + str(accessions_dict[acc]["score"]) + "\n"; |
110 with open(output_file_path, 'w') as out: | 110 with open(output_file_path, 'w') as out: |
111 out.write(accessions_list.strip()); | 111 out.write(accessions_list.strip()); |
112 return sys.exit(OK_EXIT_CODE); | 112 return sys.exit(OK_EXIT_CODE); |
113 else: | 113 else: |
114 return raiseException( ERR_EXIT_CODE, "Unable to query the remote server. Please try again in a while.", output_dir_path, str(options.errorfile) ); | 114 return raiseException( ERR_EXIT_CODE, "Unable to query the remote server. Please try again in a while.", output_dir_path, str(options.errorfile) ); |