aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorBonfaceKilz2020-08-19 02:41:46 +0300
committerBonfaceKilz2020-08-19 02:41:46 +0300
commite55b1502340cc99cd8a5d705261a5ff3c87f3718 (patch)
tree8b38bf14565a74a58159553fbe947460f7ee218a /wqflask
parent28e75b1c96819eab1e8052a3045ece26e5f35c42 (diff)
downloadgenenetwork2-e55b1502340cc99cd8a5d705261a5ff3c87f3718.tar.gz
Change `dict.has_key(key)` to `key in dict`
Run `2to3-3.8 -f has_key -w .` See: <https://docs.python.org/2/library/2to3.html#2to3fixer-has_key>
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/marker_regression/plink_mapping.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/wqflask/wqflask/marker_regression/plink_mapping.py b/wqflask/wqflask/marker_regression/plink_mapping.py
index 9571015e..38ef7190 100644
--- a/wqflask/wqflask/marker_regression/plink_mapping.py
+++ b/wqflask/wqflask/marker_regression/plink_mapping.py
@@ -111,7 +111,7 @@ def parse_plink_output(output_filename, species):
line_list = build_line_list(line=line)
# only keep the records whose chromosome name is in db
- if species.chromosomes.chromosomes.has_key(int(line_list[0])) and line_list[-1] and line_list[-1].strip()!='NA':
+ if int(line_list[0]) in species.chromosomes.chromosomes and line_list[-1] and line_list[-1].strip()!='NA':
chr_name = species.chromosomes.chromosomes[int(line_list[0])]
snp = line_list[1]
@@ -121,7 +121,7 @@ def parse_plink_output(output_filename, species):
if p_value < threshold_p_value:
p_value_dict[snp] = float(p_value)
- if plink_results.has_key(chr_name):
+ if chr_name in plink_results:
value_list = plink_results[chr_name]
# pvalue range is [0,1]