5 result_file = sys.argv[1]
7 total_residue_matched = 0
8 total_residue_matched_abs = 0
9 with open(result_file,
'r') as infile:
11 line = lines.strip().split(
'|')
12 emdb, resolution, seid = line[0].strip().split(
' ')
13 se_length = int(seid.split(
'_')[-1])
17 total_residue += se_length
18 rank = line[1].strip().split(
' ')[0]
19 if int(rank) <= se_length/3:
20 total_residue_matched += se_length
23 total_residue_matched_abs += se_length
24 print(result_file,
"total percentage matched ",
25 round(100*(total_residue_matched/total_residue), 3))
26 print(result_file,
"total abs percentage matched ",
27 round(100*(total_residue_matched_abs/total_residue), 3))
30 if __name__ ==
'__main__':