From 5e4ad30102ea38de61abe995a97d65d42530640a Mon Sep 17 00:00:00 2001 From: "Uemit Seren (Work)" Date: Wed, 22 Aug 2018 11:13:01 +0200 Subject: [PATCH] Bugfix: Correct figure labels for FDRs --- Changelog | 4 ++++ pygwas/__init__.py | 4 ++-- pygwas/core/plotting.py | 8 ++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Changelog b/Changelog index 97db70c..5b18b40 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,7 @@ +1.7.3 +--- +* Bugfix: Correct figure label for FDR + 1.7.2 -- * Enhancement: Users can specifiy if the chromosome should be colored in different colors and which fdr threshold to include in the Manhattan plots diff --git a/pygwas/__init__.py b/pygwas/__init__.py index 3d2672d..33df803 100644 --- a/pygwas/__init__.py +++ b/pygwas/__init__.py @@ -1,3 +1,3 @@ -__version__ = '1.7.2' -__updated__ = "20.09.2017" +__version__ = '1.7.3' +__updated__ = "22.08.2018" __date__ = "20.8.2014" diff --git a/pygwas/core/plotting.py b/pygwas/core/plotting.py index 06976ae..9a3a448 100644 --- a/pygwas/core/plotting.py +++ b/pygwas/core/plotting.py @@ -72,16 +72,16 @@ def plot_gwas_result(gwas_result,output_file,chrs=None,mac=15, marker_size=10, f score_range = max_score - min_score padding = 0.05*(score_range) - fdr_labels = set() - fdr_handles = ()# + fdr_labels = () + fdr_handles = () if fdr in ('all','bonferroni'): handle, = plt.plot([0, x_range], [bonferroni_threshold, bonferroni_threshold], color='r', linestyle="--", linewidth=1, alpha=.5) fdr_handles = fdr_handles + (handle,) - fdr_labels.add("Bonferroni") + fdr_labels = fdr_labels + ("Bonferroni",) if bh_thres is not None and fdr in ('all', 'benjamini_hochberg'): handle, = plt.plot([0, x_range], [bh_thres, bh_thres], color='b', linestyle='--', linewidth=1, alpha=.5) fdr_handles = fdr_handles + (handle,) - fdr_labels.add("Benjamini Hochberg") + fdr_labels = fdr_labels + ("Benjamini Hochberg",) if len(fdr_labels) > 0: plt.figlegend(fdr_handles, fdr_labels, 'upper right') plt.axis([-x_range * 0.01, x_range * 1.01, min_score - padding, max_score + padding])