From 06675bb233d300989c997dbe4a0383c1202a39c2 Mon Sep 17 00:00:00 2001
From: remy <remy.dernat@umontpellier.fr>
Date: Mon, 11 Nov 2019 22:01:46 +0100
Subject: [PATCH] still some bugs but nevertheless it gives some results

---
 orthofinder/scripts/blast_file_processor.py | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/orthofinder/scripts/blast_file_processor.py b/orthofinder/scripts/blast_file_processor.py
index af0b6aa..90ab849 100644
--- a/orthofinder/scripts/blast_file_processor.py
+++ b/orthofinder/scripts/blast_file_processor.py
@@ -138,13 +138,12 @@ def WriteNormalizedBlastFile(blastDir_list, B, iSpecies, jSpecies, sep = "_", qD
                 except (IndexError, ValueError):
                     sys.stderr.write("\nERROR: Query or hit sequence ID in BLAST results file was missing or incorrectly formatted.\n")
                     raise
-                #try:
-                #    score = float(row[11])
-                #except (IndexError, ValueError):
-                #    sys.stderr.write("\nERROR: 12th field in BLAST results file line should be the bit-score for the hit\n")
-                #    raise
-                newscore = B[sequence1ID, sequence2ID]
-                row.append(newscore)
+                try:
+                    newscore = B[sequence1ID, sequence2ID]
+                    row.append(newscore)
+                except IndexError as e:
+                    sys.stderr.write("\nERROR: Matrix index : %s \n" % e)
+                    pass
                 blastwriter.writerow(row)
             move(tempfile.name, fnNorm)
     except Exception:
-- 
GitLab