Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bonferroni correction actually makes results more significant #12

Closed
josiahseaman opened this issue Jul 30, 2018 · 2 comments
Closed

Bonferroni correction actually makes results more significant #12

josiahseaman opened this issue Jul 30, 2018 · 2 comments
Labels

Comments

@josiahseaman
Copy link

josiahseaman commented Jul 30, 2018

When I used goenrich.enrich.analyze(O, query_genes, 'Background', method='bonferroni') I was surprised to find that the q values were actually lower than the p values. Is it possible the math in your bonferroni correction is backwards?

if method == 'bonferroni':
        q[mask] = p / len(p)

where it should probably be q[mask] = min(1, p * len(p))

@jdrudolph
Copy link
Owner

jdrudolph commented Jul 31, 2018

Well spotted! You are definitely correct. I'll try to find some time to apply the fix, or you can go ahead and make a pull request. Thank you for reporting this.

@jdrudolph jdrudolph added the bug label Jul 31, 2018
@jdrudolph
Copy link
Owner

Fixed by 68ee3f7. A fixed version 1.10.2 was already released and goenrich can be updated with pip.
Thanks again @josiahseaman

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants