From 94c36c8c93bea837a6e277d1dc3a2bc9120f9044 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Fri, 2 Oct 2020 00:39:06 +0300 Subject: 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. --- wqflask/wqflask/marker_regression/gemma_mapping.py | 4 ++-- 1 file 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] -- cgit v1.2.3