commit/galaxy-central: jgoecks: Fix bugs that prevented creating a Circster visualization from a dataset.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/8d7d70348e52/ changeset: 8d7d70348e52 user: jgoecks date: 2013-01-04 04:07:55 summary: Fix bugs that prevented creating a Circster visualization from a dataset. affected #: 1 file diff -r d7475647cbb6a1c70218049fadc24ed1651d845a -r 8d7d70348e526c64168392501922aa56f45d0a84 lib/galaxy/webapps/galaxy/controllers/visualization.py --- a/lib/galaxy/webapps/galaxy/controllers/visualization.py +++ b/lib/galaxy/webapps/galaxy/controllers/visualization.py @@ -725,12 +725,25 @@ Display a circster visualization. """ + # Get dataset to add. + if dataset_id: + dataset = self.get_hda_or_ldda( trans, hda_ldda, dataset_id ) + # Get/create vis. if id: # Display existing viz. vis = self.get_visualization( trans, id, check_ownership=False, check_accessible=True ) else: # Create new viz. + if not dbkey: + # If dbkey not specified, use dataset's dbkey. + dbkey = dataset.dbkey + if not dbkey or dbkey == '?': + # Circster requires a valid dbkey. + return trans.show_error_message( "You must set the dataset's dbkey to view it. You can set " + "a dataset's dbkey by clicking on the pencil icon and editing " + "its attributes.", use_panels=True ) + vis = self.create_visualization( trans, type="genome", dbkey=dbkey, save=False ) # Get the vis config and work with it from here on out. Working with the @@ -739,12 +752,10 @@ viz_config = self.get_visualization_config( trans, vis ) # Add dataset if specified. - if dataset_id: - dataset = self.get_hda_or_ldda( trans, hda_ldda, dataset_id ) + if dataset: viz_config[ 'tracks' ].append( self.get_new_track_config( trans, dataset ) ) # Get genome info. - dbkey = viz_config[ 'dbkey' ] chroms_info = self.app.genomes.chroms( trans, dbkey=dbkey ) genome = { 'dbkey': dbkey, 'chroms_info': chroms_info } Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket