development release: conversion of ReadDataset to use BAM files
[erange.git] / geneLocusCounts.py
index 218017e10a0d9a04d0b1cd8adde8449ecb60dcb8..ab4412506e062cae890077aa19292ce22492b65e 100755 (executable)
@@ -122,7 +122,7 @@ def geneLocusCounts(genome, hitfile, outfilename, upstream=0, downstream=0,
         print fullchrom
         hitRDS.memSync(fullchrom, index=True)
         for (start, stop, gid, length) in locusByChromDict[chrom]:
-            if not gidDict.has_key(gid):
+            if not gid in gidDict:
                 gidDict[gid] = {"count": 0, "length": length}
 
             gidDict[gid]["count"] += hitRDS.getCounts(fullchrom, start, stop, uniqs=doUniqs, multi=doMulti, splices=doSplices)