def get_bon_thresh(normalized, power): # same
"""
Calculate the bonferroni correction threshold.
Divide the power by the sum of all finite values (all non-nan values).
:param normalized: an array of all normalized p-values. Normalized p-values are -log10(p) where p is the p-value.
:param power: the threshold power being used (usually 0.05)
:type normalized: numpy array
:type power: float
:returns: The bonferroni correction
:rtype: float
"""
return power / sum(np.isfinite(normalized))
评论列表
文章目录