Skip to content

Instantly share code, notes, and snippets.

@yvan-sraka
Created January 2, 2019 16:30
Show Gist options
  • Save yvan-sraka/ee6341b3af193e4c36584d3b12a8d3f6 to your computer and use it in GitHub Desktop.
Save yvan-sraka/ee6341b3af193e4c36584d3b12a8d3f6 to your computer and use it in GitHub Desktop.
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
"""
TODO: C0111: Missing module docstring (missing-docstring)
"""
import os
from json import load
if __name__ == '__main__':
# "2018---2019-partage/Data/Benchmark.list"
FILE = open("serialized_data/Benchmark.json", "r")
BENCHMARK = load(FILE)
FILE.close()
for fold in BENCHMARK:
path = "2018---2019-partage/Data/outputs_ORION/%s.rank" % fold
print("\nPredict structure of: \x1b[4m%s\x1b[0m" % path)
with open(path) as f:
for line in f:
rank, fam, score = line.strip().split(" ")
print("\x1b[90m%2s\x1b[0m %s %s %s" % (rank, fam, score, "\x1b[30;46mSuper Family\x1b[0m" if fam in BENCHMARK[fold]["Superfamille"] else ("\x1b[30;44mFamily\x1b[0m" if fam in BENCHMARK[fold]["Famille"] else ("\x1b[30;42mFold\x1b[0m" if fam in BENCHMARK[fold]["Fold"] else ""))))
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment