+def makeParser(usage=""):
+ parser = optparse.OptionParser(usage=usage)
+ parser.add_option("--defaultcache", type="int", dest="cacheVal")
+ parser.add_option("--index", action="store_true", dest="buildIndex")
+ parser.add_option("--dropindex", action="store_true", dest="dropIndex")
+ parser.add_option("--nocount", action="store_false", dest="doCount")
+ parser.add_option("--complexity", action="store_true", dest="doComplexity")
+ parser.add_option("--reset", action="store_true", dest="resetFlags")
+ parser.add_option("--initrna", action="store_true", dest="rnaDataType")
+ parser.add_option("--cache", type="int", dest="cachePages")
+
+ configParser = getConfigParser()
+ section = "rdsmetadata"
+ cacheVal = getConfigIntOption(configParser, section, "cacheVal", 0)
+ buildIndex = getConfigBoolOption(configParser, section, "buildIndex", False)
+ dropIndex = getConfigBoolOption(configParser, section, "dropIndex", False)
+ doCount = getConfigBoolOption(configParser, section, "doCount", True)
+ doComplexity = getConfigBoolOption(configParser, section, "doComplexity", False)
+ resetFlags = getConfigBoolOption(configParser, section, "resetFlags", False)
+ rnaDataType = getConfigBoolOption(configParser, section, "rnaDataType", False)
+ cachePages = getConfigIntOption(configParser, section, "cachePages", -1)
+
+ parser.set_defaults(cacheVal=cacheVal, buildIndex=buildIndex, dropIndex=dropIndex, doCount=doCount,
+ doComplexity=doComplexity, resetFlags=resetFlags, rnaDataType=rnaDataType,
+ cachePages=cachePages)
+
+ return parser
+
+