python - 通过超几何分析对 p 值进行 Bonferroni 校正

标签 python statistics analysis error-correction false-positive

我进行了超几何分析(使用 Python 脚本)来研究 GO-terms 在基因子集中的富集。我的输出示例如下:

GO00001 1500    300 200 150 5.39198144708e-77
GO00002 1500    500 400 350 1.18917839281e-160
GO00003 1500    400 350 320 9.48402847878e-209
GO00004 1500    100 100 75  3.82935778527e-82
GO00005 1500    100 80  80  2.67977253966e-114

在哪里

Column1 = GO ID
Column2 = Total sum of all terms in the original dataset
Column3 = Total sum of [Column 1] IDs in the original dataset
Column4 = Sum of all terms in the subset
Column5 = Sum of [Column 1] IDs in subset
Column6 = pvalue derived from hypergeometric test

我知道我必须将实验次数乘以 pvalue,但我不确定如何使用我拥有的数据执行此操作。我是从子集计算还是从原始数据集和子集的组合计算?例如,它会是:

Column2 * Column5 * pvalue
Column3 * Column5 * pvalue
Column4 * Column5 * pvalue

如果这看起来像是一个愚蠢的问题,我深表歉意,但我似乎无法理解它。非常感谢!

最佳答案

from statsmodels.sandbox.stats.multicomp import multipletests
p_adjusted = multipletests(Column6, method='bonferroni')

还是我遗漏了什么?..

关于python - 通过超几何分析对 p 值进行 Bonferroni 校正,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41517159/

相关文章:

uml - 如何在 UML 中实现 CRUD 操作

python - 使用 Beautiful Soup 提取链接的等效正则表达式

Python:在 xml 中,如何删除父节点内的节点

algorithm - 确定事件尚未发生时发生的可能性

r - 将数据从长数据更改为矩阵

algorithm - 简化 T(n) 运行时

python - 在单元测试中使用 doctests

python - 检测代码是否正在 migrate/makemigrations 命令的上下文中运行

python - 使用 CURVE_FIT 在 Python 中拟合对数正态分布

c++ - C++ 中多个帧的 Blob ID 匹配(图像分析)