Skip to content
Snippets Groups Projects
Commit 9d47b306 authored by Jingfei Hou's avatar Jingfei Hou
Browse files

Update seq_gen.py

parent 458eecb2
No related branches found
No related tags found
No related merge requests found
...@@ -31,7 +31,10 @@ def seq_score(input_cdr, gen_list, model, tar_emb, out_path): ...@@ -31,7 +31,10 @@ def seq_score(input_cdr, gen_list, model, tar_emb, out_path):
df['seq'] = seq_com[0:-1] df['seq'] = seq_com[0:-1]
df['score'] = scores[0:-1] df['score'] = scores[0:-1]
df.sort_values(by='score', inplace=True, ascending=False) df.sort_values(by='score', inplace=True, ascending=False)
seq_highest = df['seq'].tolist()[0]
with open('structure_seq.txt', 'w') as f:
f.write(seq_highest+'\n')
input_seq = seq_com[-1] input_seq = seq_com[-1]
scores = scores[-1] scores = scores[-1]
df.loc[len(df.index)] = [input_seq, scores] df.loc[len(df.index)] = [input_seq, scores]
df.to_csv(out_path, sep=',', index=False, header=True) df.to_csv(out_path, sep=',', index=False, header=True)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment