Skip to content

Commit

Permalink
Merge pull request #38 from mfiers/master
Browse files Browse the repository at this point in the history
Fix bonferroni corr. to prevent p>1
  • Loading branch information
tanghaibao committed Jun 4, 2015
2 parents 1b5bbc8 + 708f56e commit b1f1a4c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions goatools/multiple_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ class Bonferroni(AbstractCorrection):
def set_correction(self):
self.corrected_pvals *= self.n

# reset all pvals > 1 to 1
self.corrected_pvals[self.corrected_pvals > 1] = 1


class Sidak(AbstractCorrection):
"""http://en.wikipedia.org/wiki/Bonferroni_correction
Expand Down

0 comments on commit b1f1a4c

Please sign in to comment.