galaxy.model.dataset_collections package
Subpackages
Submodules
galaxy.model.dataset_collections.builder module
- galaxy.model.dataset_collections.builder.build_collection(type, dataset_instances, collection=None, associated_identifiers=None)[source]
Build DatasetCollection with populated DatasetcollectionElement objects corresponding to the supplied dataset instances or throw exception if this is not a valid collection of the specified type.
- galaxy.model.dataset_collections.builder.set_collection_elements(dataset_collection, type, dataset_instances, associated_identifiers)[source]
galaxy.model.dataset_collections.matching module
- class galaxy.model.dataset_collections.matching.CollectionsToMatch[source]
Bases:
object
Structure representing a set of collections that need to be matched up when running tools (possibly workflows in the future as well).
- class galaxy.model.dataset_collections.matching.MatchingCollections[source]
Bases:
object
Structure holding the result of matching a list of collections together. This class being different than the class above and being created in the DatasetCollectionManager layer may seem like overkill but I suspect in the future plugins will be subtypable for instance so matching collections will need to make heavy use of the dataset collection type registry managed by the dataset collections service - hence the complexity now.
- property structure
Yield cross product of all unlinked collections structures to linked collection structure.
- static for_collections(collections_to_match, collection_type_descriptions) MatchingCollections | None [source]
galaxy.model.dataset_collections.registry module
galaxy.model.dataset_collections.structure module
Module for reasoning about structure of and matching hierarchical collections of data.
- class galaxy.model.dataset_collections.structure.Leaf[source]
Bases:
object
- children_known = True
- property is_leaf
- class galaxy.model.dataset_collections.structure.BaseTree(collection_type_description)[source]
Bases:
object
- class galaxy.model.dataset_collections.structure.UninitializedTree(collection_type_description)[source]
Bases:
BaseTree
- children_known = False
- property is_leaf
- class galaxy.model.dataset_collections.structure.Tree(children, collection_type_description, when_values=None)[source]
Bases:
BaseTree
- children_known = True
- property is_leaf
galaxy.model.dataset_collections.subcollections module
galaxy.model.dataset_collections.type_description module
- class galaxy.model.dataset_collections.type_description.CollectionTypeDescriptionFactory(type_registry=<galaxy.model.dataset_collections.registry.DatasetCollectionTypesRegistry object>)[source]
Bases:
object
- class galaxy.model.dataset_collections.type_description.CollectionTypeDescription(collection_type: str | CollectionTypeDescription, collection_type_description_factory)[source]
Bases:
object
Abstraction over dataset collection type that ties together string reprentation in database/model with type registry.
>>> factory = CollectionTypeDescriptionFactory(None) >>> nested_type_description = factory.for_collection_type("list:paired") >>> paired_type_description = factory.for_collection_type("paired") >>> nested_type_description.has_subcollections_of_type("list") False >>> nested_type_description.has_subcollections_of_type("list:paired") False >>> nested_type_description.has_subcollections_of_type("paired") True >>> nested_type_description.has_subcollections_of_type(paired_type_description) True >>> nested_type_description.has_subcollections() True >>> paired_type_description.has_subcollections() False >>> paired_type_description.rank_collection_type() 'paired' >>> nested_type_description.rank_collection_type() 'list' >>> nested_type_description.effective_collection_type(paired_type_description) 'list' >>> nested_type_description.effective_collection_type_description(paired_type_description).collection_type 'list' >>> nested_type_description.child_collection_type() 'paired'
- __init__(collection_type: str | CollectionTypeDescription, collection_type_description_factory)[source]
- has_subcollections_of_type(other_collection_type)[source]
Take in another type (either flat string or another CollectionTypeDescription) and determine if this collection contains subcollections matching that type.
The way this is used in map/reduce it seems to make the most sense for this to return True if these subtypes are proper (i.e. a type is not considered to have subcollections of its own type).
- rank_collection_type()[source]
Return the top-level collection type corresponding to this collection type. For instance the “rank” type of a list of paired data (“list:paired”) is “list”.
- property dimension