commit/galaxy-central: jgoecks: When fetching BAM data for Trackster, use BAI from metadata when possible rather than waiting for converted dataset with duplicate BAI.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/12ecc1ea2821/ changeset: 12ecc1ea2821 user: jgoecks date: 2011-11-17 15:12:19 summary: When fetching BAM data for Trackster, use BAI from metadata when possible rather than waiting for converted dataset with duplicate BAI. affected #: 1 file diff -r 486196344e13fcf1d6826ce714bf05cca4e6f6a7 -r 12ecc1ea2821255e81e4fb6de402108e4f30e0ed lib/galaxy/web/controllers/tracks.py --- a/lib/galaxy/web/controllers/tracks.py +++ b/lib/galaxy/web/controllers/tracks.py @@ -607,8 +607,16 @@ else: tracks_dataset_type = data_sources['data']['name'] data_provider_class = get_data_provider( name=tracks_dataset_type, original_dataset=dataset ) - converted_dataset = dataset.get_converted_dataset( trans, tracks_dataset_type ) - deps = dataset.get_converted_dataset_deps( trans, tracks_dataset_type ) + # HACK: Use bai from bam HDA's metadata if available. This saves + # the client from waiting a long time to generate a duplicate + # bam via a converted dataset. + if dataset.ext == "bam" and dataset.metadata.get( "bam_index", None ) is not None: + converted_dataset = dataset.metadata.bam_index + deps = None + else: + # Default behavior. + converted_dataset = dataset.get_converted_dataset( trans, tracks_dataset_type ) + deps = dataset.get_converted_dataset_deps( trans, tracks_dataset_type ) data_provider = data_provider_class( converted_dataset=converted_dataset, original_dataset=dataset, dependencies=deps ) # Get and return data from data_provider. 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