Warning
This document is for an in-development version 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.model package¶
Galaxy data model classes
Naming: try to use class names that have a distinct plural form so that the relationship cardinalities are obvious (e.g. prefer Dataset to Data)
-
exception
galaxy.model.
NoConverterException
(value)[source]¶ Bases:
exceptions.Exception
-
exception
galaxy.model.
ConverterDependencyException
(value)[source]¶ Bases:
exceptions.Exception
-
class
galaxy.model.
HasTags
[source]¶ Bases:
object
-
dict_collection_visible_keys
= ['tags']¶
-
dict_element_visible_keys
= ['tags']¶
-
-
class
galaxy.model.
UsesCreateAndUpdateTime
[source]¶ Bases:
object
-
seconds_since_updated
¶
-
seconds_since_created
¶
-
-
galaxy.model.
cached_id
(galaxy_model_object)[source]¶ Get model object id attribute without a firing a database query.
Useful to fetching the id of a typical Galaxy model object after a flush, where SA is going to mark the id attribute as unloaded but we know the id is immutable and so we can use the database identity to fetch.
With Galaxy’s default SA initialization - any flush marks all attributes as unloaded - even objects completely unrelated to the flushed changes and even attributes we know to be immutable like id. See test_galaxy_mapping.py for verification of this behavior. This method is a workaround that uses the fact that we know all Galaxy objects use the id attribute as identity and SA internals (_sa_instance_state) to infer the previously loaded ID value. I tried digging into the SA internals extensively and couldn’t find a way to get the previously loaded values after a flush to allow a generalization of this for other attributes.
-
class
galaxy.model.
User
(email=None, password=None, username=None)[source]¶ Bases:
galaxy.util.dictifiable.Dictifiable
,galaxy.model.RepresentById
-
use_pbkdf2
= True¶ Data for a Galaxy user or admin and relations to their histories, credentials, and roles.
-
dict_collection_visible_keys
= ['id', 'email', 'username', 'deleted', 'active', 'last_password_change']¶
-
dict_element_visible_keys
= ['id', 'email', 'username', 'total_disk_usage', 'nice_total_disk_usage', 'deleted', 'active', 'last_password_change']¶
-
__init__
(email=None, password=None, username=None)¶
-
extra_preferences
¶
-
set_random_password
(length=16)[source]¶ Sets user password to a random string of the given length. :return: void
-
system_user_pwent
(real_system_username)[source]¶ Gives the system user pwent entry based on e-mail or username depending on the value in real_system_username
-
all_roles
()[source]¶ Return a unique list of Roles associated with this user or any of their groups.
-
get_disk_usage
(nice_size=False)[source]¶ Return byte count of disk space used by user or a human-readable string if nice_size is True.
-
total_disk_usage
¶ Return byte count of disk space used by user or a human-readable string if nice_size is True.
-
nice_total_disk_usage
¶ Return byte count of disk space used in a human-readable string.
-
calculate_disk_usage
()[source]¶ Return byte count total of disk space used by all non-purged, non-library HDAs in non-purged histories.
-
static
user_template_environment
(user)[source]¶ >>> env = User.user_template_environment(None) >>> env['__user_email__'] 'Anonymous' >>> env['__user_id__'] 'Anonymous' >>> user = User('foo@example.com') >>> user.id = 6 >>> user.username = 'foo2' >>> env = User.user_template_environment(user) >>> env['__user_id__'] '6' >>> env['__user_name__'] 'foo2'
-
-
class
galaxy.model.
PasswordResetToken
(user, token=None)[source]¶ Bases:
object
-
__init__
(user, token=None)¶
-
-
class
galaxy.model.
JobMetricText
(plugin, metric_name, metric_value)[source]¶ Bases:
galaxy.model.BaseJobMetric
,galaxy.model.RepresentById
-
class
galaxy.model.
JobMetricNumeric
(plugin, metric_name, metric_value)[source]¶ Bases:
galaxy.model.BaseJobMetric
,galaxy.model.RepresentById
-
class
galaxy.model.
TaskMetricText
(plugin, metric_name, metric_value)[source]¶ Bases:
galaxy.model.BaseJobMetric
,galaxy.model.RepresentById
-
class
galaxy.model.
TaskMetricNumeric
(plugin, metric_name, metric_value)[source]¶ Bases:
galaxy.model.BaseJobMetric
,galaxy.model.RepresentById
-
class
galaxy.model.
Job
[source]¶ Bases:
galaxy.model.JobLike
,galaxy.model.UsesCreateAndUpdateTime
,galaxy.util.dictifiable.Dictifiable
,galaxy.model.RepresentById
-
dict_collection_visible_keys
= ['id', 'state', 'exit_code', 'update_time', 'create_time']¶
-
dict_element_visible_keys
= ['id', 'state', 'exit_code', 'update_time', 'create_time']¶ A job represents a request to run a tool given input datasets, tool parameters, and output datasets.
-
states
= <galaxy.util.bunch.Bunch object>¶
-
terminal_states
= ['ok', 'error', 'deleted']¶
-
non_ready_states
= ['new', 'resubmitted', 'upload', 'waiting', 'queued', 'running']¶ job states where the job hasn’t finished and the model may still change
-
__init__
()¶
-
finished
¶
-
get_external_output_metadata
()[source]¶ The external_output_metadata is currently a reference from Job to JobExternalOutputMetadata. It exists for a job but not a task.
-
get_id_tag
()[source]¶ Return a tag that can be useful in identifying a Job. This returns the Job’s get_id
-
get_param_values
(app, ignore_errors=False)[source]¶ Read encoded parameter values from the database and turn back into a dict of tool parameter values.
-
check_if_output_datasets_deleted
()[source]¶ Return true if all of the output datasets associated with this job are in the deleted state
-
mark_deleted
(track_jobs_in_database=False)[source]¶ Mark this job as deleted, and mark any output datasets as discarded.
-
-
class
galaxy.model.
Task
(job, working_directory, prepare_files_cmd)[source]¶ Bases:
galaxy.model.JobLike
,galaxy.model.RepresentById
A task represents a single component of a job.
-
states
= <galaxy.util.bunch.Bunch object>¶
-
__init__
(job, working_directory, prepare_files_cmd)¶
-
get_param_values
(app)[source]¶ Read encoded parameter values from the database and turn back into a dict of tool parameter values.
-
get_id_tag
()[source]¶ Return an id tag suitable for identifying the task. This combines the task’s job id and the task’s own id.
-
get_external_output_metadata
()[source]¶ The external_output_metadata is currently a backref to JobExternalOutputMetadata. It exists for a job but not a task, and when a task is cancelled its corresponding parent Job will be cancelled. So None is returned now, but that could be changed to self.get_job().get_external_output_metadata().
-
get_job_runner_name
()[source]¶ Since runners currently access Tasks the same way they access Jobs, this method just refers to this instance’s runner.
-
-
class
galaxy.model.
JobParameter
(name, value)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(name, value)¶
-
-
class
galaxy.model.
JobToInputDatasetAssociation
(name, dataset)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(name, dataset)¶
-
-
class
galaxy.model.
JobToOutputDatasetAssociation
(name, dataset)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(name, dataset)¶
-
-
class
galaxy.model.
JobToInputDatasetCollectionAssociation
(name, dataset_collection)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(name, dataset_collection)¶
-
-
class
galaxy.model.
JobToOutputDatasetCollectionAssociation
(name, dataset_collection_instance)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(name, dataset_collection_instance)¶
-
-
class
galaxy.model.
JobToImplicitOutputDatasetCollectionAssociation
(name, dataset_collection)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(name, dataset_collection)¶
-
-
class
galaxy.model.
JobToInputLibraryDatasetAssociation
(name, dataset)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(name, dataset)¶
-
-
class
galaxy.model.
JobToOutputLibraryDatasetAssociation
(name, dataset)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(name, dataset)¶
-
-
class
galaxy.model.
JobStateHistory
(job)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(job)¶
-
-
class
galaxy.model.
ImplicitlyCreatedDatasetCollectionInput
(name, input_dataset_collection)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(name, input_dataset_collection)¶
-
-
class
galaxy.model.
ImplicitCollectionJobs
(id=None, populated_state=None)[source]¶ Bases:
galaxy.model.RepresentById
-
populated_states
= <galaxy.util.bunch.Bunch object>¶
-
__init__
(id=None, populated_state=None)¶
-
job_list
¶
-
-
class
galaxy.model.
ImplicitCollectionJobsJobAssociation
[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
()¶
-
-
class
galaxy.model.
PostJobAction
(action_type, workflow_step, output_name=None, action_arguments=None)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(action_type, workflow_step, output_name=None, action_arguments=None)¶
-
-
class
galaxy.model.
PostJobActionAssociation
(pja, job=None, job_id=None)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(pja, job=None, job_id=None)¶
-
-
class
galaxy.model.
JobExternalOutputMetadata
(job=None, dataset=None)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(job=None, dataset=None)¶
-
dataset
¶
-
-
class
galaxy.model.
JobExportHistoryArchive
(job=None, history=None, dataset=None, compressed=False, history_attrs_filename=None, datasets_attrs_filename=None, jobs_attrs_filename=None)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(job=None, history=None, dataset=None, compressed=False, history_attrs_filename=None, datasets_attrs_filename=None, jobs_attrs_filename=None)¶
-
up_to_date
¶ Return False, if a new export should be generated for corresponding history.
-
ready
¶
-
preparing
¶
-
export_name
¶
-
-
class
galaxy.model.
JobImportHistoryArchive
(job=None, history=None, archive_dir=None)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(job=None, history=None, archive_dir=None)¶
-
-
class
galaxy.model.
GenomeIndexToolData
(job=None, params=None, dataset=None, deferred_job=None, transfer_job=None, fasta_path=None, created_time=None, modified_time=None, dbkey=None, user=None, indexer=None)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(job=None, params=None, dataset=None, deferred_job=None, transfer_job=None, fasta_path=None, created_time=None, modified_time=None, dbkey=None, user=None, indexer=None)¶
-
-
class
galaxy.model.
DeferredJob
(state=None, plugin=None, params=None)[source]¶ Bases:
galaxy.model.RepresentById
-
states
= <galaxy.util.bunch.Bunch object>¶
-
__init__
(state=None, plugin=None, params=None)¶
-
check_interval
¶
-
last_check
¶
-
is_check_time
¶
-
-
class
galaxy.model.
Group
(name=None)[source]¶ Bases:
galaxy.util.dictifiable.Dictifiable
,galaxy.model.RepresentById
-
dict_collection_visible_keys
= ['id', 'name']¶
-
dict_element_visible_keys
= ['id', 'name']¶
-
__init__
(name=None)¶
-
-
class
galaxy.model.
UserGroupAssociation
(user, group)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(user, group)¶
-
-
class
galaxy.model.
History
(id=None, name=None, user=None)[source]¶ Bases:
galaxy.model.HasTags
,galaxy.util.dictifiable.Dictifiable
,galaxy.model.item_attrs.UsesAnnotations
,galaxy.model.HasName
,galaxy.model.RepresentById
-
dict_collection_visible_keys
= ['id', 'name', 'published', 'deleted']¶
-
dict_element_visible_keys
= ['id', 'name', 'genome_build', 'deleted', 'purged', 'update_time', 'published', 'importable', 'slug', 'empty']¶
-
default_name
= 'Unnamed history'¶
-
__init__
(id=None, name=None, user=None)¶
-
empty
¶
-
add_datasets
(sa_session, datasets, parent_id=None, genome_build=None, set_hid=True, quota=True, flush=False)[source]¶ Optimized version of add_dataset above that minimizes database interactions when adding many datasets to history at once.
-
copy
(name=None, target_user=None, activatable=False, all_datasets=False)[source]¶ Return a copy of this history using the given name and target_user. If activatable, copy only non-deleted datasets. If all_datasets, copy non-deleted, deleted, and purged datasets.
-
has_possible_members
¶
-
activatable_datasets
¶
-
latest_export
¶
-
paused_jobs
¶
-
disk_size
¶ Return the size in bytes of this history by summing the ‘total_size’s of all non-purged, unique datasets within it.
-
disk_nice_size
¶ Returns human readable size of history on disk.
-
active_datasets_and_roles
¶
-
active_visible_datasets_and_roles
¶
-
active_visible_dataset_collections
¶
-
active_contents
¶ Return all active contents ordered by hid.
-
Bases:
galaxy.model.RepresentById
-
class
galaxy.model.
UserRoleAssociation
(user, role)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(user, role)¶
-
-
class
galaxy.model.
GroupRoleAssociation
(group, role)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(group, role)¶
-
-
class
galaxy.model.
Role
(name='', description='', type='system', deleted=False)[source]¶ Bases:
galaxy.util.dictifiable.Dictifiable
,galaxy.model.RepresentById
-
dict_collection_visible_keys
= ['id', 'name']¶
-
dict_element_visible_keys
= ['id', 'name', 'description', 'type']¶
-
private_id
= None¶
-
types
= <galaxy.util.bunch.Bunch object>¶
-
__init__
(name='', description='', type='system', deleted=False)¶
-
-
class
galaxy.model.
UserQuotaAssociation
(user, quota)[source]¶ Bases:
galaxy.util.dictifiable.Dictifiable
,galaxy.model.RepresentById
-
dict_element_visible_keys
= ['user']¶
-
__init__
(user, quota)¶
-
-
class
galaxy.model.
GroupQuotaAssociation
(group, quota)[source]¶ Bases:
galaxy.util.dictifiable.Dictifiable
,galaxy.model.RepresentById
-
dict_element_visible_keys
= ['group']¶
-
__init__
(group, quota)¶
-
-
class
galaxy.model.
Quota
(name='', description='', amount=0, operation='=')[source]¶ Bases:
galaxy.util.dictifiable.Dictifiable
,galaxy.model.RepresentById
-
dict_collection_visible_keys
= ['id', 'name']¶
-
dict_element_visible_keys
= ['id', 'name', 'description', 'bytes', 'operation', 'display_amount', 'default', 'users', 'groups']¶
-
valid_operations
= ('+', '-', '=')¶
-
__init__
(name='', description='', amount=0, operation='=')¶
-
amount
¶
-
display_amount
¶
-
-
class
galaxy.model.
DefaultQuotaAssociation
(type, quota)[source]¶ Bases:
galaxy.model.Quota
,galaxy.util.dictifiable.Dictifiable
,galaxy.model.RepresentById
-
dict_element_visible_keys
= ['type']¶
-
types
= <galaxy.util.bunch.Bunch object>¶
-
__init__
(type, quota)¶
-
-
class
galaxy.model.
DatasetPermissions
(action, dataset, role=None, role_id=None)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(action, dataset, role=None, role_id=None)¶
-
-
class
galaxy.model.
LibraryPermissions
(action, library_item, role)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(action, library_item, role)¶
-
-
class
galaxy.model.
LibraryFolderPermissions
(action, library_item, role)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(action, library_item, role)¶
-
-
class
galaxy.model.
LibraryDatasetPermissions
(action, library_item, role)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(action, library_item, role)¶
-
-
class
galaxy.model.
LibraryDatasetDatasetAssociationPermissions
(action, library_item, role)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(action, library_item, role)¶
-
-
class
galaxy.model.
DefaultUserPermissions
(user, action, role)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(user, action, role)¶
-
-
class
galaxy.model.
DefaultHistoryPermissions
(history, action, role)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(history, action, role)¶
-
-
class
galaxy.model.
Dataset
(id=None, state=None, external_filename=None, extra_files_path=None, file_size=None, purgable=True, uuid=None)[source]¶ Bases:
galaxy.model.StorableObject
,galaxy.model.RepresentById
-
states
= <galaxy.util.bunch.Bunch object>¶
-
non_ready_states
= ('new', 'upload', 'queued', 'running', 'setting_metadata')¶
-
ready_states
= ('discarded', 'ok', 'failed_metadata', 'paused', 'error', 'empty')¶
-
valid_input_states
= ('ok', 'failed_metadata', 'upload', 'paused', 'running', 'setting_metadata', 'new', 'queued', 'empty')¶
-
terminal_states
= ('ok', 'empty', 'error', 'discarded', 'failed_metadata')¶
-
conversion_messages
= <galaxy.util.bunch.Bunch object>¶
-
permitted_actions
= <galaxy.util.bunch.Bunch object>¶
-
file_path
= '/tmp/'¶
-
object_store
= None¶
-
engine
= None¶
-
__init__
(id=None, state=None, external_filename=None, extra_files_path=None, file_size=None, purgable=True, uuid=None)¶
-
file_name
¶
-
extra_files_path
¶
-
set_size
(no_extra_files=False)[source]¶ Sets the size of the data on disk.
If the caller is sure there are no extra files, pass no_extra_files as True to optimize subsequent calls to get_total_size or set_total_size - potentially avoiding both a database flush and check against the file system.
-
user_can_purge
¶
-
-
class
galaxy.model.
DatasetInstance
(id=None, hid=None, name=None, info=None, blurb=None, peek=None, tool_version=None, extension=None, dbkey=None, metadata=None, history=None, dataset=None, deleted=False, designation=None, parent_id=None, validation_errors=None, visible=True, create_dataset=False, sa_session=None, extended_metadata=None, flush=True)[source]¶ Bases:
object
A base class for all ‘dataset instances’, HDAs, LDAs, etc
-
states
= <galaxy.util.bunch.Bunch object>¶
-
conversion_messages
= <galaxy.util.bunch.Bunch object>¶
-
permitted_actions
= <galaxy.util.bunch.Bunch object>¶
-
__init__
(id=None, hid=None, name=None, info=None, blurb=None, peek=None, tool_version=None, extension=None, dbkey=None, metadata=None, history=None, dataset=None, deleted=False, designation=None, parent_id=None, validation_errors=None, visible=True, create_dataset=False, sa_session=None, extended_metadata=None, flush=True)[source]¶
-
ext
¶
-
state
¶
-
file_name
¶
-
extra_files_path
¶
-
datatype
¶
-
set_metadata_requires_flush
¶
-
metadata
¶
-
dbkey
¶
-
get_raw_data
()[source]¶ Returns the full data. To stream it open the file_name and read/write as needed
-
get_converted_dataset
(trans, target_ext, target_context=None, history=None)[source]¶ Return converted dataset(s) if they exist, along with a dict of dependencies. If not converted yet, do so and return None (the first time). If unconvertible, raise exception.
-
copy_attributes
(new_dataset)[source]¶ Copies attributes to a new datasets, used for implicit conversions
-
get_metadata_dataset
(dataset_ext)[source]¶ Returns an HDA that points to a metadata file which contains a converted data with the requested extension.
-
find_conversion_destination
(accepted_formats, **kwd)[source]¶ Returns ( target_ext, existing converted dataset )
-
is_ok
¶
-
is_pending
¶ Return true if the dataset is neither ready nor in error
-
source_library_dataset
¶
-
source_dataset_chain
¶
-
creating_job
¶
-
-
class
galaxy.model.
HistoryDatasetAssociation
(hid=None, history=None, copied_from_history_dataset_association=None, copied_from_library_dataset_dataset_association=None, sa_session=None, **kwd)[source]¶ Bases:
galaxy.model.DatasetInstance
,galaxy.model.HasTags
,galaxy.util.dictifiable.Dictifiable
,galaxy.model.item_attrs.UsesAnnotations
,galaxy.model.HasName
,galaxy.model.RepresentById
Resource class that creates a relation between a dataset and a user history.
-
__init__
(hid=None, history=None, copied_from_history_dataset_association=None, copied_from_library_dataset_dataset_association=None, sa_session=None, **kwd)¶ Create a a new HDA and associate it with the given history.
-
copy
(parent_id=None, copy_tags=None, force_flush=True, copy_hid=True, new_name=None)[source]¶ Create a copy of this HDA.
-
to_library_dataset_dataset_association
(trans, target_folder, replace_dataset=None, parent_id=None, user=None, roles=None, ldda_message='', element_identifier=None)[source]¶ Copy this HDA to a library optionally replacing an existing LDDA.
-
quota_amount
(user)[source]¶ Return the disk space used for this HDA relevant to user quotas.
If the user has multiple instances of this dataset, it will not affect their disk usage statistic.
-
to_dict
(view='collection', expose_dataset_path=False)[source]¶ Return attributes of this HDA that are exposed using the API.
-
history_content_type
¶
-
content_type
= u'dataset'¶
-
type_id
¶
-
-
class
galaxy.model.
HistoryDatasetAssociationHistory
(history_dataset_association_id, name, dbkey, update_time, version, extension, extended_metadata_id, metadata)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(history_dataset_association_id, name, dbkey, update_time, version, extension, extended_metadata_id, metadata)¶
-
-
class
galaxy.model.
HistoryDatasetAssociationDisplayAtAuthorization
(hda=None, user=None, site=None)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(hda=None, user=None, site=None)¶
-
-
class
galaxy.model.
HistoryDatasetAssociationSubset
(hda, subset, location)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(hda, subset, location)¶
-
-
class
galaxy.model.
Library
(name=None, description=None, synopsis=None, root_folder=None)[source]¶ Bases:
galaxy.util.dictifiable.Dictifiable
,galaxy.model.HasName
,galaxy.model.RepresentById
-
permitted_actions
= <galaxy.util.bunch.Bunch object>¶
-
dict_collection_visible_keys
= ['id', 'name']¶
-
dict_element_visible_keys
= ['id', 'deleted', 'name', 'description', 'synopsis', 'root_folder_id', 'create_time']¶
-
__init__
(name=None, description=None, synopsis=None, root_folder=None)¶
-
-
class
galaxy.model.
LibraryFolder
(name=None, description=None, item_count=0, order_id=None)[source]¶ Bases:
galaxy.util.dictifiable.Dictifiable
,galaxy.model.HasName
,galaxy.model.RepresentById
-
dict_element_visible_keys
= ['id', 'parent_id', 'name', 'description', 'item_count', 'genome_build', 'update_time', 'deleted']¶
-
__init__
(name=None, description=None, item_count=0, order_id=None)¶
-
activatable_library_datasets
¶
-
library_path
¶
-
parent_library
¶
-
-
class
galaxy.model.
LibraryDataset
(folder=None, order_id=None, name=None, info=None, library_dataset_dataset_association=None, **kwd)[source]¶ Bases:
galaxy.model.RepresentById
-
upload_options
= [('upload_file', 'Upload files'), ('upload_directory', 'Upload directory of files'), ('upload_paths', 'Upload files from filesystem paths'), ('import_from_history', 'Import datasets from your current history')]¶
-
__init__
(folder=None, order_id=None, name=None, info=None, library_dataset_dataset_association=None, **kwd)¶
-
info
¶
-
name
¶
-
-
class
galaxy.model.
LibraryDatasetDatasetAssociation
(copied_from_history_dataset_association=None, copied_from_library_dataset_dataset_association=None, library_dataset=None, user=None, sa_session=None, **kwd)[source]¶ Bases:
galaxy.model.DatasetInstance
,galaxy.model.HasName
,galaxy.model.RepresentById
-
__init__
(copied_from_history_dataset_association=None, copied_from_library_dataset_dataset_association=None, library_dataset=None, user=None, sa_session=None, **kwd)¶
-
-
class
galaxy.model.
ExtendedMetadata
(data)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(data)¶
-
-
class
galaxy.model.
ExtendedMetadataIndex
(extended_metadata, path, value)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(extended_metadata, path, value)¶
-
-
class
galaxy.model.
LibraryInfoAssociation
(library, form_definition, info, inheritable=False)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(library, form_definition, info, inheritable=False)¶
-
-
class
galaxy.model.
LibraryFolderInfoAssociation
(folder, form_definition, info, inheritable=False)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(folder, form_definition, info, inheritable=False)¶
-
-
class
galaxy.model.
LibraryDatasetDatasetInfoAssociation
(library_dataset_dataset_association, form_definition, info)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(library_dataset_dataset_association, form_definition, info)¶
-
inheritable
¶
-
-
class
galaxy.model.
ValidationError
(message=None, err_type=None, attributes=None)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(message=None, err_type=None, attributes=None)¶
-
-
class
galaxy.model.
DatasetToValidationErrorAssociation
(dataset, validation_error)[source]¶ Bases:
object
-
class
galaxy.model.
ImplicitlyConvertedDatasetAssociation
(id=None, parent=None, dataset=None, file_type=None, deleted=False, purged=False, metadata_safe=True)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(id=None, parent=None, dataset=None, file_type=None, deleted=False, purged=False, metadata_safe=True)¶
-
-
class
galaxy.model.
DatasetCollection
(id=None, collection_type=None, populated=True, element_count=None)[source]¶ Bases:
galaxy.util.dictifiable.Dictifiable
,galaxy.model.item_attrs.UsesAnnotations
,galaxy.model.RepresentById
-
dict_collection_visible_keys
= ['id', 'collection_type']¶
-
dict_element_visible_keys
= ['id', 'collection_type']¶
-
populated_states
= <galaxy.util.bunch.Bunch object>¶
-
__init__
(id=None, collection_type=None, populated=True, element_count=None)¶
-
dataset_states_and_extensions_summary
¶
-
populated_optimized
¶
-
populated
¶
-
dataset_action_tuples
¶
-
waiting_for_elements
¶
-
dataset_instances
¶
-
dataset_elements
¶
-
first_dataset_element
¶
-
state
¶
-
has_subcollections
¶
-
-
class
galaxy.model.
DatasetCollectionInstance
(collection=None, deleted=False)[source]¶ Bases:
galaxy.model.HasName
-
state
¶
-
populated
¶
-
dataset_instances
¶
-
-
class
galaxy.model.
HistoryDatasetCollectionAssociation
(id=None, hid=None, collection=None, history=None, name=None, deleted=False, visible=True, copied_from_history_dataset_collection_association=None, implicit_output_name=None, implicit_input_collections=[])[source]¶ Bases:
galaxy.model.DatasetCollectionInstance
,galaxy.model.HasTags
,galaxy.util.dictifiable.Dictifiable
,galaxy.model.item_attrs.UsesAnnotations
,galaxy.model.RepresentById
Associates a DatasetCollection with a History.
-
editable_keys
= ('name', 'deleted', 'visible')¶
-
__init__
(id=None, hid=None, collection=None, history=None, name=None, deleted=False, visible=True, copied_from_history_dataset_collection_association=None, implicit_output_name=None, implicit_input_collections=[])¶
-
history_content_type
¶
-
content_type
= u'dataset_collection'¶
-
type_id
¶
-
job_source_type
¶
-
job_source_id
¶
-
-
class
galaxy.model.
LibraryDatasetCollectionAssociation
(id=None, collection=None, name=None, deleted=False, folder=None)[source]¶ Bases:
galaxy.model.DatasetCollectionInstance
,galaxy.model.RepresentById
Associates a DatasetCollection with a library folder.
-
editable_keys
= ('name', 'deleted')¶
-
__init__
(id=None, collection=None, name=None, deleted=False, folder=None)¶
-
-
class
galaxy.model.
DatasetCollectionElement
(id=None, collection=None, element=None, element_index=None, element_identifier=None)[source]¶ Bases:
galaxy.util.dictifiable.Dictifiable
,galaxy.model.RepresentById
Associates a DatasetInstance (hda or ldda) with a DatasetCollection.
-
dict_collection_visible_keys
= ['id', 'element_type', 'element_index', 'element_identifier']¶
-
dict_element_visible_keys
= ['id', 'element_type', 'element_index', 'element_identifier']¶
-
UNINITIALIZED_ELEMENT
= <object object>¶
-
__init__
(id=None, collection=None, element=None, element_index=None, element_identifier=None)¶
-
element_type
¶
-
is_collection
¶
-
element_object
¶
-
dataset_instance
¶
-
dataset
¶
-
dataset_instances
¶
-
-
class
galaxy.model.
Event
(message=None, history=None, user=None, galaxy_session=None)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(message=None, history=None, user=None, galaxy_session=None)¶
-
-
class
galaxy.model.
GalaxySession
(id=None, user=None, remote_host=None, remote_addr=None, referer=None, current_history=None, session_key=None, is_valid=False, prev_session_id=None, last_action=None)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(id=None, user=None, remote_host=None, remote_addr=None, referer=None, current_history=None, session_key=None, is_valid=False, prev_session_id=None, last_action=None)¶
-
total_disk_usage
¶
-
-
class
galaxy.model.
GalaxySessionToHistoryAssociation
(galaxy_session, history)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(galaxy_session, history)¶
-
-
class
galaxy.model.
StoredWorkflow
[source]¶ Bases:
galaxy.model.HasTags
,galaxy.util.dictifiable.Dictifiable
,galaxy.model.RepresentById
-
dict_collection_visible_keys
= ['id', 'name', 'published', 'deleted']¶
-
dict_element_visible_keys
= ['id', 'name', 'published', 'deleted']¶
-
__init__
()¶
-
-
class
galaxy.model.
Workflow
(uuid=None)[source]¶ Bases:
galaxy.util.dictifiable.Dictifiable
,galaxy.model.RepresentById
-
dict_collection_visible_keys
= ['name', 'has_cycles', 'has_errors']¶
-
dict_element_visible_keys
= ['name', 'has_cycles', 'has_errors']¶
-
input_step_types
= ['data_input', 'data_collection_input', 'parameter_input']¶
-
__init__
(uuid=None)¶
-
has_outputs_defined
()[source]¶ Returns true or false indicating whether or not a workflow has outputs defined.
-
steps_by_id
¶
-
input_steps
¶
-
workflow_outputs
¶
-
top_level_workflow
¶ If this workflow is not attached to stored workflow directly, recursively grab its parents until it is the top level workflow which must have a stored workflow associated with it.
-
top_level_stored_workflow
¶ If this workflow is not attached to stored workflow directly, recursively grab its parents until it is the top level workflow which must have a stored workflow associated with it and then grab that stored workflow.
-
-
class
galaxy.model.
WorkflowStep
[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
()¶
-
input_connections
¶
-
unique_workflow_outputs
¶
-
content_id
¶
-
input_connections_by_name
¶
-
-
class
galaxy.model.
WorkflowStepInput
(workflow_step)[source]¶ Bases:
galaxy.model.RepresentById
-
default_merge_type
= None¶
-
default_scatter_type
= None¶
-
__init__
(workflow_step)¶
-
-
class
galaxy.model.
WorkflowStepConnection
[source]¶ Bases:
galaxy.model.RepresentById
-
NON_DATA_CONNECTION
= '__NO_INPUT_OUTPUT_NAME__'¶
-
__init__
()¶
-
non_data_connection
¶
-
input_name
¶
-
input_step
¶
-
input_step_id
¶
-
-
class
galaxy.model.
WorkflowOutput
(workflow_step, output_name=None, label=None, uuid=None)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(workflow_step, output_name=None, label=None, uuid=None)¶
-
Bases:
galaxy.model.RepresentById
-
class
galaxy.model.
StoredWorkflowMenuEntry
[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
()¶
-
-
class
galaxy.model.
WorkflowInvocation
[source]¶ Bases:
galaxy.model.UsesCreateAndUpdateTime
,galaxy.util.dictifiable.Dictifiable
,galaxy.model.RepresentById
-
dict_collection_visible_keys
= ['id', 'update_time', 'workflow_id', 'history_id', 'uuid', 'state']¶
-
dict_element_visible_keys
= ['id', 'update_time', 'workflow_id', 'history_id', 'uuid', 'state']¶
-
states
= <galaxy.util.bunch.Bunch object>¶
-
__init__
()¶
-
active
¶ Indicates the workflow invocation is somehow active - and in particular valid actions may be performed on its WorkflowInvocationSteps.
-
update
()¶
-
resource_parameters
¶
-
-
class
galaxy.model.
WorkflowInvocationToSubworkflowInvocationAssociation
[source]¶ Bases:
galaxy.util.dictifiable.Dictifiable
,galaxy.model.RepresentById
-
dict_collection_visible_keys
= ['id', 'workflow_step_id', 'workflow_invocation_id', 'subworkflow_invocation_id']¶
-
dict_element_visible_keys
= ['id', 'workflow_step_id', 'workflow_invocation_id', 'subworkflow_invocation_id']¶
-
-
class
galaxy.model.
WorkflowInvocationStep
[source]¶ Bases:
galaxy.util.dictifiable.Dictifiable
,galaxy.model.RepresentById
-
dict_collection_visible_keys
= ['id', 'update_time', 'job_id', 'workflow_step_id', 'state', 'action']¶
-
dict_element_visible_keys
= ['id', 'update_time', 'job_id', 'workflow_step_id', 'state', 'action']¶
-
states
= <galaxy.util.bunch.Bunch object>¶
-
is_new
¶
-
jobs
¶
-
-
class
galaxy.model.
WorkflowRequestInputParameter
(name=None, value=None, type=None)[source]¶ Bases:
galaxy.util.dictifiable.Dictifiable
,galaxy.model.RepresentById
Workflow-related parameters not tied to steps or inputs.
-
dict_collection_visible_keys
= ['id', 'name', 'value', 'type']¶
-
types
= <galaxy.util.bunch.Bunch object>¶
-
__init__
(name=None, value=None, type=None)¶
-
-
class
galaxy.model.
WorkflowRequestStepState
(workflow_step=None, name=None, value=None)[source]¶ Bases:
galaxy.util.dictifiable.Dictifiable
,galaxy.model.RepresentById
Workflow step value parameters.
-
dict_collection_visible_keys
= ['id', 'name', 'value', 'workflow_step_id']¶
-
__init__
(workflow_step=None, name=None, value=None)¶
-
-
class
galaxy.model.
WorkflowRequestToInputDatasetAssociation
[source]¶ Bases:
galaxy.util.dictifiable.Dictifiable
,galaxy.model.RepresentById
Workflow step input dataset parameters.
-
dict_collection_visible_keys
= ['id', 'workflow_invocation_id', 'workflow_step_id', 'dataset_id', 'name']¶
-
-
class
galaxy.model.
WorkflowRequestToInputDatasetCollectionAssociation
[source]¶ Bases:
galaxy.util.dictifiable.Dictifiable
,galaxy.model.RepresentById
Workflow step input dataset collection parameters.
-
dict_collection_visible_keys
= ['id', 'workflow_invocation_id', 'workflow_step_id', 'dataset_collection_id', 'name']¶
-
-
class
galaxy.model.
WorkflowRequestInputStepParameter
[source]¶ Bases:
galaxy.util.dictifiable.Dictifiable
,galaxy.model.RepresentById
Workflow step parameter inputs.
-
dict_collection_visible_keys
= ['id', 'workflow_invocation_id', 'workflow_step_id', 'parameter_value']¶
-
-
class
galaxy.model.
WorkflowInvocationOutputDatasetAssociation
[source]¶ Bases:
galaxy.util.dictifiable.Dictifiable
,galaxy.model.RepresentById
Represents links to output datasets for the workflow.
-
dict_collection_visible_keys
= ['id', 'workflow_invocation_id', 'workflow_step_id', 'dataset_id', 'name']¶
-
-
class
galaxy.model.
WorkflowInvocationOutputDatasetCollectionAssociation
[source]¶ Bases:
galaxy.util.dictifiable.Dictifiable
,galaxy.model.RepresentById
Represents links to output dataset collections for the workflow.
-
dict_collection_visible_keys
= ['id', 'workflow_invocation_id', 'workflow_step_id', 'dataset_collection_id', 'name']¶
-
-
class
galaxy.model.
WorkflowInvocationStepOutputDatasetAssociation
[source]¶ Bases:
galaxy.util.dictifiable.Dictifiable
,galaxy.model.RepresentById
Represents links to output datasets for the workflow.
-
dict_collection_visible_keys
= ['id', 'workflow_invocation_step_id', 'dataset_id', 'output_name']¶
-
-
class
galaxy.model.
WorkflowInvocationStepOutputDatasetCollectionAssociation
[source]¶ Bases:
galaxy.util.dictifiable.Dictifiable
,galaxy.model.RepresentById
Represents links to output dataset collections for the workflow.
-
dict_collection_visible_keys
= ['id', 'workflow_invocation_step_id', 'dataset_collection_id', 'output_name']¶
-
-
class
galaxy.model.
MetadataFile
(dataset=None, name=None)[source]¶ Bases:
galaxy.model.StorableObject
,galaxy.model.RepresentById
-
__init__
(dataset=None, name=None)¶
-
file_name
¶
-
-
class
galaxy.model.
FormDefinition
(name=None, desc=None, fields=[], form_definition_current=None, form_type=None, layout=None)[source]¶ Bases:
galaxy.util.dictifiable.Dictifiable
,galaxy.model.RepresentById
-
supported_field_types
= [<class 'galaxy.web.form_builder.AddressField'>, <class 'galaxy.web.form_builder.CheckboxField'>, <class 'galaxy.web.form_builder.PasswordField'>, <class 'galaxy.web.form_builder.SelectField'>, <class 'galaxy.web.form_builder.TextArea'>, <class 'galaxy.web.form_builder.TextField'>, <class 'galaxy.web.form_builder.WorkflowField'>, <class 'galaxy.web.form_builder.WorkflowMappingField'>, <class 'galaxy.web.form_builder.HistoryField'>]¶
-
types
= <galaxy.util.bunch.Bunch object>¶
-
dict_collection_visible_keys
= ['id', 'name']¶
-
dict_element_visible_keys
= ['id', 'name', 'desc', 'form_definition_current_id', 'fields', 'layout']¶
-
__init__
(name=None, desc=None, fields=[], form_definition_current=None, form_type=None, layout=None)¶
-
-
class
galaxy.model.
FormDefinitionCurrent
(form_definition=None)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(form_definition=None)¶
-
-
class
galaxy.model.
FormValues
(form_def=None, content=None)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(form_def=None, content=None)¶
-
-
class
galaxy.model.
UserAddress
(user=None, desc=None, name=None, institution=None, address=None, city=None, state=None, postal_code=None, country=None, phone=None)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(user=None, desc=None, name=None, institution=None, address=None, city=None, state=None, postal_code=None, country=None, phone=None)¶
-
-
class
galaxy.model.
UserOpenID
(user=None, session=None, openid=None)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(user=None, session=None, openid=None)¶
-
-
class
galaxy.model.
PSAAssociation
(server_url=None, handle=None, secret=None, issued=None, lifetime=None, assoc_type=None)[source]¶ Bases:
social_core.storage.AssociationMixin
,galaxy.model.RepresentById
-
sa_session
= None¶
-
__init__
(server_url=None, handle=None, secret=None, issued=None, lifetime=None, assoc_type=None)¶
-
-
class
galaxy.model.
PSACode
(email, code)[source]¶ Bases:
social_core.storage.CodeMixin
,galaxy.model.RepresentById
-
sa_session
= None¶
-
__init__
(email, code)¶
-
-
class
galaxy.model.
PSANonce
(server_url, timestamp, salt)[source]¶ Bases:
social_core.storage.NonceMixin
,galaxy.model.RepresentById
-
sa_session
= None¶
-
__init__
(server_url, timestamp, salt)¶
-
-
class
galaxy.model.
PSAPartial
(token, data, next_step, backend)[source]¶ Bases:
social_core.storage.PartialMixin
,galaxy.model.RepresentById
-
sa_session
= None¶
-
__init__
(token, data, next_step, backend)¶
-
-
class
galaxy.model.
UserAuthnzToken
(provider, uid, extra_data=None, lifetime=None, assoc_type=None, user=None)[source]¶ Bases:
social_core.storage.UserMixin
,galaxy.model.RepresentById
-
sa_session
= None¶
-
__init__
(provider, uid, extra_data=None, lifetime=None, assoc_type=None, user=None)¶
-
-
class
galaxy.model.
CloudAuthz
(user_id, provider, config, authn_id, description='')[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(user_id, provider, config, authn_id, description='')¶
-
-
class
galaxy.model.
Page
[source]¶ Bases:
galaxy.util.dictifiable.Dictifiable
,galaxy.model.RepresentById
-
dict_element_visible_keys
= ['id', 'title', 'latest_revision_id', 'slug', 'published', 'importable', 'deleted']¶
-
__init__
()¶
-
-
class
galaxy.model.
PageRevision
[source]¶ Bases:
galaxy.util.dictifiable.Dictifiable
,galaxy.model.RepresentById
-
dict_element_visible_keys
= ['id', 'page_id', 'title', 'content']¶
-
__init__
()¶
-
Bases:
galaxy.model.RepresentById
-
class
galaxy.model.
Visualization
(id=None, user=None, type=None, title=None, dbkey=None, slug=None, latest_revision=None)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(id=None, user=None, type=None, title=None, dbkey=None, slug=None, latest_revision=None)¶
-
-
class
galaxy.model.
VisualizationRevision
(visualization=None, title=None, dbkey=None, config=None)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(visualization=None, title=None, dbkey=None, config=None)¶
-
Bases:
galaxy.model.RepresentById
-
class
galaxy.model.
TransferJob
(state=None, path=None, info=None, pid=None, socket=None, params=None)[source]¶ Bases:
galaxy.model.RepresentById
-
states
= <galaxy.util.bunch.Bunch object>¶
-
terminal_states
= ['error', 'done']¶
-
__init__
(state=None, path=None, info=None, pid=None, socket=None, params=None)¶
-
-
class
galaxy.model.
Tag
(id=None, type=None, parent_id=None, name=None)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(id=None, type=None, parent_id=None, name=None)¶
-
-
class
galaxy.model.
ItemTagAssociation
(id=None, user=None, item_id=None, tag_id=None, user_tname=None, value=None)[source]¶ Bases:
galaxy.util.dictifiable.Dictifiable
-
dict_collection_visible_keys
= ['id', 'user_tname', 'user_value']¶
-
dict_element_visible_keys
= ['id', 'user_tname', 'user_value']¶
-
-
class
galaxy.model.
HistoryTagAssociation
(id=None, user=None, item_id=None, tag_id=None, user_tname=None, value=None)[source]¶ Bases:
galaxy.model.ItemTagAssociation
,galaxy.model.RepresentById
-
class
galaxy.model.
DatasetTagAssociation
(id=None, user=None, item_id=None, tag_id=None, user_tname=None, value=None)[source]¶ Bases:
galaxy.model.ItemTagAssociation
,galaxy.model.RepresentById
-
class
galaxy.model.
HistoryDatasetAssociationTagAssociation
(id=None, user=None, item_id=None, tag_id=None, user_tname=None, value=None)[source]¶ Bases:
galaxy.model.ItemTagAssociation
,galaxy.model.RepresentById
-
class
galaxy.model.
LibraryDatasetDatasetAssociationTagAssociation
(id=None, user=None, item_id=None, tag_id=None, user_tname=None, value=None)[source]¶ Bases:
galaxy.model.ItemTagAssociation
,galaxy.model.RepresentById
-
class
galaxy.model.
PageTagAssociation
(id=None, user=None, item_id=None, tag_id=None, user_tname=None, value=None)[source]¶ Bases:
galaxy.model.ItemTagAssociation
,galaxy.model.RepresentById
-
class
galaxy.model.
WorkflowStepTagAssociation
(id=None, user=None, item_id=None, tag_id=None, user_tname=None, value=None)[source]¶ Bases:
galaxy.model.ItemTagAssociation
,galaxy.model.RepresentById
-
class
galaxy.model.
StoredWorkflowTagAssociation
(id=None, user=None, item_id=None, tag_id=None, user_tname=None, value=None)[source]¶ Bases:
galaxy.model.ItemTagAssociation
,galaxy.model.RepresentById
-
class
galaxy.model.
VisualizationTagAssociation
(id=None, user=None, item_id=None, tag_id=None, user_tname=None, value=None)[source]¶ Bases:
galaxy.model.ItemTagAssociation
,galaxy.model.RepresentById
-
class
galaxy.model.
HistoryDatasetCollectionTagAssociation
(id=None, user=None, item_id=None, tag_id=None, user_tname=None, value=None)[source]¶ Bases:
galaxy.model.ItemTagAssociation
,galaxy.model.RepresentById
-
class
galaxy.model.
LibraryDatasetCollectionTagAssociation
(id=None, user=None, item_id=None, tag_id=None, user_tname=None, value=None)[source]¶ Bases:
galaxy.model.ItemTagAssociation
,galaxy.model.RepresentById
-
class
galaxy.model.
ToolTagAssociation
(id=None, user=None, tool_id=None, tag_id=None, user_tname=None, value=None)[source]¶ Bases:
galaxy.model.ItemTagAssociation
,galaxy.model.RepresentById
-
__init__
(id=None, user=None, tool_id=None, tag_id=None, user_tname=None, value=None)¶
-
-
class
galaxy.model.
HistoryAnnotationAssociation
[source]¶ Bases:
galaxy.model.RepresentById
-
class
galaxy.model.
HistoryDatasetAssociationAnnotationAssociation
[source]¶ Bases:
galaxy.model.RepresentById
-
class
galaxy.model.
StoredWorkflowAnnotationAssociation
[source]¶ Bases:
galaxy.model.RepresentById
-
class
galaxy.model.
WorkflowStepAnnotationAssociation
[source]¶ Bases:
galaxy.model.RepresentById
-
class
galaxy.model.
PageAnnotationAssociation
[source]¶ Bases:
galaxy.model.RepresentById
-
class
galaxy.model.
VisualizationAnnotationAssociation
[source]¶ Bases:
galaxy.model.RepresentById
-
class
galaxy.model.
HistoryDatasetCollectionAssociationAnnotationAssociation
[source]¶ Bases:
galaxy.model.RepresentById
-
class
galaxy.model.
LibraryDatasetCollectionAnnotationAssociation
[source]¶ Bases:
galaxy.model.RepresentById
-
class
galaxy.model.
ItemRatingAssociation
(id=None, user=None, item=None, rating=0)[source]¶ Bases:
object
-
class
galaxy.model.
HistoryRatingAssociation
(id=None, user=None, item=None, rating=0)[source]¶ Bases:
galaxy.model.ItemRatingAssociation
,galaxy.model.RepresentById
-
class
galaxy.model.
HistoryDatasetAssociationRatingAssociation
(id=None, user=None, item=None, rating=0)[source]¶ Bases:
galaxy.model.ItemRatingAssociation
,galaxy.model.RepresentById
-
class
galaxy.model.
StoredWorkflowRatingAssociation
(id=None, user=None, item=None, rating=0)[source]¶ Bases:
galaxy.model.ItemRatingAssociation
,galaxy.model.RepresentById
-
class
galaxy.model.
PageRatingAssociation
(id=None, user=None, item=None, rating=0)[source]¶ Bases:
galaxy.model.ItemRatingAssociation
,galaxy.model.RepresentById
-
class
galaxy.model.
VisualizationRatingAssociation
(id=None, user=None, item=None, rating=0)[source]¶ Bases:
galaxy.model.ItemRatingAssociation
,galaxy.model.RepresentById
-
class
galaxy.model.
HistoryDatasetCollectionRatingAssociation
(id=None, user=None, item=None, rating=0)[source]¶ Bases:
galaxy.model.ItemRatingAssociation
,galaxy.model.RepresentById
-
class
galaxy.model.
LibraryDatasetCollectionRatingAssociation
(id=None, user=None, item=None, rating=0)[source]¶ Bases:
galaxy.model.ItemRatingAssociation
,galaxy.model.RepresentById
-
class
galaxy.model.
DataManagerHistoryAssociation
(id=None, history=None, user=None)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(id=None, history=None, user=None)¶
-
-
class
galaxy.model.
DataManagerJobAssociation
(id=None, job=None, data_manager_id=None)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(id=None, job=None, data_manager_id=None)¶
-
-
class
galaxy.model.
UserPreference
(name=None, value=None)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(name=None, value=None)¶
-
-
class
galaxy.model.
UserAction
(id=None, create_time=None, user_id=None, session_id=None, action=None, params=None, context=None)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(id=None, create_time=None, user_id=None, session_id=None, action=None, params=None, context=None)¶
-
-
class
galaxy.model.
APIKeys
(id=None, user_id=None, key=None)[source]¶ Bases:
galaxy.model.RepresentById
-
__init__
(id=None, user_id=None, key=None)¶
-
Subpackages¶
Submodules¶
galaxy.model.base module¶
Shared model and mapping code between Galaxy and Tool Shed, trying to generalize to generic database connections.
-
class
galaxy.model.base.
ModelMapping
(model_modules, engine)[source]¶ Bases:
galaxy.util.bunch.Bunch
-
Session
¶ For backward compat., deprecated.
-
galaxy.model.custom_types module¶
-
class
galaxy.model.custom_types.
SafeJsonEncoder
(skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, encoding='utf-8', default=None)[source]¶ Bases:
json.encoder.JSONEncoder
-
class
galaxy.model.custom_types.
GalaxyLargeBinary
(length=None)[source]¶ Bases:
sqlalchemy.sql.sqltypes.LargeBinary
-
class
galaxy.model.custom_types.
JSONType
(*args, **kwargs)[source]¶ Bases:
sqlalchemy.sql.type_api.TypeDecorator
Represents an immutable structure as a json-encoded string.
If default is, for example, a dict, then a NULL value in the database will be exposed as an empty dict.
-
impl
¶ alias of
GalaxyLargeBinary
-
-
class
galaxy.model.custom_types.
MutationObj
[source]¶ Bases:
sqlalchemy.ext.mutable.Mutable
Mutable JSONType for SQLAlchemy from original gist: https://gist.github.com/dbarnett/1730610
Using minor changes from this fork of the gist: https://gist.github.com/miracle2k/52a031cced285ba9b8cd
And other minor changes to make it work for us.
-
class
galaxy.model.custom_types.
MutationList
[source]¶ Bases:
galaxy.model.custom_types.MutationObj
,list
-
galaxy.model.custom_types.
total_size
(o, handlers={}, verbose=False)[source]¶ Returns the approximate memory footprint an object and all of its contents.
Automatically finds the contents of the following builtin containers and their subclasses: tuple, list, deque, dict, set and frozenset. To search other containers, add handlers to iterate over their contents:
- handlers = {SomeContainerClass: iter,
- OtherContainerClass: OtherContainerClass.get_elements}
Recipe from: https://code.activestate.com/recipes/577504-compute-memory-footprint-of-an-object-and-its-cont/
-
class
galaxy.model.custom_types.
MetadataType
(*args, **kwargs)[source]¶ Bases:
galaxy.model.custom_types.JSONType
Backward compatible metadata type. Can read pickles or JSON, but always writes in JSON.
-
class
galaxy.model.custom_types.
UUIDType
(*args, **kwargs)[source]¶ Bases:
sqlalchemy.sql.type_api.TypeDecorator
Platform-independent UUID type.
Based on http://docs.sqlalchemy.org/en/rel_0_8/core/types.html#backend-agnostic-guid-type Changed to remove sqlalchemy 0.8 specific code
CHAR(32), storing as stringified hex values.
-
impl
¶ alias of
sqlalchemy.sql.sqltypes.CHAR
-
galaxy.model.item_attrs module¶
-
exception
galaxy.model.item_attrs.
RuntimeException
[source]¶ Bases:
exceptions.Exception
-
class
galaxy.model.item_attrs.
UsesItemRatings
[source]¶ Bases:
object
Mixin for getting and setting item ratings.
Class makes two assumptions: (1) item-rating association table is named <item_class>RatingAssocation (2) item-rating association table has a column with a foreign key referencing item table that contains the item’s id.
-
get_ave_item_rating_data
(db_session, item, webapp_model=None)[source]¶ Returns the average rating for an item.
-
-
class
galaxy.model.item_attrs.
UsesAnnotations
[source]¶ Bases:
object
Mixin for getting and setting item annotations.
-
get_item_annotation_str
(db_session, user, item)[source]¶ Returns a user’s annotation string for an item.
-
get_item_annotation_obj
(db_session, user, item)[source]¶ Returns a user’s annotation object for an item.
-
galaxy.model.mapping module¶
Details of how the data model objects are mapped onto the relational database are encapsulated here.
-
galaxy.model.mapping.
db_next_hid
(self)[source]¶ Override __next_hid to generate from the database in a concurrency safe way. Loads the next history ID from the DB and returns it. It also saves the future next_id into the DB.
Return type: int Returns: the next history id
-
galaxy.model.mapping.
init
(file_path, url, engine_options=None, create_tables=False, map_install_models=False, database_query_profiling_proxy=False, object_store=None, trace_logger=None, use_pbkdf2=True, slow_query_log_threshold=0, thread_local_log=None)[source]¶ Connect mappings to the database
-
galaxy.model.mapping.
now
()¶ Return a new datetime representing UTC day and time.
galaxy.model.metadata module¶
Galaxy Metadata
-
class
galaxy.model.metadata.
Statement
(target)[source]¶ Bases:
object
This class inserts its target into a list in the surrounding class. the data.Data class has a metaclass which executes these statements. This is how we shove the metadata element spec into the class.
-
class
galaxy.model.metadata.
MetadataCollection
(parent)[source]¶ Bases:
object
MetadataCollection is not a collection at all, but rather a proxy to the real metadata which is stored as a Dictionary. This class handles processing the metadata elements when they are set and retrieved, returning default values in cases when metadata is not set.
-
parent
¶
-
spec
¶
-
requires_dataset_id
¶
-
-
class
galaxy.model.metadata.
MetadataSpecCollection
(dict=None)[source]¶ Bases:
galaxy.util.odict.odict
A simple extension of dict which allows cleaner access to items and allows the values to be iterated over directly as if it were a list. append() is also implemented for simplicity and does not “append”.
-
class
galaxy.model.metadata.
MetadataParameter
(spec)[source]¶ Bases:
object
-
classmethod
marshal
(value)[source]¶ This method should/can be overridden to convert the incoming value to whatever type it is supposed to be.
-
classmethod
-
class
galaxy.model.metadata.
MetadataElementSpec
(datatype, name=None, desc=None, param=<class 'galaxy.model.metadata.MetadataParameter'>, default=None, no_value=None, visible=True, set_in_upload=False, **kwargs)[source]¶ Bases:
object
Defines a metadata element and adds it to the metadata_spec (which is a MetadataSpecCollection) of datatype.
-
galaxy.model.metadata.
MetadataElement
= <galaxy.model.metadata.Statement object>¶ MetadataParameter sub-classes.
-
class
galaxy.model.metadata.
FileParameter
(spec)[source]¶ Bases:
galaxy.model.metadata.MetadataParameter
-
from_external_value
(value, parent, path_rewriter=None)[source]¶ Turns a value read from a external dict into its value to be pushed directly into the metadata dict.
-
-
class
galaxy.model.metadata.
MetadataTempFile
(**kwds)[source]¶ Bases:
object
-
tmp_dir
= 'database/tmp'¶
-
file_name
¶
-
-
class
galaxy.model.metadata.
JobExternalOutputMetadataWrapper
(job)[source]¶ Bases:
object
Class with methods allowing set_meta() to be called externally to the Galaxy head. This class allows access to external metadata filenames for all outputs associated with a job. We will use JSON as the medium of exchange of information, except for the DatasetInstance object which will use pickle (in the future this could be JSONified as well)
galaxy.model.search module¶
The GQL (Galaxy Query Language) search engine parsers a simple ‘SQL-Like’ query syntax to obtain items from the Galaxy installations. Rather then allow/force the user to do queries on the Galaxy schema, it uses a small set of ‘Views’ which are simple table representations of complex galaxy ideas. So while a history and its tags may exist in seperate tables in the real schema, in GQL they exist in the same view
Example Queries:
select name, id, file_size from hda
select name from hda
select name, model_class from ldda
select * from history
select * from workflow
select id, name from history where name=’Unnamed history’
select * from history where name=’Unnamed history’
-
class
galaxy.model.search.
ViewField
(name, sqlalchemy_field=None, handler=None, post_filter=None, id_decode=False)[source]¶ Bases:
object
A ViewField defines a field in a view that filter operations can be applied to These filter operations are either handled with standard sqlalchemy filter calls, or passed to specialized handlers (such as when a table join would be needed to do the filtering)
Parameters:
- sqlalchemy_field - Simple filtering using existing table columns, the argument is an sqlalchemy column
- that the right hand value will be compared against
- handler - Requires more specialized code to do filtering, usually requires a table join in order to
- process the conditional
- post_filter - Unable to do simple sqlalchemy based table filtering, filter is applied to loaded object
- Thus methods avalible to the object can be used for filtering. example: a library folder must climb its chain of parents to find out which library it belongs to
-
class
galaxy.model.search.
ViewQueryBaseClass
[source]¶ Bases:
object
-
FIELDS
= {}¶
-
VIEW_NAME
= 'undefined'¶
-
-
class
galaxy.model.search.
LibraryDatasetDatasetView
[source]¶ Bases:
galaxy.model.search.ViewQueryBaseClass
-
VIEW_NAME
= 'library_dataset_dataset'¶
-
FIELDS
= {'data_type': <galaxy.model.search.ViewField object at 0x7fe8f7805890>, 'deleted': <galaxy.model.search.ViewField object at 0x7fe8f7805810>, 'extended_metadata': <galaxy.model.search.ViewField object at 0x7fe8f785fcd0>, 'id': <galaxy.model.search.ViewField object at 0x7fe8f78057d0>, 'name': <galaxy.model.search.ViewField object at 0x7fe8f7805790>, 'parent_library_id': <galaxy.model.search.ViewField object at 0x7fe8f7805850>}¶
-
-
class
galaxy.model.search.
LibraryView
[source]¶ Bases:
galaxy.model.search.ViewQueryBaseClass
-
VIEW_NAME
= 'library'¶
-
FIELDS
= {'deleted': <galaxy.model.search.ViewField object at 0x7fe8f7805990>, 'id': <galaxy.model.search.ViewField object at 0x7fe8f7805950>, 'name': <galaxy.model.search.ViewField object at 0x7fe8f7805910>}¶
-
-
class
galaxy.model.search.
LibraryFolderView
[source]¶ Bases:
galaxy.model.search.ViewQueryBaseClass
-
VIEW_NAME
= 'library_folder'¶
-
FIELDS
= {'id': <galaxy.model.search.ViewField object at 0x7fe8f7805a50>, 'library_path': <galaxy.model.search.ViewField object at 0x7fe8f7805b10>, 'name': <galaxy.model.search.ViewField object at 0x7fe8f7805a10>, 'parent_id': <galaxy.model.search.ViewField object at 0x7fe8f7805a90>, 'parent_library_id': <galaxy.model.search.ViewField object at 0x7fe8f7805ad0>}¶
-
-
class
galaxy.model.search.
LibraryDatasetView
[source]¶ Bases:
galaxy.model.search.ViewQueryBaseClass
-
VIEW_NAME
= 'library_dataset'¶
-
FIELDS
= {'folder_id': <galaxy.model.search.ViewField object at 0x7fe8f7805c10>, 'id': <galaxy.model.search.ViewField object at 0x7fe8f7805bd0>, 'name': <galaxy.model.search.ViewField object at 0x7fe8f7805b90>}¶
-
-
class
galaxy.model.search.
ToolView
[source]¶ Bases:
galaxy.model.search.ViewQueryBaseClass
-
VIEW_NAME
= 'tool'¶
-
FIELDS
= {'id': <galaxy.model.search.ViewField object at 0x7fe8f7805cd0>, 'tool_id': <galaxy.model.search.ViewField object at 0x7fe8f7805c90>}¶
-
-
class
galaxy.model.search.
HistoryDatasetView
[source]¶ Bases:
galaxy.model.search.ViewQueryBaseClass
-
DOMAIN
= 'history_dataset'¶
-
FIELDS
= {'copied_from_hda_id': <galaxy.model.search.ViewField object at 0x7fe8f7805e90>, 'copied_from_ldda_id': <galaxy.model.search.ViewField object at 0x7fe8f7805e50>, 'deleted': <galaxy.model.search.ViewField object at 0x7fe8f7805ed0>, 'extended_metadata': <galaxy.model.search.ViewField object at 0x7fe8f7805f10>, 'history_id': <galaxy.model.search.ViewField object at 0x7fe8f7805dd0>, 'id': <galaxy.model.search.ViewField object at 0x7fe8f7805d90>, 'name': <galaxy.model.search.ViewField object at 0x7fe8f7805d50>, 'tag': <galaxy.model.search.ViewField object at 0x7fe8f7805e10>}¶
-
-
class
galaxy.model.search.
HistoryView
[source]¶ Bases:
galaxy.model.search.ViewQueryBaseClass
-
DOMAIN
= 'history'¶
-
FIELDS
= {'annotation': <galaxy.model.search.ViewField object at 0x7fe8f77ef090>, 'deleted': <galaxy.model.search.ViewField object at 0x7fe8f77ef0d0>, 'id': <galaxy.model.search.ViewField object at 0x7fe8f7805fd0>, 'name': <galaxy.model.search.ViewField object at 0x7fe8f7805f90>, 'tag': <galaxy.model.search.ViewField object at 0x7fe8f77ef050>}¶
-
-
class
galaxy.model.search.
WorkflowView
[source]¶ Bases:
galaxy.model.search.ViewQueryBaseClass
-
DOMAIN
= 'workflow'¶
-
FIELDS
= {'deleted': <galaxy.model.search.ViewField object at 0x7fe8f77ef210>, 'id': <galaxy.model.search.ViewField object at 0x7fe8f77ef190>, 'name': <galaxy.model.search.ViewField object at 0x7fe8f77ef150>, 'tag': <galaxy.model.search.ViewField object at 0x7fe8f77ef1d0>}¶
-
-
class
galaxy.model.search.
JobView
[source]¶ Bases:
galaxy.model.search.ViewQueryBaseClass
-
DOMAIN
= 'job'¶
-
FIELDS
= {'input_hda': <galaxy.model.search.ViewField object at 0x7fe8f77ef390>, 'input_ldda': <galaxy.model.search.ViewField object at 0x7fe8f77ef350>, 'output_hda': <galaxy.model.search.ViewField object at 0x7fe8f77ef3d0>, 'param': <galaxy.model.search.ViewField object at 0x7fe8f77ef310>, 'state': <galaxy.model.search.ViewField object at 0x7fe8f77ef2d0>, 'tool_name': <galaxy.model.search.ViewField object at 0x7fe8f77ef290>}¶
-
-
class
galaxy.model.search.
PageView
[source]¶ Bases:
galaxy.model.search.ViewQueryBaseClass
-
DOMAIN
= 'page'¶
-
FIELDS
= {'deleted': <galaxy.model.search.ViewField object at 0x7fe8f77ef510>, 'id': <galaxy.model.search.ViewField object at 0x7fe8f77ef450>, 'slug': <galaxy.model.search.ViewField object at 0x7fe8f77ef490>, 'title': <galaxy.model.search.ViewField object at 0x7fe8f77ef4d0>}¶
-
-
class
galaxy.model.search.
PageRevisionView
[source]¶ Bases:
galaxy.model.search.ViewQueryBaseClass
-
DOMAIN
= 'page_revision'¶
-
FIELDS
= {'id': <galaxy.model.search.ViewField object at 0x7fe8f77ef550>, 'page_id': <galaxy.model.search.ViewField object at 0x7fe8f77ef5d0>, 'title': <galaxy.model.search.ViewField object at 0x7fe8f77ef590>}¶
-
-
class
galaxy.model.search.
GalaxyQuery
(field_list, table_name, conditional)[source]¶ Bases:
object
This class represents a data structure of a compiled GQL query
-
class
galaxy.model.search.
GalaxyQueryComparison
(left, operator, right)[source]¶ Bases:
object
This class represents the data structure of the comparison arguments of a compiled GQL query (ie where name=’Untitled History’)
-
class
galaxy.model.search.
GalaxyQueryAnd
(left, right)[source]¶ Bases:
object
This class represents the data structure of the comparison arguments of a compiled GQL query (ie where name=’Untitled History’)
-
exception
galaxy.model.search.
GalaxyParseError
[source]¶ Bases:
exceptions.Exception
galaxy.model.util module¶
Utility helpers related to the model