X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=erange.git;a=blobdiff_plain;f=altSpliceCounts.py;fp=altSpliceCounts.py;h=c59dc9249b6c82ded0466f872e98a9900e702c46;hp=12077c1ec7d9d7e3ba499c67c99734a8a9a54157;hb=77dccd7c98d8cdb60caaf178b1123df71ea662c9;hpb=bc30aca13e5ec397c92e67002fbf7a103130b828 diff --git a/altSpliceCounts.py b/altSpliceCounts.py index 12077c1..c59dc92 100755 --- a/altSpliceCounts.py +++ b/altSpliceCounts.py @@ -2,7 +2,7 @@ try: import psyco psyco.full() except: - print 'psyco not running' + print "psyco not running" print "altSpliceCounts: version 3.7" @@ -56,13 +56,13 @@ def altSpliceCounts(hitfile, outfilename, doCache=False, cachePages=100000): stopDict = {} resultDict = {} - hitRDS = ReadDataset.ReadDataset(hitfile, verbose = True, cache=doCache) + hitRDS = ReadDataset.ReadDataset(hitfile, verbose=True, cache=doCache) if cachePages > hitRDS.getDefaultCacheSize(): hitRDS.setDBcache(cachePages) readlen = hitRDS.getReadSize() hitDict = hitRDS.getSplicesDict(noSense=True) - outfile = open(outfilename,'w') + outfile = open(outfilename, "w") for chrom in hitDict: startDict[chrom] = [] @@ -155,7 +155,7 @@ def altSpliceCounts(hitfile, outfilename, doCache=False, cachePages=100000): resultDict[chrom].sort() for line in resultDict[chrom]: - outfile.write('alt%d' % alternative + '\tchr%s\t%d\t%d\tchr%s\t%d\t%d\n' % line) + outfile.write("alt%d" % alternative + "\tchr%s\t%d\t%d\tchr%s\t%d\t%d\n" % line) alternative += 1 print chrom, maxIndex, spliceEvent, altSpliceEvent