예제 #1
0
 def __init__(self, app):
     self.app = app
     self.sa_session = app.model.context
     self.hda_manager = HDAManager(app)
     self.dataset_collection_manager = DatasetCollectionManager(app)
     self.ldda_manager = LDDAManager(app)
     self.decode_id = self.app.security.decode_id
예제 #2
0
파일: tasks.py 프로젝트: msauria/galaxy
def set_metadata(hda_manager: HDAManager,
                 ldda_manager: LDDAManager,
                 dataset_id,
                 model_class='HistoryDatasetAssociation'):
    if model_class == 'HistoryDatasetAssociation':
        dataset = hda_manager.by_id(dataset_id)
    elif model_class == 'LibraryDatasetDatasetAssociation':
        dataset = ldda_manager.by_id(dataset_id)
    dataset.datatype.set_meta(dataset)