Warning
This document is for an old release of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.
galaxy.tool_shed.galaxy_install package¶
Subpackages¶
- galaxy.tool_shed.galaxy_install.datatypes package
- galaxy.tool_shed.galaxy_install.metadata package
- galaxy.tool_shed.galaxy_install.migrate package
- Subpackages
- galaxy.tool_shed.galaxy_install.migrate.versions package
- Submodules
- galaxy.tool_shed.galaxy_install.migrate.versions.0001_tools module
- galaxy.tool_shed.galaxy_install.migrate.versions.0002_tools module
- galaxy.tool_shed.galaxy_install.migrate.versions.0003_tools module
- galaxy.tool_shed.galaxy_install.migrate.versions.0004_tools module
- galaxy.tool_shed.galaxy_install.migrate.versions.0005_tools module
- galaxy.tool_shed.galaxy_install.migrate.versions.0006_tools module
- galaxy.tool_shed.galaxy_install.migrate.versions.0007_tools module
- galaxy.tool_shed.galaxy_install.migrate.versions.0008_tools module
- galaxy.tool_shed.galaxy_install.migrate.versions.0009_tools module
- galaxy.tool_shed.galaxy_install.migrate.versions.0010_tools module
- galaxy.tool_shed.galaxy_install.migrate.versions.0011_tools module
- galaxy.tool_shed.galaxy_install.migrate.versions.0012_tools module
- galaxy.tool_shed.galaxy_install.migrate.versions package
- Submodules
- galaxy.tool_shed.galaxy_install.migrate.check module
- galaxy.tool_shed.galaxy_install.migrate.common module
- Subpackages
- galaxy.tool_shed.galaxy_install.repository_dependencies package
- galaxy.tool_shed.galaxy_install.tool_dependencies package
- Subpackages
- galaxy.tool_shed.galaxy_install.tool_dependencies.recipe package
- Submodules
- galaxy.tool_shed.galaxy_install.tool_dependencies.recipe.asynchronous_reader module
- galaxy.tool_shed.galaxy_install.tool_dependencies.recipe.env_file_builder module
- galaxy.tool_shed.galaxy_install.tool_dependencies.recipe.install_environment module
- galaxy.tool_shed.galaxy_install.tool_dependencies.recipe.recipe_manager module
- galaxy.tool_shed.galaxy_install.tool_dependencies.recipe.step_handler module
- galaxy.tool_shed.galaxy_install.tool_dependencies.recipe.tag_handler module
- galaxy.tool_shed.galaxy_install.tool_dependencies.recipe package
- Submodules
- galaxy.tool_shed.galaxy_install.tool_dependencies.env_manager module
- Subpackages
- galaxy.tool_shed.galaxy_install.tools package
Submodules¶
galaxy.tool_shed.galaxy_install.install_manager module¶
-
class
galaxy.tool_shed.galaxy_install.install_manager.
InstallToolDependencyManager
(app)[source]¶ Bases:
object
-
install_and_build_package
(install_environment, tool_dependency, actions_dict)[source]¶ Install a Galaxy tool dependency package either via a url or a mercurial or git clone command.
-
install_and_build_package_via_fabric
(install_environment, tool_shed_repository, tool_dependency, actions_dict)[source]¶
-
install_specified_tool_dependencies
(tool_shed_repository, tool_dependencies_config, tool_dependencies, from_tool_migration_manager=False)[source]¶ Follow the recipe in the received tool_dependencies_config to install specified packages for repository tools. The received list of tool_dependencies are the database records for those dependencies defined in the tool_dependencies_config that are to be installed. This list may be a subset of the set of dependencies defined in the tool_dependencies_config. This allows for filtering out dependencies that have not been checked for installation on the ‘Manage tool dependencies’ page for an installed Tool Shed repository.
-
install_via_fabric
(tool_shed_repository, tool_dependency, install_dir, package_name=None, custom_fabfile_path=None, actions_elem=None, action_elem=None, **kwd)[source]¶ Parse a tool_dependency.xml file’s <actions> tag set to gather information for installation using self.install_and_build_package(). The use of fabric is being eliminated, so some of these functions may need to be renamed at some point.
-
install_package
(elem, tool_shed_repository, tool_dependencies=None, from_tool_migration_manager=False)[source]¶ Install a tool dependency package defined by the XML element elem. The value of tool_dependencies is a partial or full list of ToolDependency records associated with the tool_shed_repository.
-
-
class
galaxy.tool_shed.galaxy_install.install_manager.
InstallRepositoryManager
(app, tpm=None)[source]¶ Bases:
object
-
get_repository_components_for_installation
(encoded_tsr_id, encoded_tsr_ids, repo_info_dicts, tool_panel_section_keys)[source]¶ The received encoded_tsr_ids, repo_info_dicts, and tool_panel_section_keys are 3 lists that contain associated elements at each location in the list. This method will return the elements from repo_info_dicts and tool_panel_section_keys associated with the received encoded_tsr_id by determining its location in the received encoded_tsr_ids list.
-
install_tool_shed_repository
(tool_shed_repository, repo_info_dict, tool_panel_section_key, shed_tool_conf, tool_path, install_resolver_dependencies, install_tool_dependencies, reinstalling=False, tool_panel_section_mapping=None, install_options=None)[source]¶
-
update_tool_shed_repository
(repository, tool_shed_url, latest_ctx_rev, latest_changeset_revision, install_new_dependencies=True, install_options=None)[source]¶
-
order_components_for_installation
(tsr_ids, repo_info_dicts, tool_panel_section_keys)[source]¶ Some repositories may have repository dependencies that are required to be installed before the dependent repository. This method will inspect the list of repositories about to be installed and make sure to order them appropriately. For each repository about to be installed, if required repositories are not contained in the list of repositories about to be installed, then they are not considered. Repository dependency definitions that contain circular dependencies should not result in an infinite loop, but obviously prior installation will not be handled for one or more of the repositories that require prior installation.
-
galaxy.tool_shed.galaxy_install.installed_repository_manager module¶
Class encapsulating the management of repositories installed into Galaxy from the Tool Shed.
-
class
galaxy.tool_shed.galaxy_install.installed_repository_manager.
InstalledRepositoryManager
(app)[source]¶ Bases:
object
-
__init__
(app)[source]¶ Among other things, keep in in-memory sets of tuples defining installed repositories and tool dependencies along with the relationships between each of them. This will allow for quick discovery of those repositories or components that can be uninstalled. The feature allowing a Galaxy administrator to uninstall a repository should not be available to repositories or tool dependency packages that are required by other repositories or their contents (packages). The uninstall feature should be available only at the repository hierarchy level where every dependency will be uninstalled. The exception for this is if an item (repository or tool dependency package) is not in an INSTALLED state - in these cases, the specific item can be uninstalled in order to attempt re-installation.
-
property
tool_paths
¶ Return all possible tool_path attributes of all tool config files.
-
activate_repository
(repository)[source]¶ Activate an installed tool shed repository that has been marked as deactivated.
-
add_entry_to_installed_repository_dependencies_of_installed_repositories
(repository)[source]¶ Add an entry to self.installed_repository_dependencies_of_installed_repositories. A side-effect of this method is the population of self.installed_dependent_repositories_of_installed_repositories. Since this method discovers all repositories required by the received repository, it can use the list to add entries to the reverse dictionary.
-
add_entry_to_repository_dependencies_of_installed_repositories
(repository)[source]¶ Add an entry to self.repository_dependencies_of_installed_repositories.
-
get_dependencies_for_repository
(tool_shed_url, repo_info_dict, includes_tool_dependencies, updating=False)[source]¶ Return dictionaries containing the sets of installed and missing tool dependencies and repository dependencies associated with the repository defined by the received repo_info_dict.
-
get_installed_and_missing_repository_dependencies
(repository)[source]¶ Return the installed and missing repository dependencies for a tool shed repository that has a record in the Galaxy database, but may or may not be installed. In this case, the repository dependencies are associated with the repository in the database. Do not include a repository dependency if it is required only to compile a tool dependency defined for the dependent repository since these special kinds of repository dependencies are really a dependency of the dependent repository’s contained tool dependency, and only if that tool dependency requires compilation.
-
get_installed_and_missing_repository_dependencies_for_new_or_updated_install
(repo_info_tuple)[source]¶ Parse the received repository_dependencies dictionary that is associated with a repository being installed into Galaxy for the first time and attempt to determine repository dependencies that are already installed and those that are not.
-
get_installed_and_missing_tool_dependencies_for_repository
(tool_dependencies_dict)[source]¶ Return the lists of installed tool dependencies and missing tool dependencies for a set of repositories being installed into Galaxy.
-
get_repository_dependency_tups_for_installed_repository
(repository, dependency_tups=None, status=None)[source]¶ Return a list of of tuples defining tool_shed_repository objects (whose status can be anything) required by the received repository. The returned list defines the entire repository dependency tree. This method is called only from Galaxy.
-
get_runtime_dependent_tool_dependency_tuples
(tool_dependency, status=None)[source]¶ Return the list of tool dependency objects that require the received tool dependency at run time. The returned list will be filtered by the received status if it is not None. This method is called only from Galaxy.
-
handle_existing_tool_dependencies_that_changed_in_update
(repository, original_dependency_dict, new_dependency_dict)[source]¶ This method is called when a Galaxy admin is getting updates for an installed tool shed repository in order to cover the case where an existing tool dependency was changed (e.g., the version of the dependency was changed) but the tool version for which it is a dependency was not changed. In this case, we only want to determine if any of the dependency information defined in original_dependency_dict was changed in new_dependency_dict. We don’t care if new dependencies were added in new_dependency_dict since they will just be treated as missing dependencies for the tool.
-
purge_repository
(repository)[source]¶ Purge a repository with status New (a white ghost) from the database.
-
remove_entry_from_installed_repository_dependencies_of_installed_repositories
(repository)[source]¶ Remove an entry from self.installed_repository_dependencies_of_installed_repositories. A side-effect of this method is removal of appropriate value items from self.installed_dependent_repositories_of_installed_repositories.
-
remove_entry_from_repository_dependencies_of_installed_repositories
(repository)[source]¶ Remove an entry from self.repository_dependencies_of_installed_repositories.
-
repository_dependency_needed_only_for_compiling_tool_dependency
(repository, repository_dependency)[source]¶
-
set_only_if_compiling_contained_td
(repository, required_repository)[source]¶ Return True if the received required_repository is only needed to compile a tool dependency defined for the received repository.
-
set_prior_installation_required
(repository, required_repository)[source]¶ Return True if the received required_repository must be installed before the received repository.
-
update_existing_tool_dependency
(repository, original_dependency_dict, new_dependencies_dict)[source]¶ Update an exsiting tool dependency whose definition was updated in a change set pulled by a Galaxy administrator when getting updates to an installed tool shed repository. The original_dependency_dict is a single tool dependency definition, an example of which is:
{"name": "bwa", "readme": "\nCompiling BWA requires zlib and libpthread to be present on your system.\n ", "type": "package", "version": "0.6.2"}
The new_dependencies_dict is the dictionary generated by the metadata_util.generate_tool_dependency_metadata method.
-
galaxy.tool_shed.galaxy_install.tool_migration_manager module¶
Manage automatic installation of tools configured in the xxx.xml files in ~/scripts/migrate_tools (e.g., 0002_tools.xml). All of the tools were at some point included in the Galaxy distribution, but are now hosted in the main Galaxy tool shed.
-
class
galaxy.tool_shed.galaxy_install.tool_migration_manager.
ToolMigrationManager
(app, latest_migration_script_number, tool_shed_install_config, migrated_tools_config, install_dependencies)[source]¶ Bases:
object
-
__init__
(app, latest_migration_script_number, tool_shed_install_config, migrated_tools_config, install_dependencies)[source]¶ Check tool settings in tool_shed_install_config and install all repositories that are not already installed. The tool panel configuration file is the received migrated_tools_config, which is the reserved file named migrated_tools_conf.xml.
-
create_or_update_tool_shed_repository_record
(name, owner, changeset_revision, description=None)[source]¶
-
create_or_update_tool_shed_repository_records
(name, changeset_revision, repository_dependencies_dict)[source]¶ Make sure the repository defined by name and changeset_revision and all of its repository dependencies have associated tool_shed_repository table rows in the Galaxy database.
-
filter_and_persist_proprietary_tool_panel_configs
(tool_configs_to_filter)[source]¶ Eliminate all entries in all non-shed-related tool panel configs for all tool config file names in the received tool_configs_to_filter.
-
get_containing_tool_sections
(tool_config)[source]¶ If tool_config is defined somewhere in self.proprietary_tool_panel_elems, return True and a list of ToolSections in which the tool is displayed. If the tool is displayed outside of any sections, None is appended to the list.
-
get_prior_install_required_dict
(tool_shed_repositories, repository_dependencies_dict)[source]¶ Return a dictionary whose keys are the received tsr_ids and whose values are a list of tsr_ids, each of which is contained in the received list of tsr_ids and whose associated repository must be installed prior to the repository associated with the tsr_id key.
-
get_proprietary_tool_panel_elems
(latest_tool_migration_script_number)[source]¶ Parse each config in self.proprietary_tool_confs (the default is tool_conf.xml) and generate a list of Elements that are either ToolSection elements or Tool elements. These will be used to generate new entries in the migrated_tools_conf.xml file for the installed tools.
-
handle_repository_contents
(tool_shed_repository, repository_clone_url, relative_install_dir, repository_elem, install_dependencies, is_repository_dependency=False)[source]¶ Generate the metadata for the installed tool shed repository, among other things. If the installed tool_shed_repository contains tools that are loaded into the Galaxy tool panel, this method will automatically eliminate all entries for each of the tools defined in the received repository_elem from all non-shed-related tool panel configuration files since the entries are automatically added to the reserved migrated_tools_conf.xml file as part of the migration process.
-
install_repository
(repository_elem, tool_shed_repository, install_dependencies, is_repository_dependency=False)[source]¶ Install a single repository, loading contained tools into the tool panel.
-
property
non_shed_tool_panel_configs
¶
-
order_repositories_for_installation
(tool_shed_repositories, repository_dependencies_dict)[source]¶ Some repositories may have repository dependencies that are required to be installed before the dependent repository. This method will inspect the list of repositories about to be installed and make sure to order them appropriately. For each repository about to be installed, if required repositories are not contained in the list of repositories about to be installed, then they are not considered. Repository dependency definitions that contain circular dependencies should not result in an infinite loop, but obviously prior installation will not be handled for one or more of the repositories that require prior installation. This process is similar to the process used when installing tool shed repositories, but does not handle managing tool panel sections and other components since repository dependency definitions contained in tool shed repositories with migrated tools must never define a relationship to a repository dependency that contains a tool.
-
galaxy.tool_shed.galaxy_install.update_repository_manager module¶
Determine if installed tool shed repositories have updates available in their respective tool sheds.
-
class
galaxy.tool_shed.galaxy_install.update_repository_manager.
UpdateRepositoryManager
(app)[source]¶ Bases:
object