File tree Expand file tree Collapse file tree 2 files changed +26
-3
lines changed Expand file tree Collapse file tree 2 files changed +26
-3
lines changed Original file line number Diff line number Diff line change @@ -33,14 +33,37 @@ def smart_sort_comparator(a1, a2):
3333 return 1
3434
3535 # If the first fields are equal, try the 2nd fields
36- a1_f2 = int (a1 [a1 .find (':' )+ 1 :])
37- a2_f2 = int (a2 [a2 .find (':' )+ 1 :])
36+
37+ a1_f2 = int (a1 .split (':' )[1 ])
38+ a2_f2 = int (a2 .split (':' )[1 ])
3839
3940 if a1_f2 < a2_f2 :
4041 return - 1
4142 if a1_f2 > a2_f2 :
4243 return 1
4344
45+ # If the two fields are equal, try the 3rd fields
46+
47+ a1_f3 = int (a1 .split (':' )[2 ])
48+ a2_f3 = int (a2 .split (':' )[2 ])
49+
50+ if a1_f3 < a2_f3 :
51+ return - 1
52+ if a1_f3 > a2_f3 :
53+ return 1
54+
55+ # If the two fields are equal, try the 4th fields
56+
57+ a1_f4 = int (a1 .split (':' )[3 ])
58+ a2_f3 = int (a2 .split (':' )[3 ])
59+
60+ if a1_f4 < a2_f4 :
61+ return - 1
62+ if a1_f4 > a2_f4 :
63+ return 1
64+
65+
66+
4467 # All fields are equal
4568 return 0
4669
Original file line number Diff line number Diff line change 4242
4343setup (
4444 name = 'py-ard' ,
45- version = '0.0.17 ' ,
45+ version = '0.0.18 ' ,
4646 description = "ARD reduction for HLA with python" ,
4747 long_description = readme + '\n \n ' + history ,
4848 author = "CIBMTR" ,
You can’t perform that action at this time.
0 commit comments