lama/stats/permutation_stats/distributions.py
def _null_line_thread(*args) -> List[float]:
    """
    Create a null distribution for a single label.  This can put put onto a thread or process

    Returns
    -------
    pvalue distribution
    """
    data, num_perms, wt_indx_combinations, label = args
    print('Generating null for', label)

    label = data.columns[0]

    data = data.astype({label: np.float,
                        'staging': np.float})

    synthetics_sets_done = []

    line_p = []

    perms_done = 0

    # Get combinations of WT indices for current label
    indxs = wt_indx_combinations[label]
    for comb in indxs:
        data.loc[:, 'genotype'] = 'wt'
        data.loc[data.index.isin(comb), 'genotype'] = 'synth_hom'
        # _label_synthetic_mutants(data, n, synthetics_sets_done)

        perms_done += 1

        model = smf.ols(formula=f'{label} ~ C(genotype) + staging', data=data, missing='drop')
        fit = model.fit()
        p = fit.pvalues['C(genotype)[T.wt]']

        line_p.append(p)
    return line_p

    Create a null distribution for a single label.  This can put put onto a thread or process

    Returns
    -------
    pvalue distribution
    
Create a null distribution for a single label.  This can put put onto a thread or process
Returns

pvalue distribution
Create a null distribution for a single label . This can put put onto a thread or process Returns pvalue distribution
def _null_line_thread(*args) -> List[float]:
    data, num_perms, wt_indx_combinations, label = args
    print('Generating null for', label)
    label = data.columns[0]
    data = data.astype({label: np.float,
                        'staging': np.float})
    synthetics_sets_done = []
    line_p = []
    perms_done = 0
    indxs = wt_indx_combinations[label]
    for comb in indxs:
        data.loc[:, 'genotype'] = 'wt'
        data.loc[data.index.isin(comb), 'genotype'] = 'synth_hom'
        perms_done += 1
        model = smf.ols(formula=f'{label} ~ C(genotype) + staging', data=data, missing='drop')
        fit = model.fit()
        p = fit.pvalues['C(genotype)[T.wt]']
        line_p.append(p)
    return line_p
def _null_line_thread ( * args ) -> List [ float ] : data , num_perms , wt_indx_combinations , label = args print ( 'Generating null for' , label ) label = data . columns [ 0 ] data = data . astype ( { label : np . float , 'staging' : np . float } ) synthetics_sets_done = [ ] line_p = [ ] perms_done = 0 indxs = wt_indx_combinations [ label ] for comb in indxs : data . loc [ : , 'genotype' ] = 'wt' data . loc [ data . index . isin ( comb ) , 'genotype' ] = 'synth_hom' perms_done += 1 model = smf . ols ( formula = f'{label} ~ C(genotype) + staging' , data = data , missing = 'drop' ) fit = model . fit ( ) p = fit . pvalues [ 'C(genotype)[T.wt]' ] line_p . append ( p ) return line_p
Create a null distribution for a single label.
Create a null distribution for a single label .
"""
    Create a null distribution for a single label.  This can put put onto a thread or process

    Returns
    -------
    pvalue distribution
    """ # Get combinations of WT indices for current label # _label_synthetic_mutants(data, n, synthetics_sets_done)