Skip to content

Commit

Permalink
Bugfix: Correct figure labels for FDRs
Browse files Browse the repository at this point in the history
  • Loading branch information
timeu committed Aug 22, 2018
1 parent 1618295 commit 5e4ad30
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions pygwas/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = '1.7.2'
__updated__ = "20.09.2017"
__version__ = '1.7.3'
__updated__ = "22.08.2018"
__date__ = "20.8.2014"
8 changes: 4 additions & 4 deletions pygwas/core/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 5e4ad30

Please sign in to comment.