Run the necessary methods in the correct order
547217
def runner(self):
        
        logging.info('Starting {} analysis pipeline'.format(self.analysistype))
        if not self.pipeline:
            # If the metadata has been passed from the method script, self.pipeline must still be false in order to
            # get Sippr() to function correctly, but the metadata shouldn't be recreated
            try:
                _ = vars(self.runmetadata)['samples']
            except AttributeError:
                # Create the objects to be used in the analyses
                objects = Objectprep(self)
                objects.objectprep()
                self.runmetadata = objects.samples

        else:
            for sample in self.runmetadata.samples:
                setattr(sample, self.analysistype, GenObject())
                sample.run.outputdirectory = sample.general.outputdirectory
        self.threads = int(self.cpus / len(self.runmetadata.samples)) \
            if self.cpus / len(self.runmetadata.samples) > 1 \
            else 1
        # Use a custom sippr method to use the full reference database as bait, and run mirabait against the FASTQ
        # reads - do not perform reference mapping yet
        SixteenSBait(self, self.cutoff)
        # Subsample 1000 reads from the FASTQ files
        self.subsample()
        # Convert the subsampled FASTQ files to FASTA format
        self.fasta()
        # Create BLAST databases if required
        self.makeblastdb()
        # Run BLAST analyses of the subsampled FASTA files against the NCBI 16S reference database
        self.blast()
        # Parse the BLAST results
        self.blastparse()
        # Feed the BLAST results into a modified sippr method to perform reference mapping using the calculated
        # genus of the sample as the mapping file
        SixteenSSipper(self, self.cutoff)
        # Create reports
        self.reporter()
310652
public static function runAll()
    {
        self::checkSapiEnv();
        self::init();
        self::parseCommand();
        self::daemonize();
        self::initWorkers();
        self::installSignal();
        self::saveMasterPid();
        self::forkWorkers();
        self::displayUI();
        self::resetStd();
        self::monitorWorkers();
    }
1373186
def run(self):
        
        while True:
            path, params = self.path_queue.get()
            errors = run(path, **params)
            self.result_queue.put(errors)
            self.path_queue.task_done()
1026073
def run(self):
        
        processes = []
        progress_queue = ProgressQueue(Queue())
        num_chunks = ParallelChunkProcessor.determine_num_chunks(self.config.upload_bytes_per_chunk,
                                                                 self.local_file.size)
        work_parcels = ParallelChunkProcessor.make_work_parcels(self.config.upload_workers, num_chunks)
        for (index, num_items) in work_parcels:
            processes.append(self.make_and_start_process(index, num_items, progress_queue))
        wait_for_processes(processes, num_chunks, progress_queue, self.watcher, self.local_file)
1366303
def run_iteration
      param_key = @current_params.to_s
      result = nil
      # lookup the result if possible
      if @scores.key? param_key
        result = @scores[param_key]
      else
        # create temp dir
        curdir = Dir.pwd
        Dir.chdir(self.create_tempdir) unless Settings.instance.no_tempdirs
        # run the target
        raw_output = @target.run @current_params.merge(@options)
        # evaluate with objectives
        result = @objective.run_for_output(raw_output, @threads, nil)
        @iteration_count += 1
        self.print_progress(@iteration_count, @current_params, result, @best)
        @scores[@current_params.to_s] = result
        self.cleanup
        Dir.chdir(curdir) unless Settings.instance.no_tempdirs
      end
      # get next steps from optimiser
      @current_params = @algorithm.run_one_iteration(@current_params, result)
    end
539905
def run(self):
        
        # The "or" part is for Python 2.6
        while not (self.finished.wait(self.interval)
                   or self.finished.is_set()):
            self.function(*self.args, **self.kwargs)
1007835
def run(self):
        

        init_folder = os.getcwd()
        os.chdir(self.folder)

        with zopen(self.log_file, 'w') as fout:
            subprocess.call([self._NWCHEM2FIESTA_cmd, self._nwcheminput_fn,
                             self._nwchemoutput_fn, self._nwchemmovecs_fn],
                            stdout=fout)

        os.chdir(init_folder)
248203
def run_all():
    '''
    
    '''
    plugins = list_plugins()
    ret = {}
    for plugin in plugins:
        ret.update(run(plugin))
    return ret
609450
def run(self):
        ''''''
        for line in iter(self._fd.readline, ''):
            self._queue.put(line)
23865
def run(self):
        
        self.configure()
        self.setup()
        self.update_dir()
        db.init_db(drop_all=True)
        self.out.log("Starting up the server...")
        config = get_config()
        with HerokuLocalWrapper(config, self.out, verbose=self.verbose) as wrapper:
            try:
                self.execute(wrapper)
            except KeyboardInterrupt:
                pass
            finally:
                os.chdir(self.original_dir)
                self.cleanup()
144443
protected function runCompilationByArrangedPriority()
    {
        foreach ($this->arrange as $name) {
            if (! isset($this->components[$name])) {
                continue;
            }

            $classes = $this->components[$name];

            $this->compileGroupClasses($name, $classes);

            unset($this->components[$name]);
        }
    }
422854
public void run() {
        Runnable r = null;
        while (true) {
            // Try to drain the maximum capacity of thread-local items, checking
            // whether any were available
            if (workQueue.drainTo(internalQueue, threadLocalItems) == 0) {
                // block until a work item is available
                try {
                    internalQueue.offer(workQueue.take());
                } catch (InterruptedException ie) {
                    throw new Error(ie);
                }
            }
            // Execute all of the thread-local items
            while ((r = internalQueue.poll()) != null)
                r.run();
        }
    }
