def get_b(pvalue, siglevel, ngenes): # Bonferroni pvalue.sort() lista = [] y = 0 #bcorr=siglevel/ngenes pp = 1.0 for i in pvalue: p = i[0] * ngenes if p <= siglevel: lista.append(i) #lista[i[1]]=i[0] y += 1 if p < pp: pp = p #print "Passed:",y,pp return lista, y, pp
def get_bh(pvalue, siglevel, ngenes): # B-H pvalue.sort() #print ngenes lista = [] x = 1 y = 0 p = 0 for i in pvalue: nf = i[0] * ngenes fdr = nf / x if fdr <= siglevel: #dic[i[1]]=i[0] lista.append(i) p = i[0] y += 1 x += 1 #print "Passed:",y,p return lista, y, p