aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2021-07-01 21:40:24 +0000
committerzsloan2021-07-01 21:40:24 +0000
commit74c1d6a6ef070271adaf486fc9a494662855d96f (patch)
treebbcf99354e41357665a286c062e3e8d0cbb2fad2
parentd4c990beaf72dd885d6baa7dc1035a7044c79cdd (diff)
downloadgenenetwork2-74c1d6a6ef070271adaf486fc9a494662855d96f.tar.gz
Fixed issue with suggestive/significant lines extending beyond figure edge + fixed a couple issues with the last commit
-rw-r--r--wqflask/wqflask/marker_regression/display_mapping_results.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/wqflask/wqflask/marker_regression/display_mapping_results.py b/wqflask/wqflask/marker_regression/display_mapping_results.py
index 1fcc2832..f941267e 100644
--- a/wqflask/wqflask/marker_regression/display_mapping_results.py
+++ b/wqflask/wqflask/marker_regression/display_mapping_results.py
@@ -2372,8 +2372,7 @@ class DisplayMappingResults:
# ZS: I don't know if what I did here with this inner function is clever or overly complicated, but it's the only way I could think of to avoid duplicating the code inside this function
def add_suggestive_significant_lines_and_legend(start_pos_x, chr_length_dist):
- rightEdge = int(start_pos_x + chr_length_dist * \
- plotXScale - self.SUGGESTIVE_WIDTH / 1.5)
+ rightEdge = xLeftOffset + plotWidth
im_drawer.line(
xy=((start_pos_x + self.SUGGESTIVE_WIDTH / 1.5, suggestiveY),
(rightEdge, suggestiveY)),
@@ -2561,7 +2560,7 @@ class DisplayMappingResults:
Xc = startPosX + ((qtlresult['Mb'] - start_cm - startMb) * plotXScale) * (
((qtlresult['Mb'] - start_cm - startMb) * plotXScale) / ((qtlresult['Mb'] - start_cm - startMb + self.GraphInterval) * plotXScale))
else:
- if qtlresult['Mb'] > endMb:
+ if self.selectedChr != -1 and qtlresult['Mb'] > endMb:
Xc = startPosX + endMb * plotXScale
else:
Xc = startPosX + (qtlresult['Mb'] - startMb) * plotXScale
@@ -2630,7 +2629,7 @@ class DisplayMappingResults:
AdditiveHeightThresh / additiveMax
AdditiveCoordXY.append((Xc, Yc))
- if qtlresult['Mb'] > endMb:
+ if self.selectedChr != -1 and qtlresult['Mb'] > endMb:
break
m += 1