From 5e08316b491a6225eddbc27cfdd799cff1bc0283 Mon Sep 17 00:00:00 2001 From: zsloan Date: Tue, 3 Nov 2020 15:18:25 -0600 Subject: Fixed a sort used when doing the haplotype analysis to be compatible with Python 3 * wqflask/wqflask/marker_regression/display_mapping_results.py - The arguments for sort are different in Python 3, so it was changed to be compatible --- wqflask/wqflask/marker_regression/display_mapping_results.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/marker_regression/display_mapping_results.py b/wqflask/wqflask/marker_regression/display_mapping_results.py index 7e43f6bd..b5686b70 100644 --- a/wqflask/wqflask/marker_regression/display_mapping_results.py +++ b/wqflask/wqflask/marker_regression/display_mapping_results.py @@ -1460,7 +1460,7 @@ class DisplayMappingResults(object): else: continue - smd.sort(lambda A, B: cmp(A.value, B.value)) + smd.sort(key = lambda A: A.value) smd.reverse() samplelist = list(self.genotype.prgy) -- cgit v1.2.3 From 96b095aa83ed113250442e4c6f180c7dd66d3e0e Mon Sep 17 00:00:00 2001 From: zsloan Date: Tue, 3 Nov 2020 15:20:05 -0600 Subject: Changed the syntax for the "sort" function in the docstring of GeneralObject to be compatible with Python 3 syntax * wqflask/base/GeneralObject.py - edited docstring to be correct for Python 3 --- wqflask/base/GeneralObject.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wqflask') diff --git a/wqflask/base/GeneralObject.py b/wqflask/base/GeneralObject.py index 0122ee32..249195e2 100644 --- a/wqflask/base/GeneralObject.py +++ b/wqflask/base/GeneralObject.py @@ -28,7 +28,7 @@ class GeneralObject: """ Base class to define an Object. a = [Spam(1, 4), Spam(9, 3), Spam(4,6)] - a.sort(lambda x, y: cmp(x.eggs, y.eggs)) + a.sort(key = lambda x: x.eggs) """ def __init__(self, *args, **kw): -- cgit v1.2.3