diff options
author | zsloan | 2021-02-16 22:07:14 +0000 |
---|---|---|
committer | zsloan | 2021-02-16 22:07:14 +0000 |
commit | 35f1f86844f46d2633d899c4e9f6a56f3ddf0706 (patch) | |
tree | 1730d1a5849247ded765cbaa7ee4f7074ad92e22 /wqflask | |
parent | ecd189bd171efab8405dd3d8875ee402578bea6f (diff) | |
download | genenetwork2-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.py | 11 |
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): |