development release: conversion of ReadDataset to use BAM files
[erange.git] / findall.py
index f6fb9e618ae7ebd72830e75b84aa536a455c07e8..9dd85df733f86417debf9b060e53f59230110b76 100755 (executable)
@@ -226,7 +226,7 @@ class RegionFinder():
         plusRatio = float(peak.numPlus)/peak.numHits
         if peakScore >= self.minPeak and self.minPlusRatio <= plusRatio <= self.maxPlusRatio:
             if self.doDirectionality:
-                if self.leftPlusRatio < peak.numLeft / peak.numPlus:
+                if self.leftPlusRatio < peak.numLeftPlus / peak.numPlus:
                     self.statistics["mIndex"] += 1
                     self.statistics["mTotal"] += sumAll
                 else:
@@ -390,6 +390,7 @@ def findall(regionFinder, hitfile, outfilename, logfilename="findall.log", outpu
     shiftDict = {}
     chromosomeList = getChromosomeListToProcess(hitRDS, controlRDS, doControl)
     for chromosome in chromosomeList:
+        #TODO: QForAli -Really? Use first chr shift value for all of them
         if regionFinder.shiftValue == "learn":
             learnShift(regionFinder, hitRDS, chromosome, logfilename, outfilename, outfile, useMulti, doControl, controlRDS, combine5p)
 
@@ -958,4 +959,4 @@ def getBestShiftInDict(shiftDict):
 
 
 if __name__ == "__main__":
-    main(sys.argv)
+    main(sys.argv)
\ No newline at end of file