How to use the ephemeris.get_galaxy_connection function in ephemeris

To help you get started, we’ve selected a few ephemeris 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 galaxyproject / ephemeris / ephemeris / shed_tools_old.py View on Github external
def get_install_repository_manager(options):
    """
    Parse the default input file and proceed to install listed tools.
    :type options: OptionParser object
    :param options: command line arguments parsed by OptionParser
    """
    install_tool_dependencies = INSTALL_TOOL_DEPENDENCIES
    install_repository_dependencies = INSTALL_REPOSITORY_DEPENDENCIES
    install_resolver_dependencies = INSTALL_RESOLVER_DEPENDENCIES

    repo_list_file = options.tool_list_file
    gi = get_galaxy_connection(options, file=repo_list_file, log=log)
    if not gi:
        raise Exception('Could not get a galaxy connection')

    if repo_list_file:
        repository_list = load_yaml_file(repo_list_file)  # Input file contents
        repositories = repository_list['tools']  # The list of tools to install
        install_repository_dependencies = repository_list.get(
            'install_repository_dependencies', INSTALL_REPOSITORY_DEPENDENCIES)
        install_resolver_dependencies = repository_list.get(
            'install_resolver_dependencies', INSTALL_RESOLVER_DEPENDENCIES)
        install_tool_dependencies = repository_list.get(
            'install_tool_dependencies', INSTALL_TOOL_DEPENDENCIES)
    elif options.tool_yaml:
        repositories = [yaml.safe_load(options.tool_yaml)]
    elif options.action == "update":
        get_repository_list = GiToToolYaml(
github galaxyproject / ephemeris / src / ephemeris / install_tool_deps.py View on Github external
def main():
    """
    This script uses bioblend to trigger dependencies installations for the provided tools
    """
    args = _parser().parse_args()
    gi = get_galaxy_connection(args)
    tool_client = ToolClient(gi)

    if args.verbose:
        log.basicConfig(level=log.DEBUG)

    if args.tool:
        for tool_conf_path in args.tool:  # type: str
            _, ext = os.path.splitext(tool_conf_path)
            if ext == '.xml':
                log.info("tool_conf xml found, parsing..")
                # install all
                root = ET.ElementTree(file=tool_conf_path).getroot()
                if root.tag == "toolbox":
                    # Install all from tool_conf
                    tool_path = root.get('tool_path', '')
                    tool_path = tool_path.replace('${tool_conf_dir}', os.path.abspath(os.path.dirname(tool_conf_path)))