0.6.8 quick bugfix for tmp files in esm2

parent 31ab3524
__version__ = "0.6.7" __version__ = "0.6.8"
__author__ = "Konstantin Volzhenin" __author__ = "Konstantin Volzhenin"
from . import model, commands, esm2_model, dataset, utils, network_utils from . import model, commands, esm2_model, dataset, utils, network_utils
......
...@@ -122,7 +122,7 @@ def compute_embeddings(params): ...@@ -122,7 +122,7 @@ def compute_embeddings(params):
params_esm = copy(params) params_esm = copy(params)
try: try:
current_time = str(datetime.now()).replace(' ', '_') current_time = str(datetime.now()).replace(' ', '_')
params_esm.fasta_file = Path(current_time + '_' + str(params.fasta_file).replace('fasta', 'tmp.fasta')) params_esm.fasta_file = Path(str(params.fasta_file).replace('fasta', current_time + '.fasta.tmp'))
with open(params_esm.fasta_file, 'w') as f: with open(params_esm.fasta_file, 'w') as f:
for seq_id in seq_dict.keys(): for seq_id in seq_dict.keys():
f.write('>' + seq_id + '\n') f.write('>' + seq_id + '\n')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment