From 4e0858b7747f62a9a4b3b2f3efe5656497b0e54a Mon Sep 17 00:00:00 2001
From: remy <remy.dernat@umontpellier.fr>
Date: Tue, 12 Nov 2019 10:12:39 +0100
Subject: [PATCH] tempfile was not correctly flushed and closed

---
 orthofinder/scripts/blast_file_processor.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/orthofinder/scripts/blast_file_processor.py b/orthofinder/scripts/blast_file_processor.py
index de669e0..d28af71 100644
--- a/orthofinder/scripts/blast_file_processor.py
+++ b/orthofinder/scripts/blast_file_processor.py
@@ -145,6 +145,8 @@ def WriteNormalizedBlastFile(blastDir_list, B, iSpecies, jSpecies, sep = "_", qD
                     sys.stderr.write("\nERROR: Matrix index : %s \n" % e)
                     pass
                 blastwriter.writerow(row)
+            tempfile.flush()
+            tempfile.close()
             move(tempfile.name, fnNorm)
     except Exception:
         sys.stderr.write("Malformatted line in %sBlast%d_%d.txt\nOffending line was:\n" % (d, iSpecies, jSpecies))
-- 
GitLab