Skip to content

Commit

Permalink
Merge pull request #107 from mwalzer/fix/external-peptide-grouping
Browse files Browse the repository at this point in the history
[FIX] made the hand-over to external prediction methods way more effi…
  • Loading branch information
Mathias Walzer committed Nov 18, 2015
2 parents dff2b3c + 6dc0985 commit 22084ec
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 22084ec

Please sign in to comment.