commit/galaxy-central: jgoecks: Provide chromInfo correctly during conversions of datasets with custom build dbkeys.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/2ee4a6b8419b/ changeset: 2ee4a6b8419b user: jgoecks date: 2011-11-30 19:06:12 summary: Provide chromInfo correctly during conversions of datasets with custom build dbkeys. affected #: 1 file diff -r 665853dfd9e12e137f26777d1a2d2167df4b4275 -r 2ee4a6b8419b3da2b95e1600a92099fe547cd070 lib/galaxy/tools/actions/__init__.py --- a/lib/galaxy/tools/actions/__init__.py +++ b/lib/galaxy/tools/actions/__init__.py @@ -191,7 +191,16 @@ db_datasets[ "chromInfo" ] = db_dataset incoming[ "chromInfo" ] = db_dataset.file_name else: - incoming[ "chromInfo" ] = os.path.join( trans.app.config.tool_data_path, 'shared','ucsc','chrom', "%s.len" % input_dbkey ) + # For custom builds, chrom info resides in converted dataset; for built-in builds, chrom info resides in tool-data/shared. + if trans.user 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: + # 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 inp_data.update( db_datasets ) # Determine output dataset permission/roles list 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