(p, nsubs)
Combining p-values for meta-analysis statistics

    Function that takes pvals from each experiments and number of subjects to
    return meta-analysis significance using Stouffer's method

    Parameters
    ----------
    p: DataFrame
        p-values for 2 pipelines computed on different datasets
    nsubs: float
        average number of subject per datasets

    Returns
    -------
    pval: float
        Estimatation of the combined p-value
Combining p-values for meta-analysis statistics
Combining p - values for meta - analysis statistics
def combine_pvalues(p, nsubs):
    """Combining p-values for meta-analysis statistics

    Function that takes pvals from each experiments and number of subjects to
    return meta-analysis significance using Stouffer's method

    Parameters
    ----------
    p: DataFrame
        p-values for 2 pipelines computed on different datasets
    nsubs: float
        average number of subject per datasets

    Returns
    -------
    pval: float
        Estimatation of the combined p-value
    """
    if len(p) == 1:
        return p.item()
    else:
        W = np.sqrt(nsubs)
        out = stats.combine_pvalues(np.array(p), weights=W, method="stouffer")[1]
        return out
def combine_pvalues ( p , nsubs ) : if len ( p ) == 1 : return p . item ( ) else : W = np . sqrt ( nsubs ) out = stats . combine_pvalues ( np . array ( p ) , weights = W , method = "stouffer" ) [ 1 ] return out