commit/galaxy-central: jgoecks: Fix bug: when setting chromInfo, do not assume a fasta file exists.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/a8eca62cd530/ changeset: a8eca62cd530 user: jgoecks date: 2012-02-01 20:00:21 summary: Fix bug: when setting chromInfo, do not assume a fasta file exists. affected #: 1 file diff -r 7d97c594b1639bc16aba60ae8a0bf9a2798dbde8 -r a8eca62cd5304509a67e598d54d5203411aeb3df lib/galaxy/tools/actions/__init__.py --- a/lib/galaxy/tools/actions/__init__.py +++ b/lib/galaxy/tools/actions/__init__.py @@ -193,12 +193,15 @@ incoming[ "chromInfo" ] = db_dataset.file_name else: # For custom builds, chrom info resides in converted dataset; for built-in builds, chrom info resides in tool-data/shared. + chrom_info = None if trans.user and ( 'dbkeys' in trans.user.preferences ) and ( input_dbkey in trans.user.preferences[ 'dbkeys' ] ): # Custom build. custom_build_dict = from_json_string( trans.user.preferences[ 'dbkeys' ] )[ input_dbkey ] - build_fasta_dataset = trans.app.model.HistoryDatasetAssociation.get( custom_build_dict[ 'fasta' ] ) - chrom_info = build_fasta_dataset.get_converted_dataset( trans, 'len' ).file_name - else: + if 'fasta' in custom_build_dict: + build_fasta_dataset = trans.app.model.HistoryDatasetAssociation.get( custom_build_dict[ 'fasta' ] ) + chrom_info = build_fasta_dataset.get_converted_dataset( trans, 'len' ).file_name + + if not chrom_info: # Default to built-in build. chrom_info = os.path.join( trans.app.config.tool_data_path, 'shared','ucsc','chrom', "%s.len" % input_dbkey ) incoming[ "chromInfo" ] = chrom_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