def do_facmd(args, dbh=None): if dbh is None: dbh = get_dbhandler(args) if args.verbose != 0: set_verbosity(args.verbose) executed = 0 if args.clear is not False: do_clear( args, dbh ) executed += 1 if args.findpeaks is not False: do_findpeaks( args, dbh ) executed += 1 if args.scan is not False: do_scan(args, dbh) executed += 1 if args.preannotate is not False: do_preannotate(args, dbh) executed += 1 if args.alignladder is not False: do_alignladder(args, dbh) executed += 1 if args.call is not False: do_call(args, dbh) executed += 1 if args.bin is not False: do_bin(args, dbh) executed += 1 if args.postannotate is not False: do_postannotate(args, dbh) executed += 1 if args.setallele is not False: do_setallele(args, dbh) executed += 1 if args.showladderpca is not False: do_showladderpca( args, dbh ) executed += 1 if args.listassay is not False: do_listassay( args, dbh ) executed += 1 if args.listpeaks is not False: do_listpeaks( args, dbh ) executed += 1 if args.showtrace is not False: do_showtrace( args, dbh ) executed += 1 if args.showz is not False: do_showz( args, dbh ) executed += 1 if executed == 0: cerr('WARN - unknown command, nothing to do!') else: cerr('INFO - executed %d command(s)' % executed)
def do_dbmgr(args, dbh=None, warning=True): if not dbh: dbh = get_dbhandler(args, initial=args.initdb) if args.uploadfsa is not False: do_uploadfsa(args, dbh) elif args.initbatch is not False: do_initbatch(args, dbh) elif args.showbatches is not False: do_showbatches(args, dbh) elif args.showsample is not False: do_showsample(args, dbh) elif args.initsample is not False: do_initsample(args, dbh) elif args.importpanel is not False: do_importpanel(args, dbh) elif args.exportpanel is not False: do_exportpanel(args, dbh) elif args.importmarker is not False: do_importmarker(args, dbh) elif args.initdb is not False: do_initdb(args, dbh) elif args.clearfsa is not False: do_clearfsa(args, dbh) elif args.reassignmarker is not False: do_reassignmarker(args, dbh) elif args.initbin is not False: do_initbin(args, dbh) elif args.viewbin is not False: do_viewbin(args, dbh) elif args.updatebins is not False: do_updatebins(args, dbh) elif args.removebatch is not False: do_removebatch(args, dbh) elif args.removefsa is not False: do_removefsa(args, dbh) elif args.setbinbatch is not False: do_setbinbatch(args, dbh) elif args.exportfsa is not False: do_exportfsa(args, dbh) elif args.renamefsa is not False: do_renamefsa(args, dbh) #elif args.viewpeakcachedb is not False: # do_viewpeakcachedb(args, dbh) elif args.dumppeaks is not False: do_dumppeaks(args, dbh) else: if warning: cerr('Unknown command, nothing to do!') return False return True
def do_dbmgr(args, dbh = None, warning=True): if not dbh: dbh = get_dbhandler(args, initial = args.initdb) if args.uploadfsa is not False: do_uploadfsa(args, dbh) elif args.initbatch is not False: do_initbatch(args, dbh) elif args.showbatches is not False: do_showbatches(args, dbh) elif args.showsample is not False: do_showsample(args, dbh) elif args.initsample is not False: do_initsample(args, dbh) elif args.importpanel is not False: do_importpanel(args, dbh) elif args.exportpanel is not False: do_exportpanel(args, dbh) elif args.importmarker is not False: do_importmarker(args, dbh) elif args.initdb is not False: do_initdb(args, dbh) elif args.clearfsa is not False: do_clearfsa(args, dbh) elif args.reassignmarker is not False: do_reassignmarker(args, dbh) elif args.initbin is not False: do_initbin(args, dbh) elif args.viewbin is not False: do_viewbin(args, dbh) elif args.updatebins is not False: do_updatebins(args, dbh) elif args.removebatch is not False: do_removebatch(args, dbh) elif args.removefsa is not False: do_removefsa(args, dbh) elif args.setbinbatch is not False: do_setbinbatch(args, dbh) elif args.exportfsa is not False: do_exportfsa(args, dbh) elif args.renamefsa is not False: do_renamefsa(args, dbh) elif args.viewpeakcachedb is not False: do_viewpeakcachedb(args, dbh) elif args.dumppeaks is not False: do_dumppeaks(args, dbh) else: if warning: cerr('Unknown command, nothing to do!') return False return True
def do_convert(args, dbh=None): if not dbh and (args.sqldb or args.fsdb): dbh = get_dbhandler(args) if args.fsa2tab: do_fsa2tab(args) elif args.genemapper2tab: do_genemapper2tab(args, dbh) elif args.checkfsa: do_checkfsa(args) else: cerr('Unknown command, nothing to do!') return False return True