Skip to content

Instantly share code, notes, and snippets.

@yvan-sraka
Created January 1, 2019 23:43
Show Gist options
  • Save yvan-sraka/592a0490075cafd39713d8e0554080b6 to your computer and use it in GitHub Desktop.
Save yvan-sraka/592a0490075cafd39713d8e0554080b6 to your computer and use it in GitHub Desktop.
diff --git a/predict.py b/predict.py
index 716e2cd9..e2a2716f 100755
--- a/predict.py
+++ b/predict.py
@@ -90,24 +90,15 @@ def predict(foldrec_path: str, N=20, method: str='lr', verbose: bool=True):
key = (lambda x: x[2])
result.sort(key=key, reverse=True)
remove_all_pdbs('./tmp_pdb')
- for i in range(N):
+ for i in range(len(result)):
thread_query, fam_name, score = result[i]
thread_query.write_pdb()
rank = i+1
- # print("\x1b[90m{}\x1b[0m {}: {:.4f}".format(rank, fam_name, score))
- print(FG_GRAY+ str(rank) +" "+ END_COLOR+ fam_name + " " +
- FG_YELLOW+ "{:.4f}".format(score) +END_COLOR)
+ print(str(rank) + " " + fam_name + " " + "{:.4f}".format(score))
return result
if __name__ == '__main__':
- print("\n██████╗ ██████╗ ███████╗██████╗ ██╗ ██████╗████████╗\n" \
- "██╔══██╗██╔══██╗██╔════╝██╔══██╗██║██╔════╝╚══██╔══╝\n" \
- "██████╔╝██████╔╝█████╗ ██║ ██║██║██║ ██║ \n" \
- "██╔═══╝ ██╔══██╗██╔══╝ ██║ ██║██║██║ ██║ \n" \
- "██║ ██║ ██║███████╗██████╔╝██║╚██████╗ ██║ \n" \
- "╚═╝ ╚═╝ ╚═╝╚══════╝╚═════╝ ╚═╝ ╚═════╝ ╚═╝ \n")
-
# ARGUMENT PARSING --------------------------------------------------------
arg_parser = argparse.ArgumentParser()
arg_parser.add_argument('path', type=str, help='Path to the foldrec file.')
@@ -117,5 +108,4 @@ if __name__ == '__main__':
path = args.path
# -------------------------------------------------------------------------
- print("Predict structure of: \x1b[4m%s\x1b[0m" % path)
predict(path, N=args.template_nb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment