aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2020-03-27 19:29:37 -0500
committerzsloan2020-03-27 19:29:37 -0500
commitaa628fb118a92e5df9818619e25dcc5f96f7a889 (patch)
tree14feef2921db0a3e17ab70f11fa25aad38a3c7e8
parent0e240cbfc6034b65b42c2d21f59ae2663dd2f6ec (diff)
downloadgenenetwork2-aa628fb118a92e5df9818619e25dcc5f96f7a889.tar.gz
Temporary fix for issue with RData rqtl results having shifted postiions
-rw-r--r--wqflask/wqflask/marker_regression/display_mapping_results.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/wqflask/wqflask/marker_regression/display_mapping_results.py b/wqflask/wqflask/marker_regression/display_mapping_results.py
index cf4508dd..302a4ff9 100644
--- a/wqflask/wqflask/marker_regression/display_mapping_results.py
+++ b/wqflask/wqflask/marker_regression/display_mapping_results.py
@@ -356,7 +356,11 @@ class DisplayMappingResults(object):
self.ChrLengthCMList = []
for i, _chr in enumerate(self.genotype):
- self.ChrLengthCMList.append(_chr[-1].cM - _chr[0].cM)
+ if self.mapping_method == "rqtl_geno" and self.genotype.filler == True:
+ self.ChrLengthCMList.append(_chr[-1].cM)
+ else:
+ self.ChrLengthCMList.append(_chr[-1].cM - _chr[0].cM)
+
self.ChrLengthCMSum = reduce(lambda x, y:x+y, self.ChrLengthCMList, 0.0)
if self.plotScale == 'physic':
@@ -1564,7 +1568,10 @@ class DisplayMappingResults(object):
if self.selectedChr == -1: #ZS: If viewing full genome/all chromosomes
for i, _chr in enumerate(self.genotype):
thisChr = []
- Locus0CM = _chr[0].cM
+ if self.mapping_method == "rqtl_geno" and self.genotype.filler == True:
+ Locus0CM = 0
+ else:
+ Locus0CM = _chr[0].cM
nLoci = len(_chr)
if nLoci <= 8:
for _locus in _chr:
@@ -1586,7 +1593,10 @@ class DisplayMappingResults(object):
for i, _chr in enumerate(self.genotype):
if _chr.name == self.ChrList[self.selectedChr][0]:
thisChr = []
- Locus0CM = _chr[0].cM
+ if self.mapping_method == "rqtl_geno" and self.genotype.filler == True:
+ Locus0CM = 0
+ else:
+ Locus0CM = _chr[0].cM
for _locus in _chr:
if _locus.name != ' - ':
if _locus.cM != preLpos: