Main analyzer routine.
513502
def main(dbfile, pidfile, mode):
    '''
    
    '''
    Inspector(dbfile, pidfile).reuse_snapshot().snapshot(mode)
1062436
def main(self):
        
        logging.info('Aligning reads with bowtie2 for Qualimap')
        self.bowtie()
        self.indexing()
        self.pilon()
        self.filter()
        self.clear()
309561
def main(start, end, out):
    
    try:
        logging.basicConfig(level=logging.WARNING)
        MlbAm.scrape(start, end, out)
    except MlbAmBadParameter as e:
        raise click.BadParameter(e)
686834
def analyze(files)
      report    = Report.new(configuration.report_levels)
      presenter = configuration.presenter.new
      parser    = Parser.new

      parser.consumer = proc do |diag|
        report_diagnostic(diag, report)
      end

      files.each do |file|
        analyze_file(file, parser, report)
      end

      return presenter.present(report)
    end
18428
def main(fast=False):
    """"""
    print('Running benchmarks...\n')
    results = bench_run(fast=fast)
    bench_report(results)
817576
def main():
    """"""
    query = ' '.join(sys.stdin.readlines())

    sys.stdout.write(pretty_print_graphql(query))
824079
def main():
    """"""
    logging.basicConfig(level=logging.INFO)
    app = RunSnakeRunApp(0)
    app.MainLoop()
112024
def analyze(self, args):
        
        self.log.info("Running catalog analysis")

        if args.count:
            self.count()

        return
848059
def main(self):
        
        # Find the target files
        self.targets()
        kmer = 15 if self.analysistype == 'GDCS' else 17
        # Use bbduk to bait the FASTQ reads matching the target sequences
        self.bait(maskmiddle='t', k=kmer)
        # If desired, use bbduk to bait the target sequences with the previously baited FASTQ files
        if self.revbait:
            self.reversebait(maskmiddle='t', k=kmer)
        # Run the bowtie2 read mapping module
        self.mapping()
        # Use samtools to index the sorted bam file
        self.indexing()
        # Parse the results
        # self.parsing()
        self.parsebam()
1323342
def main():
    """"""

    # Quit when interrupted
    import signal
    signal.signal(signal.SIGINT, signal.SIG_DFL)

    # Arguments:
    # --separator STRING/REGEX - how to split a row into cells (only relevant for CSV parser)
    # --flatten - flatten item hashes. {'a':{'b':'c'}} --> {'a_b':'c'}
    import argparse
    parser = argparse.ArgumentParser(description='View tabulated data via GUI')
    parser.add_argument('-p','--parser',type=str, default='autosplit',help='Type of parser to use') #TODO add possible parsers
    parser.add_argument('--headers',type=str, help='Headers are this comma-delimited names instead of ones supplied in file. Use colons to specify types, like "colname:int"')
    parser.add_argument('--filter',type=str, help='Pre-populate filter box')
    parser.add_argument('-s', '--separator', help='How to seperate columns. Applies only to some parsers')
    parser.add_argument('files', nargs='*', help='Files to show. Each file opens a new window')
    args = parser.parse_args()

    GObject.threads_init()

    default_config = {'format': args.parser}
    if args.filter:
        default_config['filter']=args.filter
    if args.separator:
        default_config['separator']=args.separator
    if args.headers:
        default_config['headers']=map(lambda s: s.strip(),args.headers.split(','))
    inputs = [ (open(f,'r'),default_config) for f in args.files ]
    # Add stdin as input, if it's not a tty
    if not sys.stdin.isatty():
        inputs.append((sys.stdin, default_config))

    global windows
    windows = [Window(i[0],i[1]) for i in inputs]
    for win in windows:
      win.start_read()
      win.connect("destroy",window_closed)
    if windows:
        Gtk.main()
    else:
        print 'No input supplied so no windows are created'
880272
def main(self):
        
        logging.info('Preparing metadata')
        # If this script is run as part of a pipeline, the metadata objects will already exist
        if not self.metadata:
            self.filer()
        else:
            self.objectprep()
        # Use the number of metadata objects to calculate the number of cores to use per sample in multi-threaded
        # methods with sequence calls to multi-threaded applications
        try:
            self.threads = int(self.cpus / len(self.metadata)) if self.cpus / len(
                self.metadata) > 1 else 1
        except (TypeError, ZeroDivisionError):
            self.threads = self.cpus
        logging.info('Reading and formatting primers')
        self.primers()
        logging.info('Baiting .fastq files against primers')
        self.bait()
        logging.info('Baiting .fastq files against previously baited .fastq files')
        self.doublebait()
        logging.info('Assembling contigs from double-baited .fastq files')
        self.assemble_amplicon_spades()
        logging.info('Creating BLAST database')
        self.make_blastdb()
        logging.info('Running BLAST analyses')
        self.blastnthreads()
        logging.info('Parsing BLAST results')
        self.parseblast()
        logging.info('Clearing amplicon files from previous iterations')
        self.ampliconclear()
        logging.info('Creating reports')
        self.reporter()
1121154
def _analyze(self):
        

        self._pre_analysis()

        if self._graph_visitor is None:
            # There is no base graph that we can rely on. The analysis itself should generate successors for the
            # current job.
            # An example is the CFG recovery.

            self._analysis_core_baremetal()

        else:
            # We have a base graph to follow. Just handle the current job.

            self._analysis_core_graph()

        self._post_analysis()
1025967
public function main()
    {
        $this->out('Welcome to the Proffer shell.');
        $this->out('This shell can be used to regenerate thumbnails and cleanup unlinked images.');
        $this->hr();
        $this->out($this->OptionParser->help());
    }
1024533
def Main():
  """"""
  multiprocessing.freeze_support()

  input_reader = cli_tools.StdinInputReader()
  tool = psort_tool.PsortTool(input_reader=input_reader)

  if not tool.ParseArguments():
    return False

  have_list_option = False
  if tool.list_analysis_plugins:
    tool.ListAnalysisPlugins()
    have_list_option = True

  if tool.list_output_modules:
    tool.ListOutputModules()
    have_list_option = True

  if tool.list_language_identifiers:
    tool.ListLanguageIdentifiers()
    have_list_option = True

  if tool.list_timezones:
    tool.ListTimeZones()
    have_list_option = True

  if have_list_option:
    return True

  try:
    tool.ProcessStorage()

  except (KeyboardInterrupt, errors.UserAbort):
    logging.warning('Aborted by user.')
    return False

  except errors.BadConfigOption as exception:
    logging.warning(exception)
    return False

  return True
1371814
function main()
{
	aqParseOptions();

	aq_amqp = mod_amqp.createConnection(aq_broker);
	aq_amqp.on('ready', function () {
		aq_exchange = aq_amqp.exchange('amq.topic');
		setInterval(aqBlast, 1000);
	});
}
1252153
def main(handwriting_datasets_file, analyze_features):
    """"""
    # Load from pickled file
    logging.info("Start loading data '%s' ...", handwriting_datasets_file)
    loaded = pickle.load(open(handwriting_datasets_file))
    raw_datasets = loaded['handwriting_datasets']
    logging.info("%i datasets loaded.", len(raw_datasets))
    logging.info("Start analyzing...")

    if analyze_features:
        featurelist = [(features.AspectRatio(), "aspect_ratio.csv"),
                       (features.ReCurvature(1), "re_curvature.csv"),
                       (features.Height(), "height.csv"),
                       (features.Width(), "width.csv"),
                       (features.Time(), "time.csv"),
                       (features.Ink(), "ink.csv"),
                       (features.StrokeCount(), "stroke-count.csv")]
        for feat, filename in featurelist:
            logging.info("create %s...", filename)
            analyze_feature(raw_datasets, feat, filename)

    # Analyze everything specified in configuration
    cfg = utils.get_project_configuration()
    if 'data_analyzation_queue' in cfg:
        metrics = dam.get_metrics(cfg['data_analyzation_queue'])
        for metric in metrics:
            logging.info("Start metric %s...", str(metric))
            metric(raw_datasets)
    else:
        logging.info("No 'data_analyzation_queue' in ~/.hwrtrc")
1077903
def main():
    
    setup_main_logger(console=True, file_logging=False)
    params = argparse.ArgumentParser(description="Extract specific parameters.")
    arguments.add_extract_args(params)
    args = params.parse_args()
    extract_parameters(args)