From f9004041cf461644fc6b6758bf8f5c305f4ad52f Mon Sep 17 00:00:00 2001 From: SaberHQ Date: Thu, 18 Jul 2019 14:28:37 -0700 Subject: [PATCH] Fixed bug related to import maketrans --- src/simulator.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/simulator.py b/src/simulator.py index e65bd92..f8909a5 100755 --- a/src/simulator.py +++ b/src/simulator.py @@ -24,7 +24,13 @@ from time import strftime from time import sleep import numpy as np -from string import maketrans + +if sys.version_info[0] < 3: + from string import maketrans + trantab = maketrans("T", "U") +else: + trantab = str.maketrans("T", "U") + from sklearn.externals import joblib try: @@ -40,7 +46,6 @@ CONTACT = "cheny@bcgsc.ca; shafezqorani@bcgsc.ca" BASES = ['A', 'T', 'C', 'G'] -trantab = maketrans("T", "U") def select_ref_transcript(input_dict):