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.tools.toolbox.lineages package

class galaxy.tools.toolbox.lineages.LineageMap(app)[source]

Bases: object

Map each unique tool id to a lineage object.

__init__(app)[source]
register(tool, from_toolshed=False)[source]
get(tool_id)[source]
get_versionless(tool_id)[source]
class galaxy.tools.toolbox.lineages.ToolLineage[source]

Bases: object

get_versions(reverse=False)[source]

Return an ordered list of lineages (ToolLineageVersion) in this chain, from oldest to newest.

class galaxy.tools.toolbox.lineages.ToolVersionCache(app)[source]

Bases: object

Instances of this class allow looking up tool_version objects from memory (instead of querying the database) using the tool_version id or the tool_id. This is used to lookup parent tool_version ids using child tool_id, or the inverse, and getting all previous/next tool versions without numerous database requests.

__init__(app)[source]
get_tva_map()[source]

Retrieves all ToolVersionAssociation objects from the database, and builds dictionaries that can be used to either get a tools’ parent tool_version id (which can be used to get the parent’s tool_version object), or to get the child’s tool id using the parent’s tool_version id.

get_tool_versions()[source]

Get all tool_version objects from the database and build 2 dictionaries, with tool_version id or tool_id as key and the tool_version object as value.

Submodules

galaxy.tools.toolbox.lineages.factory module

class galaxy.tools.toolbox.lineages.factory.LineageMap(app)[source]

Bases: object

Map each unique tool id to a lineage object.

__init__(app)[source]
register(tool, from_toolshed=False)[source]
get(tool_id)[source]
get_versionless(tool_id)[source]

galaxy.tools.toolbox.lineages.interface module

class galaxy.tools.toolbox.lineages.interface.ToolLineage[source]

Bases: object

get_versions(reverse=False)[source]

Return an ordered list of lineages (ToolLineageVersion) in this chain, from oldest to newest.

class galaxy.tools.toolbox.lineages.interface.ToolLineageVersion(id, version)[source]

Bases: object

Represents a single tool in a lineage. If lineage is based around GUIDs that somehow encode the version (either using GUID or a simple tool id and a version).

__init__(id, version)[source]
static from_id_and_verion(id, version)[source]
static from_guid(guid)[source]
id_based

Return True if the lineage is defined by GUIDs (in this case the indexer of the tools (i.e. the ToolBox) should ignore the tool_version (because it is encoded in the GUID and managed externally).

to_dict()[source]

galaxy.tools.toolbox.lineages.stock module

class galaxy.tools.toolbox.lineages.stock.StockLineage(tool_id, **kwds)[source]

Bases: galaxy.tools.toolbox.lineages.interface.ToolLineage

Simple tool’s loaded directly from file system with lineage determined solely by distutil’s LooseVersion naming scheme.

lineages_by_id = {}
lock = <thread.lock object>
__init__(tool_id, **kwds)[source]
static from_tool(tool)[source]
register_version(tool_version)[source]
get_versions(reverse=False)[source]
to_dict()[source]

galaxy.tools.toolbox.lineages.tool_shed module

class galaxy.tools.toolbox.lineages.tool_shed.ToolShedLineage(app, tool_version, tool_shed_repository=None)[source]

Bases: galaxy.tools.toolbox.lineages.interface.ToolLineage

Representation of tool lineage derived from tool shed repository installations.

__init__(app, tool_version, tool_shed_repository=None)[source]
static from_tool(app, tool)[source]
static from_tool_id(app, tool_id)[source]
get_version_ids(reverse=False)[source]
get_versions(reverse=False)[source]
to_dict()[source]