Repository 'saint_preprocessing'
hg clone https://toolshed.g2.bx.psu.edu/repos/bornea/saint_preprocessing

Changeset 53:26b5bd96332e (2016-08-27)
Previous changeset 52:8031a47f67c6 (2016-06-08) Next changeset 54:0f5028e0c39c (2016-08-27)
Commit message:
Uploaded
modified:
SAINT_preprocessing.py
b
diff -r 8031a47f67c6 -r 26b5bd96332e SAINT_preprocessing.py
--- a/SAINT_preprocessing.py Wed Jun 08 10:36:32 2016 -0400
+++ b/SAINT_preprocessing.py Sat Aug 27 20:25:09 2016 -0400
[
@@ -110,6 +110,7 @@
     db_len = len(data_lines)
     seqlength = 0
     count = 0
+    last_line = data_lines[-1]
     for data_line in data_lines:
         if ">sp" in data_line:
             namer = data_line.split("|")[2]
@@ -124,6 +125,8 @@
                 while ">sp" not in data_lines[match]:
                     if match <= db_len:
                         seqlength = seqlength + len(data_lines[match].strip())
+                        if data_lines[match] == last_line:
+                            break
                         match = match + 1
                     else:
                         break
@@ -140,6 +143,8 @@
             while ">sp" not in data_lines[match]:
                 if match <= db_len:
                     seqlength = seqlength + len(data_lines[match].strip())
+                    if data_lines[match] == last_line:
+                        break
                     match = match + 1
                 else:
                     break