diff options
author | GN2 | 2020-03-27 19:29:53 -0500 |
---|---|---|
committer | GN2 | 2020-03-27 19:29:53 -0500 |
commit | 12ebdcf0b61d95abed0fd41e91cb0bf5e6898a73 (patch) | |
tree | 14feef2921db0a3e17ab70f11fa25aad38a3c7e8 /wqflask | |
parent | 8fda0e93cbf10cfcd6f97fd67cb3a175d62cb48d (diff) | |
parent | aa628fb118a92e5df9818619e25dcc5f96f7a889 (diff) | |
download | genenetwork2-12ebdcf0b61d95abed0fd41e91cb0bf5e6898a73.tar.gz |
Merge branch 'testing' of https://github.com/genenetwork/genenetwork2 into HEAD
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/marker_regression/display_mapping_results.py | 16 |
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: |