aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBonfaceKilz2020-10-02 00:39:06 +0300
committerBonfaceKilz2020-10-02 00:39:06 +0300
commit94c36c8c93bea837a6e277d1dc3a2bc9120f9044 (patch)
treee0bc8b5d4fc82ff79b2494ffa4e5b79e9da21fea
parent4aa6c2dc7d6e74316e793f219a6a44411fbef5ac (diff)
downloadgenenetwork2-94c36c8c93bea837a6e277d1dc3a2bc9120f9044.tar.gz
Cast "previous_chr" to an int
* wqflask/wqflask/marker_regression/gemma_mapping.py (parse_loco_output): Cast "previous_chr" to an int which prevents the error "Python typeerror: ‘>’ not supported between instances of ‘str’ and ‘int’" from being thrown. The error is **only** thrown in Python3.
-rw-r--r--wqflask/wqflask/marker_regression/gemma_mapping.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/wqflask/wqflask/marker_regression/gemma_mapping.py b/wqflask/wqflask/marker_regression/gemma_mapping.py
index b858b573..68a8d5ba 100644
--- a/wqflask/wqflask/marker_regression/gemma_mapping.py
+++ b/wqflask/wqflask/marker_regression/gemma_mapping.py
@@ -218,9 +218,9 @@ def parse_loco_output(this_dataset, gwa_output_filename):
marker['chr'] = int(line.split("\t")[0][3:])
else:
marker['chr'] = int(line.split("\t")[0])
- if marker['chr'] > previous_chr:
+ if marker['chr'] > int(previous_chr):
previous_chr = marker['chr']
- elif marker['chr'] < previous_chr:
+ elif marker['chr'] < int(previous_chr):
break
else:
marker['chr'] = line.split("\t")[0]