From 5835a0cadda28041248de606bfa0e708b54b8513 Mon Sep 17 00:00:00 2001 From: Jon Bernard Date: Sat, 4 Jun 2011 09:59:25 -0400 Subject: Reconfigure input parsing for new input set This really needs to be rewritten for future iterations. --- bin/pepseq | 13 ++++--------- sample-input | 17 ++++++++--------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/bin/pepseq b/bin/pepseq index 6ab3922..6d138d7 100755 --- a/bin/pepseq +++ b/bin/pepseq @@ -88,11 +88,11 @@ def main(): bucket4 = [] for char in config.get('DEFAULT', 'bucket4').split(' '): bucket4.append(pepseq.amino_acid.AminoAcid(char)) + bucket4.append(pepseq.amino_acid.AminoAcid('N')) bucket5 = [] for char in config.get('DEFAULT', 'bucket5').split(' '): bucket5.append(pepseq.amino_acid.AminoAcid(char)) - bucket5.append(pepseq.amino_acid.AminoAcid('N')) bucket6 = [] for char in config.get('DEFAULT', 'bucket6').split(' '): @@ -106,20 +106,15 @@ def main(): for char in config.get('DEFAULT', 'bucket8').split(' '): bucket8.append(pepseq.amino_acid.AminoAcid(char)) - bucket9 = [] - for char in config.get('DEFAULT', 'bucket9').split(' '): - bucket9.append(pepseq.amino_acid.AminoAcid(char)) - - possibilities = (bucket1, bucket2, bucket3, - bucket4, bucket5, bucket6, - bucket7, bucket8, bucket9) + possibilities = (bucket1, bucket2, bucket3, bucket4, + bucket5, bucket6, bucket7, bucket8) peptides = [] sequences = tuple(itertools.product(*possibilities)) for sequence in sequences: if sequence[4].letter == 'K': peptide = pepseq.amino_acid.Peptide(sequence) - peptide.branch_before(4) + peptide.branch_before(3) peptides.append(peptide) peptides.sort() diff --git a/sample-input b/sample-input index 480624a..ecb0e91 100644 --- a/sample-input +++ b/sample-input @@ -9,12 +9,11 @@ low = 1545.0 high = 1546.0 -bucket1 = B E T Y -bucket2 = B N A F -bucket3 = B D S H -bucket4 = B Q L W -bucket5 = K -bucket6 = B N I Y -bucket7 = B E V W -bucket8 = B Q P H -bucket9 = B E S F +bucket1 = B Z K W S V +bucket2 = B Z K Y N P +bucket3 = B Z K F T A +bucket4 = K +bucket5 = B Z K H N P +bucket6 = B Z K Y T L +bucket7 = B Z K W S A +bucket8 = Y -- cgit v1.2.3