Previous changeset 53:26b5bd96332e (2016-08-27) Next changeset 55:340cc5988c31 (2016-08-27) |
Commit message:
Uploaded |
modified:
SAINT_preprocessing_mq_pep.py |
b |
diff -r 26b5bd96332e -r 0f5028e0c39c SAINT_preprocessing_mq_pep.py --- a/SAINT_preprocessing_mq_pep.py Sat Aug 27 20:25:09 2016 -0400 +++ b/SAINT_preprocessing_mq_pep.py Sat Aug 27 20:25:34 2016 -0400 |
[ |
@@ -145,6 +145,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: if uniprot_accession_in == data_line.split("|")[1]: @@ -158,6 +159,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 @@ -264,7 +267,6 @@ if seq != 'NA': if GN != 'NA': valid_prots.append(a) - print valid_prots with open('inter.txt', 'w') as input_file: l = 0; a = 0 for bb in bait: |