From dfa74d2bb2046a98af6ba6efe2c9bcf62963c9fb Mon Sep 17 00:00:00 2001 From: zsloan Date: Mon, 24 Jun 2019 13:28:04 -0500 Subject: Fixed issue that caused API genotypes query to not work when no limit_to set --- wqflask/wqflask/api/router.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/api/router.py b/wqflask/wqflask/api/router.py index cbff6e83..1a948b1a 100644 --- a/wqflask/wqflask/api/router.py +++ b/wqflask/wqflask/api/router.py @@ -714,7 +714,7 @@ def get_genotypes(group_name, file_format="csv"): if line[0] == "#" or line[0] == "@": output_lines.append([line.strip()]) else: - if i >= limit_num: + if limit_num and i >= limit_num: break output_lines.append(line.split()) i += 1 @@ -730,7 +730,7 @@ def get_genotypes(group_name, file_format="csv"): with open("{0}/{1}_geno.txt".format(flat_files("genotype/bimbam"), group_name)) as genofile: i = 0 for line in genofile: - if i >= limit_num: + if limit_num and i >= limit_num: break output_lines.append([line.strip() for line in line.split(",")]) i += 1 -- cgit v1.2.3