From bca8ccf549ffc26c8b9269a53337df8f0efc63ad Mon Sep 17 00:00:00 2001
From: Arun Ahuja <aahuja11@gmail.com>
Date: Sun, 13 Dec 2015 16:29:35 -0500
Subject: [PATCH] py3 pickle error; needs bytes flag

---
 scripts/create-combined-class1-dataset.py | 2 +-
 scripts/create-iedb-class1-dataset.py     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/create-combined-class1-dataset.py b/scripts/create-combined-class1-dataset.py
index c712cb24..486e8fe3 100755
--- a/scripts/create-combined-class1-dataset.py
+++ b/scripts/create-combined-class1-dataset.py
@@ -68,7 +68,7 @@ if __name__ == "__main__":
     args = parser.parse_args()
 
     print("Reading %s..." % args.iedb_pickle_path)
-    with open(args.iedb_pickle_path, "r") as f:
+    with open(args.iedb_pickle_path, "rb") as f:
         iedb_datasets = pickle.load(f)
 
     print("Reading %s..." % args.netmhcpan_csv_path)
diff --git a/scripts/create-iedb-class1-dataset.py b/scripts/create-iedb-class1-dataset.py
index 22728b8a..a06641b8 100755
--- a/scripts/create-iedb-class1-dataset.py
+++ b/scripts/create-iedb-class1-dataset.py
@@ -84,5 +84,5 @@ if __name__ == "__main__":
                 "percent_positive",
                 "count"])
         print("# distinct pMHC entries: %d" % len(columns["mhc"]))
-    with open(OUTPUT_PATH, "w") as f:
+    with open(OUTPUT_PATH, "wb") as f:
         pickle.dump(assay_dataframes, f, pickle.HIGHEST_PROTOCOL)
-- 
GitLab