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

Changeset 58:4f843e0c6c40 (2016-08-27)
Previous changeset 57:677d224656e0 (2016-08-27) Next changeset 59:5ad68d3a11cc (2016-08-27)
Commit message:
Uploaded
modified:
Protein_report_processing.py
b
diff -r 677d224656e0 -r 4f843e0c6c40 Protein_report_processing.py
--- a/Protein_report_processing.py Sat Aug 27 21:03:24 2016 -0400
+++ b/Protein_report_processing.py Sat Aug 27 21:03:57 2016 -0400
[
@@ -91,6 +91,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]
@@ -105,6 +106,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
@@ -121,6 +124,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