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

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

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'])
        #Check for necessary params:
        if not ('sample' in self.params and 'reference' in self.params and 'working_dir' in self.params and (('PE1' in self.params and 'PE2' in self.params) or 'SE' in self.params)):
            raise exceptions.FatalError('Missing params in run_bowtie2.')
        #Check for necessary files:
        if os.path.exists(self.params['reference']) is False:
            raise exceptions.FatalError("Missing reference file for mapping")
        if 'PE1' in self.params and 'PE2' in self.params:
            if not (os.path.exists(self.params['PE1']) and os.path.exists(self.params['PE2'])):
                raise exceptions.FatalError("One or both PE files can not be found for mapping.")
        if 'SE' in self.params:
            if not os.path.exists(self.params['SE']):
                raise exceptions.FatalError("SE file cannot be found.")
 
        #Make idx directory

src/a/r/ARC-HEAD/ARC/config.py   ARC(Download)
    def __init__(self, filename):
        if os.path.exists(filename) is False:
            raise exceptions.FatalError(
                "Error, you must run ARC in a folder containing "
                "ARC_config.txt")
                if value is None:
                    raise exceptions.FatalError(
                        "Error, %s required but not specificed in "
                        "ARC_self.config.txt" % key)
                else:
            except CalledProcessError:
                raise exceptions.FatalError(
                    "Cannot find %s in path, or the 'which' "
                    "command is missing" % (bin))
 
                if len(cfg) != 2 or cfg[1] == "":
                    raise exceptions.FatalError(
                        "Error, parameters not specified correctly, please "
                        "use # name=value. Offending entry: \n\t%s" % arr[1]
                    )
            if len(arr) != 3:
                raise exceptions.FatalError(
                    "Error, sample description entry is not properly "
                    "formatted! Offending entry: %s" % line
                )

src/a/r/ARC-HEAD/ARC/runners/assembler.py   ARC(Download)
    def start(self):
        if not('assembler' in self.params):
            raise exceptions.FatalError("assembler not defined in params")
        if self.params['map_against_reads'] and self.params['iteration'] == 1:
            self.RunMapAgainstReads()
            self.RunSpades()
        else:
            raise exceptions.FatalError("Assembler %s isn't recognized." % self.params['assembler'])
 
    def RunMapAgainstReads(self):
        #Check for necessary params:
        if not (('assembly_PE1' in self.params and 'assembly_PE2' in self.params) or 'assembly_SE' in self.params):
            raise exceptions.FatalError('Missing self.params in RunNewbler.')
 
        #Check for necessary files:
        if 'assembly_PE1' in self.params and 'assembly_PE2' in self.params and not(os.path.exists(self.params['assembly_PE1']) or not(os.path.exists(self.params['assembly_PE2']))):
            raise exceptions.FatalError('Missing PE files in RunNewbler.')
 
        if 'assembly_SE' in self.params and not(os.path.exists(self.params['assembly_SE'])):
            raise exceptions.FatalError('Missing SE file in RunNewbler.')

src/a/r/ARC-HEAD/ARC/runners/finisher.py   ARC(Download)
                        contig_to_isogroup[contig] = igroup
                    else:
                        raise exceptions.FatalError('Contig %s in %s more than once' % (contig, contigf))
            #Handle lines containing contig orientation info:
            elif l[0:6] == 'isotig':