mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #3149 from guerler/fix_hid
Explicitly specify attributes which should be copied to converted datasets
This commit is contained in:
@@ -2081,8 +2081,8 @@ class DatasetInstance( object ):
|
||||
except KeyError:
|
||||
pass # No deps
|
||||
new_dataset = next(iter(self.datatype.convert_dataset( trans, self, target_ext, return_output=True, visible=False, deps=deps, set_output_history=True, target_context=target_context ).values()))
|
||||
new_dataset.hid = self.hid
|
||||
new_dataset.name = self.name
|
||||
self.copy_attributes( new_dataset )
|
||||
assoc = ImplicitlyConvertedDatasetAssociation( parent=self, file_type=target_ext, dataset=new_dataset, metadata_safe=False )
|
||||
session = trans.sa_session
|
||||
session.add( new_dataset )
|
||||
@@ -2090,6 +2090,12 @@ class DatasetInstance( object ):
|
||||
session.flush()
|
||||
return new_dataset
|
||||
|
||||
def copy_attributes( self, new_dataset ):
|
||||
"""
|
||||
Copies attributes to a new datasets, used for implicit conversions
|
||||
"""
|
||||
pass
|
||||
|
||||
def get_metadata_dataset( self, dataset_ext ):
|
||||
"""
|
||||
Returns an HDA that points to a metadata file which contains a
|
||||
@@ -2342,6 +2348,9 @@ class HistoryDatasetAssociation( DatasetInstance, Dictifiable, UsesAnnotations,
|
||||
object_session( self ).flush()
|
||||
return hda
|
||||
|
||||
def copy_attributes( self, new_dataset ):
|
||||
new_dataset.hid = self.hid
|
||||
|
||||
def to_library_dataset_dataset_association( self, trans, target_folder,
|
||||
replace_dataset=None, parent_id=None, user=None, roles=None, ldda_message='' ):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user