limitNeighbor = True if '-force': limitNeighbor = False hitRDS = readDataset(hitfile, verbose=True, cache=doCache) readlen = hitRDS.getReadSize() normalizationFactor = 1.0 if normalizeBins: totalCount = len(hitRDS) normalizationFactor = totalCount / 1000000. hitDict = hitRDS.getReadsDict(doMulti=True, findallOptimize=True) hg = Genome(genome) idb = geneinfoDB(cache=doCache) gidBins = {} gidLen = {} geneinfoDict = idb.getallGeneInfo(genome) if doFlank: locusByChromDict = getLocusByChromDict(hg, upstream=upstreamBp, downstream=downstreamBp, useCDS=doCDS, additionalRegionsDict=acceptDict, keepSense=True, adjustToNeighbor=limitNeighbor) else: locusByChromDict = getLocusByChromDict(hg, additionalRegionsDict=acceptDict,
sys.exit(1) nomatchfilename = '' genome = sys.argv[1] infilename = sys.argv[2] rpkmfilename = sys.argv[3] outfilename = sys.argv[4] doCache = False withSense = False flankBP = 0 rpkmField = 3 if '-cache' in sys.argv: doCache = True cacheGeneDB(genome) idb = geneinfoDB(cache=True) print 'cached %s' % genome else: idb = geneinfoDB() if '-sense' in sys.argv: withSense = True if '-flank' in sys.argv: flankBP = int(sys.argv[sys.argv.index('-flank') + 1]) infile = open(infilename) outfile = open(outfilename, 'w') geneinfoDict = idb.getallGeneInfo(genome) posList = []
sys.exit(1) genome = sys.argv[1] writeOut = False if '-outfile' in sys.argv: writeOut = True outfilename = sys.argv[sys.argv.index('-outfile') + 1] restrict = False if '-restrict' in sys.argv: restrictfilename = sys.argv[sys.argv.index('-restrict') + 1] restrict = True hg = Genome(genome) idb = geneinfoDB() GOIDlist = [] for arg in sys.argv: if 'GO:' in arg: GOIDlist.append(arg) print sys.argv print GOIDlist firstGeneList = [] for GOID in GOIDlist: testList = hg.allGIDsbyGOID(GOID) print 'GOID: %s (%d)' % (GOID, len(testList)) firstGeneList += testList