+def makeParser(usage=""):
+ parser = optparse.OptionParser(usage=usage)
+ parser.add_option("--up", type="int", dest="upstream")
+ parser.add_option("--down", type="int", dest="downstream")
+ parser.add_option("--regions", dest="acceptfile")
+ parser.add_option("--raw", action="store_false", dest="normalize")
+ parser.add_option("--cache", action="store_true", dest="doCache")
+
+ configParser = getConfigParser()
+ section = "geneLocusPeaks"
+ upstream = getConfigIntOption(configParser, section, "upstream", 0)
+ downstream = getConfigIntOption(configParser, section, "downstream", 0)
+ acceptfile = getConfigOption(configParser, section, "acceptfile", "")
+ normalize = getConfigBoolOption(configParser, section, "normalize", True)
+ doCache = getConfigBoolOption(configParser, section, "doCache", False)
+
+ parser.set_defaults(upstream=upstream, downstream=downstream, acceptfile=acceptfile, normalize=normalize, doCache=doCache)
+
+ return parser
+
+