aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBonfaceKilz2020-08-19 03:24:27 +0300
committerBonfaceKilz2020-08-19 03:24:27 +0300
commit17a72093f829666cc6e8df722771d31066dd71d0 (patch)
treebb3d61bec3bef453a70468da727b9f91558418ad
parente8e7f835861b6e4eb940a9f55b7769d225f2c87d (diff)
downloadgenenetwork2-17a72093f829666cc6e8df722771d31066dd71d0.tar.gz
Handle the move of reduce() to functools.reduce()
Run `2to3-3.8 -f reduce -w .` See: <https://docs.python.org/2/library/2to3.html#2to3fixer-reduce>
-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")