aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2019-06-24 13:28:04 -0500
committerzsloan2019-06-24 13:28:04 -0500
commitdfa74d2bb2046a98af6ba6efe2c9bcf62963c9fb (patch)
tree9a5289584dc091cdb40444ae8e124522813a58be /wqflask
parent4a7c35204863066dc387637bd0f8af7d274cde55 (diff)
downloadgenenetwork2-dfa74d2bb2046a98af6ba6efe2c9bcf62963c9fb.tar.gz
Fixed issue that caused API genotypes query to not work when no limit_to set
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/api/router.py4
1 files changed, 2 insertions, 2 deletions
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