+ # parse options from config file
+ config_file = SafeConfigParser()
+ config_file.read(config_path)
+
+ # load defaults from config file if not overriden by the command line
+ print opt.database
+ if opt.database is None and \
+ config_file.has_option(FRONTEND_NAME, DATABASE_OPT):
+ opt.database = config_file.get(FRONTEND_NAME, DATABASE_OPT)
+
+ if opt.sequence_archive is None and \
+ config_file.has_option(SECTION_NAME, ARCHIVE_OPT):
+ opt.sequence_archive = config_file.get(SECTION_NAME, ARCHIVE_OPT)
+
+ # complain if critical things are missing
+ if opt.database is None:
+ parser.error('Need location of htsworkflow frontend database')
+
+ if opt.sequence_archive is None:
+ parser.error('Need the root path for the sequence archive')
+