예제 #1
0
 def calculateWholeZ_Score(self):
     """
     calculate z-score for the whole complex including all replicas
     """
     all_dt = bayes_analysis.collectMccEnerFromAllRep(self.h5_path, self.mcc_total_path)
     z_score = readH5.calculateZ_Score(all_dt)
     
     return z_score
예제 #2
0
 def calculatePearsonCorrCoef(self):
     """
     calculate pearson correlation coefficeint between mcc and total energy
     """
     all_dt = bayes_analysis.collectMccEnerFromAllRep(self.h5_path, self.mcc_total_path)
     mcc = all_dt[:, 0]
     ener = all_dt[:, 1]
     
     return pearsonr(mcc, ener)
예제 #3
0
 def countPoorSize(self):
     """ count the number of points in the high and low poor
     """
     all_dt = bayes_analysis.collectMccEnerFromAllRep(self.h5_path, self.mcc_total_path)
     mcc = all_dt[:, 0]
     high_total = mcc[mcc >= 0.6].shape[0]
     low_total = mcc[mcc <= 0.4].shape[0]
     
     return high_total, low_total
예제 #4
0
 def calculatePartialZ_Score(self, step=100):
     """
     calculate the z-score by an increment of 100 rows
     """
     all_dt = bayes_analysis.collectMccEnerFromAllRep(self.h5_path, self.mcc_total_path)
     total_rows = all_dt.shape[0]
     for end_row in range(100, total_rows, step):
         partial_matx = all_dt[0:end_row, :]
         z_score = readH5.calculateZ_Score(partial_matx)
         
         yield z_score
예제 #5
0
 def calculatePartialPearsonCorrCoef(self, step=1000):
     """
     calculate the pearson correlation coefficient by an increment of 100 rows
     """
     all_dt = bayes_analysis.collectMccEnerFromAllRep(self.h5_path, self.mcc_total_path)
     total_rows = all_dt.shape[0]
     for end_row in range(100, total_rows, step):
         partial_matx = all_dt[0:end_row, :]
         mcc = partial_matx[:, 0]
         ener = partial_matx[:, 1]
     
         yield pearsonr(mcc, ener)