Example #1
0
 def callBinPeak(self, pvalue=1e-05):
     self.binpeak = []
     for i in range(len(self.bins)):
         print >> sys.stderr, "Call Pvalue of ", self.chrs[i], "\r",
         self.binpeak.append([False for row in range(len(self.bins[i]))])
         for j in range(len(self.bins[i])):
             if self.bins[i][j] == 0: continue
             if prob.poisson_cdf(self.bins[i][j], self.lam, False) < pvalue:
                 self.binpeak[i][j] = True
Example #2
0
 def callBinPeak(self,pvalue=1e-05):
     self.binpeak=[]
     for i in range(len(self.bins)):
         print >>sys.stderr,"Call Pvalue of ",self.chrs[i],"\r",
         self.binpeak.append([False for row in range(len(self.bins[i]))])
         for j in range(len(self.bins[i])):
             if self.bins[i][j]==0: continue
             if prob.poisson_cdf(self.bins[i][j],self.lam,False)<pvalue:
                 self.binpeak[i][j]=True
Example #3
0
 def callBinPeak(self,pvalue=1e-05):
     self.pvalue=pvalue
     self.binpeak=[]
     threshold=1
     while 1:
         if prob.poisson_cdf(threshold,self.lam,False) < pvalue: break
         threshold+=1
     for i in range(len(self.bins)):
         print >>sys.stderr,"Call Pvalue of ",self.chrs[i],"\r",
         self.binpeak.append([False for row in range(len(self.bins[i]))])
         for j in range(len(self.bins[i])):
             if self.bins[i][j]>=threshold:
            # if prob.poisson_cdf(self.bins[i][j],self.lam,False)<pvalue:
            # if prob.poisson_cdf(self.bins[i][j],self.lam,False)<pvalue:
                 self.binpeak[i][j]=True