From 00f7aed2f2da165314bacf33b8fb16d00fc8ec26 Mon Sep 17 00:00:00 2001 From: zsloan Date: Thu, 29 Oct 2020 15:58:16 -0500 Subject: Fixed issue with single-chromosome mapping after the bootstrap fix and fixed error that occurred if either bootstrap or permutations were set to 0 * wqflask/wqflask/marker_regression/display_mapping_results.py - Cast self.qtlresults 'chr' as a string since the comparison between it and the chromosome names was faililng due to numeric chromosomes being int type + used a list comprehension that converts None to an empty string when creating a comma-joined string from the list of mapping output files --- wqflask/wqflask/marker_regression/display_mapping_results.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wqflask/wqflask/marker_regression/display_mapping_results.py b/wqflask/wqflask/marker_regression/display_mapping_results.py index 2fc633aa..7e43f6bd 100644 --- a/wqflask/wqflask/marker_regression/display_mapping_results.py +++ b/wqflask/wqflask/marker_regression/display_mapping_results.py @@ -342,7 +342,7 @@ class DisplayMappingResults(object): if 'reaper_version' in list(start_vars.keys()) and self.mapping_method == "reaper": self.reaper_version = start_vars['reaper_version'] if 'output_files' in start_vars: - self.output_files = ",".join(start_vars['output_files']) + self.output_files = ",".join([(the_file if the_file is not None else "") for the_file in start_vars['output_files']]) self.categorical_vars = "" self.perm_strata = "" @@ -752,7 +752,7 @@ class DisplayMappingResults(object): BootChrCoord.append([Xc, self.bootResult[i]]) else: for i, result in enumerate(self.qtlresults): - if result['chr'] == self.ChrList[self.selectedChr][0]: + if str(result['chr']) == str(self.ChrList[self.selectedChr][0]): if self.plotScale == 'physic': Xc = startX + (result['Mb']-self.startMb)*plotXScale else: -- cgit v1.2.3