aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wqflask/wqflask/correlation_matrix/show_corr_matrix.py6
-rw-r--r--wqflask/wqflask/marker_regression/display_mapping_results.py4
2 files changed, 9 insertions, 1 deletions
diff --git a/wqflask/wqflask/correlation_matrix/show_corr_matrix.py b/wqflask/wqflask/correlation_matrix/show_corr_matrix.py
index a912344f..e6c817e7 100644
--- a/wqflask/wqflask/correlation_matrix/show_corr_matrix.py
+++ b/wqflask/wqflask/correlation_matrix/show_corr_matrix.py
@@ -42,6 +42,10 @@ import rpy2.robjects as robjects
from pprint import pformat as pf
from utility.redis_tools import get_redis_conn
+try: # Only import this for Python3
+ from functools import reduce
+except:
+ pass
Redis = get_redis_conn()
THIRTY_DAYS = 60 * 60 * 24 * 30
@@ -302,4 +306,4 @@ def sortEigenVectors(vector):
A = [x*100.0/sum for x in A]
return [A, B]
except:
- return [] \ No newline at end of file
+ return []
diff --git a/wqflask/wqflask/marker_regression/display_mapping_results.py b/wqflask/wqflask/marker_regression/display_mapping_results.py
index 0328ce85..c8b9c405 100644
--- a/wqflask/wqflask/marker_regression/display_mapping_results.py
+++ b/wqflask/wqflask/marker_regression/display_mapping_results.py
@@ -48,6 +48,10 @@ from base.webqtlConfig import TMPDIR, GENERATED_TEXT_DIR, GENERATED_IMAGE_DIR
from utility.pillow_utils import draw_rotated_text, draw_open_polygon
import utility.logger
+try: # Only import this for Python3
+ from functools import reduce
+except:
+ pass
logger = utility.logger.getLogger(__name__ )
RED = ImageColor.getrgb("red")