aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2021-02-16 22:07:14 +0000
committerzsloan2021-02-16 22:07:14 +0000
commit35f1f86844f46d2633d899c4e9f6a56f3ddf0706 (patch)
tree1730d1a5849247ded765cbaa7ee4f7074ad92e22 /wqflask
parentecd189bd171efab8405dd3d8875ee402578bea6f (diff)
downloadgenenetwork2-35f1f86844f46d2633d899c4e9f6a56f3ddf0706.tar.gz
Changed a couple loops to checking if value is in a list comprehension
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/marker_regression/display_mapping_results.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/wqflask/wqflask/marker_regression/display_mapping_results.py b/wqflask/wqflask/marker_regression/display_mapping_results.py
index 4df56190..47c64a69 100644
--- a/wqflask/wqflask/marker_regression/display_mapping_results.py
+++ b/wqflask/wqflask/marker_regression/display_mapping_results.py
@@ -1603,9 +1603,8 @@ class DisplayMappingResults(object):
for k, _geno in enumerate (_chr[j].genotype):
plotbxd=0
- for item in smd:
- if item.name == samplelist[k]:
- plotbxd=1
+ if samplelist[k] in [item.name for item in smd]:
+ plotbxd=1
if (plotbxd == 1):
ind = 0
@@ -1614,6 +1613,7 @@ class DisplayMappingResults(object):
counter = counter + 1
if item.name == samplelist[k]:
ind = counter
+
maxind=max(ind, maxind)
# lines
@@ -1687,9 +1687,8 @@ class DisplayMappingResults(object):
for j, _geno in enumerate(_chr[1].genotype):
plotbxd=0
- for item in smd:
- if item.name == samplelist[j]:
- plotbxd=1
+ if samplelist[j] in [item.name for item in smd]:
+ plotbxd=1
if (plotbxd == 1):