How to use the refgenie.exceptions.RefgenieError function in refgenie

To help you get started, we’ve selected a few refgenie examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github databio / refgenie / refgenie / exceptions.py View on Github external
""" Exception for when a genome config filepath doesn't point to a file. """

    def __init__(self, conf_file=None):
        """
        Create the error message, using optionally an attempt filepath.

        :param str conf_file: path attempted to be used as genome config file
        """
        msg = "You must provide a config file either as an argument or via an environment variable: {}"\
            .format(", ".join(CFG_ENV_VARS))
        if conf_file:
            msg = "Not a file {} -- {}.".format(conf_file, msg)
        super(MissingGenomeConfigError, self).__init__(msg)


class MissingFolderError(RefgenieError):
    def __init__(self, folder):
        """
        Create the error message.

        :param str folder: path attempted to be used as folder to save a file to
        """
        super(MissingFolderError, self).__init__(folder)
github databio / refgenie / refgenie / exceptions.py View on Github external
from refgenconf import CFG_ENV_VARS

__all__ = ["RefgenieError", "MissingGenomeConfigError"]


class RefgenieError(Exception):
    """ Base refgenie exception type """
    pass


class MissingGenomeConfigError(RefgenieError):
    """ Exception for when a genome config filepath doesn't point to a file. """

    def __init__(self, conf_file=None):
        """
        Create the error message, using optionally an attempt filepath.

        :param str conf_file: path attempted to be used as genome config file
        """
        msg = "You must provide a config file either as an argument or via an environment variable: {}"\
            .format(", ".join(CFG_ENV_VARS))
        if conf_file:
            msg = "Not a file {} -- {}.".format(conf_file, msg)
        super(MissingGenomeConfigError, self).__init__(msg)


class MissingFolderError(RefgenieError):

refgenie

Refgenie creates a standardized folder structure for reference genome files and indexes. You can download pre-built genomes or build your own for any fasta file

BSD-2-Clause
Latest version published 3 years ago

Package Health Score

45 / 100
Full package analysis

Similar packages