commit/galaxy-central: jgoecks: Custom build bug fix to indicate availability of reference data during conversion. Parameter cleanup via Pylint as well.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/005ee724a360/ Changeset: 005ee724a360 User: jgoecks Date: 2013-04-09 22:48:08 Summary: Custom build bug fix to indicate availability of reference data during conversion. Parameter cleanup via Pylint as well. Affected #: 1 file diff -r 67a58714a972729eb27f08975646204e83753042 -r 005ee724a360d56e6b243852ce70c27c3804ef6b lib/galaxy/visualization/genomes.py --- a/lib/galaxy/visualization/genomes.py +++ b/lib/galaxy/visualization/genomes.py @@ -242,12 +242,16 @@ if dbkey in user_keys: dbkey_attributes = user_keys[ dbkey ] dbkey_name = dbkey_attributes[ 'name' ] + + # If there's a fasta for genome, convert to 2bit for later use. if 'fasta' in dbkey_attributes: build_fasta = trans.sa_session.query( trans.app.model.HistoryDatasetAssociation ).get( dbkey_attributes[ 'fasta' ] ) len_file = build_fasta.get_converted_dataset( trans, 'len' ).file_name - converted_dataset = build_fasta.get_converted_dataset( trans, 'twobit' ) - if converted_dataset: - twobit_file = converted_dataset.file_name + build_fasta.get_converted_dataset( trans, 'twobit' ) + # HACK: set twobit_file to True rather than a file name because + # get_converted_dataset returns null during conversion even though + # there will eventually be a twobit file available for genome. + twobit_file = True # Backwards compatibility: look for len file directly. elif 'len' in dbkey_attributes: len_file = trans.sa_session.query( trans.app.model.HistoryDatasetAssociation ).get( user_keys[ dbkey ][ 'len' ] ).file_name @@ -275,7 +279,7 @@ return rval - def has_reference_data( self, trans, dbkey, dbkey_owner=None ): + def has_reference_data( self, dbkey, dbkey_owner=None ): """ Returns true if there is reference data for the specified dbkey. If dbkey is custom, dbkey_owner is needed to determine if there is reference data. @@ -308,7 +312,7 @@ else: dbkey_user = trans.user - if not self.has_reference_data( trans, dbkey, dbkey_user ): + if not self.has_reference_data( dbkey, dbkey_user ): return None # 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)
-
commits-noreply@bitbucket.org