X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=erange.git;a=blobdiff_plain;f=geneLocusCounts.py;fp=geneLocusCounts.py;h=ab4412506e062cae890077aa19292ce22492b65e;hp=218017e10a0d9a04d0b1cd8adde8449ecb60dcb8;hb=cfc5602b26323ad2365295145e3f6c622d912eb4;hpb=c4561c55cfa9726530c6777b6515c4ef66306b2f diff --git a/geneLocusCounts.py b/geneLocusCounts.py index 218017e..ab44125 100755 --- a/geneLocusCounts.py +++ b/geneLocusCounts.py @@ -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)