From 2bd4c3af00d40269b2d302407e823b72e877d5da Mon Sep 17 00:00:00 2001
From: Tim O'Donnell <timodonnell@gmail.com>
Date: Sun, 15 Sep 2019 21:42:05 -0400
Subject: [PATCH] Shuffle random negative peptides

---
 mhcflurry/class1_neural_network.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mhcflurry/class1_neural_network.py b/mhcflurry/class1_neural_network.py
index 78e7ad69..69dd8d62 100644
--- a/mhcflurry/class1_neural_network.py
+++ b/mhcflurry/class1_neural_network.py
@@ -5,6 +5,7 @@ import weakref
 import itertools
 import os
 import logging
+import random
 import pickle
 
 import numpy
@@ -930,6 +931,7 @@ class Class1NeuralNetwork(object):
                         count,
                         length=length,
                         distribution=aa_distribution))
+            random.shuffle(random_negative_peptides_list)
             random_negative_peptides = EncodableSequences.create(
                 random_negative_peptides_list)
             random_negative_peptides_encoding = (
-- 
GitLab