diff options
author | zsloan | 2020-12-16 15:45:53 -0600 |
---|---|---|
committer | zsloan | 2020-12-16 15:45:53 -0600 |
commit | ec1e37331e320ed674f184b738b9917753b6071f (patch) | |
tree | 941e8935d012df5e3c8101973349a6b99389b7bf | |
parent | cfac2b37f730faba7c60af397d77f0d61752ac8b (diff) | |
download | genenetwork2-ec1e37331e320ed674f184b738b9917753b6071f.tar.gz |
Made change to the way sample table width is calculated to account for sample name width
-rw-r--r-- | wqflask/wqflask/show_trait/show_trait.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/wqflask/wqflask/show_trait/show_trait.py b/wqflask/wqflask/show_trait/show_trait.py index 0c6ae198..4c6dd005 100644 --- a/wqflask/wqflask/show_trait/show_trait.py +++ b/wqflask/wqflask/show_trait/show_trait.py @@ -186,8 +186,6 @@ class ShowTrait(object): self.has_num_cases = has_num_cases(self.this_trait) - self.stats_table_width, self.trait_table_width = get_table_widths(self.sample_groups, self.has_num_cases) - #ZS: Needed to know whether to display bar chart + get max sample name length in order to set table column width self.num_values = 0 self.binary = "true" #ZS: So it knows whether to display the Binary R/qtl mapping method, which doesn't work unless all values are 0 or 1 @@ -206,6 +204,8 @@ class ShowTrait(object): sample_column_width = max_samplename_width * 8 + self.stats_table_width, self.trait_table_width = get_table_widths(self.sample_groups, sample_column_width, self.has_num_cases) + if self.num_values >= 5000: self.maf = 0.01 else: @@ -547,12 +547,12 @@ def get_nearest_marker(this_trait, this_db): return result[0][0] -def get_table_widths(sample_groups, has_num_cases=False): +def get_table_widths(sample_groups, sample_column_width, has_num_cases=False): stats_table_width = 250 if len(sample_groups) > 1: stats_table_width = 450 - trait_table_width = 380 + trait_table_width = 300 + sample_column_width if sample_groups[0].se_exists: trait_table_width += 80 if has_num_cases: |