about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/maintenance/readProbeSetSE_v7.py2
-rw-r--r--wqflask/wqflask/marker_regression/plink_mapping.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/scripts/maintenance/readProbeSetSE_v7.py b/scripts/maintenance/readProbeSetSE_v7.py
index 7b2fee87..2700a8ef 100755
--- a/scripts/maintenance/readProbeSetSE_v7.py
+++ b/scripts/maintenance/readProbeSetSE_v7.py
@@ -223,7 +223,7 @@ while line:
     line2 = list(map(string.strip, line2))
 
     CellId = line2[0]
-    if not ProbeNameId.has_key(CellId):
+    if CellId not in ProbeNameId:
         ferror.write(CellId + " doesn't exist\n")
     else:
         DataId = ProbeNameId[CellId]
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]