Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(65)  |  Call(65)  |  Derive(0)  |  Import(0)

src/a/r/ARC-HEAD/ARC/runners/finisher.py   ARC(Download)
    def start(self):
        sample = self.params['sample']
        logger.info("Sample: %s Starting finisher" % self.params['sample'])
        finished_dir = self.params['finished_dir']
        sample_finished = False
                l = finishedf.readline().strip().split()[0]
 
            logger.info("Sample: %s target: %s finishing target.." % (self.params['sample'], target))
            logger.info("Sample: %s target: %s iteration: %s Assembly reports status: %s." % (sample, target, self.params['iteration'], l))
 
                if iteration > 1 and cur_reads != 0 and previous_reads != 0:
                    if cur_reads / previous_reads > self.params['max_incorporation']:
                        logger.info("Sample %s target %s hit a repetitive region, no more mapping will be done" % (self.params['sample'], target))
                        self.write_target(target, target_folder, outf=fin_outf, finished=True)
                    elif cur_reads <= previous_reads and iteration > 2:
                        #Give the mapper a couple extra iterations in case the first mapping got a lot of reads which didn't assemble
                        logger.info("Sample %s target %s did not incorporate any more reads, no more mapping will be done" % (self.params['sample'], target))

src/a/r/ARC-HEAD/ARC/spawn.py   ARC(Download)
    def submit(self):
        # Get the number of samples from the configuration
        logger.info("Submitting initial mapping runs.")
 
        for sample in self.config['Samples']:
    def run(self):
        logger.info("Starting...")
        logger.debug("Setting up workers.")
 
        for i in range(self.nprocs):
                self.killall()
 
        logger.info("-----")
        logger.info("%d processes returned ok." % (self.stats[0]))
        logger.info("%d processes had to be rerun." % (self.stats[1]))

src/a/r/ARC-HEAD/ARC/runners/base.py   ARC(Download)
        else:
            name = self.__class__.__name__
        logger.info("%-12s| %s" % (name, msg))
 
    def info(self, msg):
        if self.loglevel == logging.DEBUG:
            name = self.name
        else:
            name = self.__class__.__name__
        logger.info("%-12s| %s" % (name, msg))

src/a/r/ARC-HEAD/ARC/app.py   ARC(Download)
    def start(self, loglevel, configfile='ARC_config.txt'):
        try:
            logger.setup(loglevel=loglevel)
 
            logger.info("Reading config file...")
            config = Config(configfile)
            values = config.get()
 
            logger.info(
                "Setting up working directories and building indexes...")
            spawn = Spawn(values)
 
            logger.info("Running ARC.")
            spawn.submit()
            spawn.run()
 
            logger.info("Cleaning up.")
            if os.path.exists(working_dir):
                logger.info(
                    "WARNING working directory already exists for "
                    "sample %s, deleting old results if any." % (sample))
                os.system('rm -rf %s' % finished_dir)

src/a/r/ARC-HEAD/ARC/runners/mapper.py   ARC(Download)
    def start(self):
        if not('mapper' in self.params):
            raise exceptions.FatalError("mapper not defined in params")
        if self.params['mapper'] == 'bowtie2':
            logger.info("Sample: %s Running bowtie2." % self.params['sample'])
            self.run_bowtie2()
        if self.params['mapper'] == 'blat':
            logger.info("Sample: %s Running blat." % self.params['sample'])
            self.run_blat()
        #Mapping is done, run splitreads:
        logger.info("Sample: %s Running splitreads." % self.params['sample'])
        self.splitreads()
 
            args.append(self.params['reference'])
        args.append(base)
        logger.info("Sample: %s Calling bowtie2-build." % self.params['sample'])
        #logger.info(" ".join(['bowtie2-build', '-f', self.params['reference'], base]))
        logger.info(" ".join(args))

src/a/r/ARC-HEAD/ARC/runners/assembler.py   ARC(Download)
        sample = self.params['sample']
        target = self.params['target']
        logger.info("Sample: %s target: %s iteration: %s Assembly finished in %s seconds" % (sample, target, self.params['iteration'], time.time() - start))
        outf.close()
 
        args += [os.path.join(self.params['target_dir'], 'assembly')]
        logger.debug("Calling newAssembly for sample: %s target %s" % (sample, target))
        logger.info(" ".join(args))
        ret = subprocess.call(args, stdout=out, stderr=out)
        #Build args for addRun:
 
        if failed:
            logger.info("Sample: %s target: %s iteration: %s Assembly failed after %s seconds" % (sample, target, self.params['iteration'], time.time() - start))
            outf = open(os.path.join(self.params['target_dir'], "finished"), 'w')
            outf.write("assembly_failed\t" + str(time.time() - start))
            outf.close()
        if killed:
            logger.info("Sample: %s target: %s iteration: %s Assembly killed after %s seconds" % (sample, target, self.params['iteration'], time.time() - start))
        else:
            #Run finished without error
            logger.info("Sample: %s target: %s iteration: %s Assembly finished in %s seconds" % (sample, target, self.params['iteration'], time.time() - start))
            outf = open(os.path.join(self.params['target_dir'], "finished"), 'w')
            outf.write("assembly_complete\t" + str(time.time() - start))

src/a/r/ARC-HEAD/ARC/runners/assembly_checker.py   ARC(Download)
    def start(self):
        """ run through list of targets, check any that haven't finished already """
        sample = self.params['sample']
        completed = sum(self.params['targets'].values())
        logger.info("Sample: %s AssemblyChecker started with %s of %s targets completed" % (sample, completed, len(self.params['targets'])))
                if os.path.exists(f):
                    self.params['targets'][target_folder] = True
                    logger.info("%s exists" % f)
                    completed += 1
        #Now check whether all have finished, if not, add a new AssemblyChecker to the queue
            time.sleep(5)  # sleep 5 seconds before putting a checker back on the job_q
            self.submit(AssemblyChecker.to_job(checker_params))
            logger.info("Sample: %s Assemblies not finished: %s of %s targets completed" % (sample, completed, len(self.params['targets'])))
        else:
            params = {}
            logger.debug("Sample: %s, iteration %s, Submitting finisher job to queue." % (sample, self.params['iteration']))
            self.submit(Finisher.to_job(params))
            logger.info("Sample: %s Assemblies finished: %s of %s targets completed" % (sample, completed, len(self.params['targets'])))
 

src/a/r/ARC-HEAD/ARC/config.py   ARC(Download)
                else:
                    logger.info(
                        "%s not specified in ARC_config.txt, defaulting to "
                        "%s" % (key, value))
                    self.config[key] = value