Mercurial > repos > bornea > saint_preprocessing
changeset 54:0f5028e0c39c draft
Uploaded
author | bornea |
---|---|
date | Sat, 27 Aug 2016 20:25:34 -0400 |
parents | 26b5bd96332e |
children | 340cc5988c31 |
files | SAINT_preprocessing_mq_pep.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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: