- if len(args) < 3:
- print usage
- sys.exit(1)
-
- regionfilename = args[0]
- hitfile = args[1]
- outfilename = args[2]
-
- regionCounts(regionfilename, hitfile, outfilename, options.flagRDS, options.cField,
- options.useFullchrom, options.normalize, options.padregion,
- options.mergeregion, options.merging, options.doUniqs, options.doMulti,
- options.doSplices, options.usePeak, options.cachePages, options.logfilename,
- options.doRPKM, options.doLength, options.forceRegion)
+ configParser = getConfigParser()
+ section = "regionCounts"
+ flagRDS = getConfigBoolOption(configParser, section, "flagRDS", False)
+ cField = getConfigIntOption(configParser, section, "cField", 1)
+ useFullchrom = getConfigBoolOption(configParser, section, "useFullchrom", False)
+ normalize = getConfigBoolOption(configParser, section, "normalize", True)
+ padregion = getConfigIntOption(configParser, section, "padregion", 0)
+ mergeregion = getConfigIntOption(configParser, section, "mergeregion", 0)
+ merging = getConfigBoolOption(configParser, section, "merging", True)
+ doUniqs = getConfigBoolOption(configParser, section, "doUniqs", True)
+ doMulti = getConfigBoolOption(configParser, section, "doMulti", True)
+ doSplices = getConfigBoolOption(configParser, section, "doSplices", False)
+ usePeak = getConfigBoolOption(configParser, section, "usePeak", False)
+ cachePages = getConfigIntOption(configParser, section, "cachePages", -1)
+ logfilename = getConfigOption(configParser, section, "logfilename", "regionCounts.log")
+ doRPKM = getConfigBoolOption(configParser, section, "doRPKM", False)
+ doLength = getConfigBoolOption(configParser, section, "doLength", False)
+ forceRegion = getConfigBoolOption(configParser, section, "forceRegion", False)
+
+ parser.set_defaults(flagRDS=flagRDS, cField=cField, useFullchrom=useFullchrom, normalize=normalize,
+ padregion=padregion, mergeregion=mergeregion, merging=merging, doUniqs=doUniqs,
+ doMulti=doMulti, doSplices=doSplices, usePeak=usePeak, cachePages=cachePages,
+ logfilename=logfilename, doRPKM=doRPKM, doLength=doLength,
+ forceRegion=forceRegion)
+
+ return parser