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.dataset_collections package¶
Subpackages¶
Submodules¶
galaxy.dataset_collections.builder module¶
-
galaxy.dataset_collections.builder.
build_collection
(type, dataset_instances)[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.dataset_collections.builder.
set_collection_elements
(dataset_collection, type, dataset_instances)[source]¶
-
class
galaxy.dataset_collections.builder.
CollectionBuilder
(collection_type_description)[source]¶ Bases:
object
Purely functional builder pattern for building a dataset collection.
-
class
galaxy.dataset_collections.builder.
BoundCollectionBuilder
(dataset_collection, collection_type_description)[source]¶ Bases:
galaxy.dataset_collections.builder.CollectionBuilder
More stateful builder that is bound to a particular model object.
galaxy.dataset_collections.matching module¶
-
class
galaxy.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.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 dataset_collections_service 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 sevice - hence the complexity now.
-
structure
¶ Yield cross product of all unlinked collections structures to linked collection structure.
-
galaxy.dataset_collections.registry module¶
galaxy.dataset_collections.structure module¶
Module for reasoning about structure of and matching hierarchical collections of data.
-
class
galaxy.dataset_collections.structure.
Leaf
[source]¶ Bases:
object
-
children_known
= True¶
-
is_leaf
¶
-
-
class
galaxy.dataset_collections.structure.
BaseTree
(collection_type_description)[source]¶ Bases:
object
-
class
galaxy.dataset_collections.structure.
UnitializedTree
(collection_type_description)[source]¶ Bases:
galaxy.dataset_collections.structure.BaseTree
-
children_known
= False¶
-
is_leaf
¶
-
-
class
galaxy.dataset_collections.structure.
Tree
(children, collection_type_description)[source]¶ Bases:
galaxy.dataset_collections.structure.BaseTree
-
children_known
= True¶
-
is_leaf
¶
-
galaxy.dataset_collections.subcollections module¶
galaxy.dataset_collections.type_description module¶
-
class
galaxy.dataset_collections.type_description.
CollectionTypeDescriptionFactory
(type_registry)[source]¶ Bases:
object
-
class
galaxy.dataset_collections.type_description.
CollectionTypeDescription
(collection_type, 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'
-
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”.
-
dimension
¶
-