development release: conversion of ReadDataset to use BAM files
[erange.git] / geneMrnaCountsWeighted.py
index 38e853aec6172be26b448066692193f1537b6926..31213c3f7a4703f9d9c8c1e87f17f4c0854e4574 100755 (executable)
@@ -2,7 +2,7 @@ try:
     import psyco
     psyco.full()
 except:
-    print 'psyco not running'
+    print "psyco not running"
 
 import sys
 import optparse
@@ -165,7 +165,7 @@ def getReadGIDs(hitDict, fullchrom, featList, readlen, index):
     for read in hitDict[fullchrom]:
         tagStart = read["start"]
         tagReadID = read["readID"]
-        if read.has_key("sense"):
+        if "sense" in read:
             tagSense = read["sense"]
             ignoreSense = False
 
@@ -253,7 +253,7 @@ def getTagCount(uniqueCountDict, gid, gidReadDict, read2GidDict):
         try:
             tagValue = uniqueCountDict[gid]
         except KeyError:
-            tagValue = 1
+            pass
 
         tagDenom = 0.
         for relatedGID in read2GidDict[readID]: