X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=erange.git;a=blobdiff_plain;f=geneMrnaCountsWeighted.py;fp=geneMrnaCountsWeighted.py;h=31213c3f7a4703f9d9c8c1e87f17f4c0854e4574;hp=74e7a0cd817e699af6b398960578f576a030f7e4;hb=cfc5602b26323ad2365295145e3f6c622d912eb4;hpb=c4561c55cfa9726530c6777b6515c4ef66306b2f diff --git a/geneMrnaCountsWeighted.py b/geneMrnaCountsWeighted.py index 74e7a0c..31213c3 100755 --- a/geneMrnaCountsWeighted.py +++ b/geneMrnaCountsWeighted.py @@ -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]: