def _run_multitest_local(self, ntmt):
        """Use multitest mthods that have been implemented locally."""
        corrected_pvals = None
        method = ntmt.nt_method.method
        if method == "bonferroni":
            corrected_pvals = Bonferroni(ntmt.pvals, ntmt.alpha).corrected_pvals
        elif method == "sidak":
            corrected_pvals = Sidak(ntmt.pvals, ntmt.alpha).corrected_pvals
        elif method == "holm":
            corrected_pvals = HolmBonferroni(ntmt.pvals, ntmt.alpha).corrected_pvals
        elif method == "fdr":
            # get the empirical p-value distributions for FDR
            term_pop = getattr(self, 'term_pop', None)
            if term_pop is None:
                term_pop = count_terms(self.pop, self.assoc, self.obo_dag)
            p_val_distribution = calc_qval(len(ntmt.study),
                                           self.pop_n,
                                           self.pop, self.assoc,
                                           term_pop, self.obo_dag)
            corrected_pvals = FDR(p_val_distribution,
                                  ntmt.results, ntmt.alpha).corrected_pvals

        self._update_pvalcorr(ntmt, corrected_pvals)
def _run_multitest_local ( self , ntmt ) : corrected_pvals = None method = ntmt . nt_method . method if method == "bonferroni" : corrected_pvals = Bonferroni ( ntmt . pvals , ntmt . alpha ) . corrected_pvals elif method == "sidak" : corrected_pvals = Sidak ( ntmt . pvals , ntmt . alpha ) . corrected_pvals elif method == "holm" : corrected_pvals = HolmBonferroni ( ntmt . pvals , ntmt . alpha ) . corrected_pvals elif method == "fdr" : term_pop = getattr ( self , 'term_pop' , None ) if term_pop is None : term_pop = count_terms ( self . pop , self . assoc , self . obo_dag ) p_val_distribution = calc_qval ( len ( ntmt . study ) , self . pop_n , self . pop , self . assoc , term_pop , self . obo_dag ) corrected_pvals = FDR ( p_val_distribution , ntmt . results , ntmt . alpha ) . corrected_pvals self . _update_pvalcorr ( ntmt , corrected_pvals )
Use multitest mthods that have been implemented locally.