Commits

Davide Cittaro committed 0c61e77

bugfix

  • Participants
  • Parent commits 6110932

Comments (0)

Files changed (1)

       
 
 def phred_score(projection,distribution):
-  p_value = distributions.cdf(projection)
+  p_value = distribution.cdf(projection)
   if p_value > 0.5:
     # get the p associated to the tail
     p_value = 1 - 0.5
         if nan_mask[x]:
           #scored
           for nc in range(cli_options.ncomp):
-            info_field = "%s;WCOMP%d=%.3f;PCOMP%d=%d" % (info_field, nc + 1, results.Y[nx][nc], nc + 1, phred_score(results.Y[nx][nc],distribution[nc]))
+            info_field = "%s;WCOMP%d=%.3f;PCOMP%d=%d" % (info_field, nc + 1, results.Y[nx][nc], nc + 1, phred_score(results.Y[nx][nc],distributions[nc]))
           nx += 1  
         fields[7] = info_field
         file_out.write('\t'.join(fields))