From aa628fb118a92e5df9818619e25dcc5f96f7a889 Mon Sep 17 00:00:00 2001 From: zsloan Date: Fri, 27 Mar 2020 19:29:37 -0500 Subject: Temporary fix for issue with RData rqtl results having shifted postiions --- .../wqflask/marker_regression/display_mapping_results.py | 16 +++++++++++++--- 1 file 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: -- cgit v1.2.3