843781
def run(self):
        """"""
        paths = [x for x in practices.__dict__.values()
                 if hasattr(x, 'code')]

        for node in ast.walk(self.tree):
            try:
                lineno, col_offset = node.lineno, node.col_offset
            except AttributeError:
                # Not all nodes have coordinates, e.g.: ast.Module
                continue

            for checker in paths:
                if checker(node):
                    message = self.build_message(checker)
                    yield lineno, col_offset, message, type(self)
427240
public function run()
    {
        Scripts::initializeClassLoader($this);
        Scripts::initializeSignalSlot($this);
        Scripts::initializePackageManagement($this);

        $this->activeRequestHandler = $this->resolveRequestHandler();
        $this->activeRequestHandler->handleRequest();
    }
796898
def run():
    """"""
    import optparse

    parser = optparse.OptionParser(usage=r"%prog [<options>] [file ...]")
    parser.add_option(
        "-p", "--spread", type="float", default=3.0, help="Rainbow spread"
    )
    parser.add_option(
        "-F", "--freq", type="float", default=0.1, help="Rainbow frequency"
    )
    parser.add_option("-S", "--seed", type="int", default=0, help="Rainbow seed")
    parser.add_option(
        "-a",
        "--animate",
        action="store_true",
        default=False,
        help="Enable psychedelics",
    )
    parser.add_option(
        "-d", "--duration", type="int", default=12, help="Animation duration"
    )
    parser.add_option(
        "-s", "--speed", type="float", default=20.0, help="Animation speed"
    )
    parser.add_option(
        "-f",
        "--force",
        action="store_true",
        default=False,
        help="Force colour even when stdout is not a tty",
    )

    parser.add_option(
        "-3", action="store_const", dest="mode", const=8, help="Force 3 bit colour mode"
    )
    parser.add_option(
        "-4",
        action="store_const",
        dest="mode",
        const=16,
        help="Force 4 bit colour mode",
    )
    parser.add_option(
        "-8",
        action="store_const",
        dest="mode",
        const=256,
        help="Force 8 bit colour mode",
    )

    parser.add_option(
        "-c",
        "--charset-py2",
        default="utf-8",
        help="Manually set a charset to convert from, for python 2.7",
    )

    options, args = parser.parse_args()
    options.os = random.randint(0, 256) if options.seed == 0 else options.seed
    options.mode = options.mode or detect_mode()

    lolcat = LolCat(mode=options.mode)

    if not args:
        args = ["-"]

    for filename in args:
        if filename == "-":
            lolcat.cat(sys.stdin, options)
        else:
            try:
                with open(filename, "r") as handle:
                    lolcat.cat(handle, options)
            except IOError as error:
                sys.stderr.write(str(error) + "\n")
383968
def run(self):
        '''
        
        '''
        salt.utils.process.appendproctitle(self.name)
        self.clear_funcs = ClearFuncs(
           self.opts,
           self.key,
           )
        self.aes_funcs = AESFuncs(self.opts)
        salt.utils.crypt.reinit_crypto()
        self.__bind()
492035
public void run() {

        try {
            // add a list of plugins to execute
            // be sure to use the right order
            m_plugins = new ArrayList<I_CmsUpdateDBPart>();

            if (getDetectedVersion() < 7) {
                m_plugins.add(new org.opencms.setup.db.update6to7.CmsUpdateDBDropOldIndexes());
                m_plugins.add(new org.opencms.setup.db.update6to7.CmsUpdateDBUpdateOU());
                m_plugins.add(new org.opencms.setup.db.update6to7.CmsUpdateDBCmsUsers());
                m_plugins.add(new org.opencms.setup.db.update6to7.CmsUpdateDBProjectId());
                m_plugins.add(new org.opencms.setup.db.update6to7.CmsUpdateDBNewTables());
                m_plugins.add(new org.opencms.setup.db.update6to7.CmsUpdateDBHistoryTables());
                m_plugins.add(new org.opencms.setup.db.update6to7.CmsUpdateDBHistoryPrincipals());
                m_plugins.add(new org.opencms.setup.db.update6to7.CmsUpdateDBDropUnusedTables());
                m_plugins.add(new org.opencms.setup.db.update6to7.CmsUpdateDBContentTables());
                m_plugins.add(new org.opencms.setup.db.update6to7.CmsUpdateDBAlterTables());
                m_plugins.add(new org.opencms.setup.db.update6to7.CmsUpdateDBDropBackupTables());
                m_plugins.add(new org.opencms.setup.db.update6to7.CmsUpdateDBCreateIndexes7());
            } else {
                m_plugins.add(new org.opencms.setup.db.update7to8.CmsUpdateDBNewTables());
                m_plugins.add(new org.opencms.setup.db.update7to8.CmsUpdatePasswordColumn());
            }
        } catch (Throwable t) {
            t.printStackTrace();
            throw new RuntimeException(t);
        }

        Iterator<String> it = getPools().iterator();
        while (it.hasNext()) {
            String dbPool = it.next();
            System.out.println("Starting DB Update for pool " + dbPool + "... ");

            try {
                updateDatabase(dbPool);
            } catch (Throwable t) {
                t.printStackTrace();
            }

            System.out.println("... DB Update finished for " + dbPool + ".");
        }
    }