Skip to content

Commit

Permalink
[FIX] made the hand-over to external prediction methods way more effi…
Browse files Browse the repository at this point in the history
…cient, peptide grouping for external methods was not doing was is was supposed to do
  • Loading branch information
mwalzer committed Nov 18, 2015
1 parent 1b54842 commit 6dc0985
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Fred2/EpitopePrediction/External.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ def predict(self, peptides, alleles=None, command=None, options=None, **kwargs):
allele_groups.append(allele_group)
# export peptides to peptide list

for length, peps in itertools.groupby(pep_seqs.iterkeys(), key=lambda x: len(x)):
pep_groups = pep_seqs.keys()
pep_groups.sort(key=len)
for length, peps in itertools.groupby(pep_groups, key=len):
if length < min(self.supportedLength):
warnings.warn("Peptide length must be at least %i for %s but is %i" % (min(self.supportedLength),
self.name, length))
Expand Down

0 comments on commit 6dc0985

Please sign in to comment.