commit/galaxy-central: 3 new changesets
3 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/ef7f11e99547/ changeset: ef7f11e99547 user: james_taylor date: 2012-09-10 23:09:09 summary: circster: Allow data_standalone types to work; phyloviz: add tree datatypes to sample conf affected #: 2 files diff -r 6e79399b38d22512d8438522d26945c53f95b11a -r ef7f11e995473293a2e45f5517a627ad7177a3b1 datatypes_conf.xml.sample --- a/datatypes_conf.xml.sample +++ b/datatypes_conf.xml.sample @@ -198,6 +198,10 @@ <display file="igv/vcf.xml" /><converter file="vcf_bgzip_to_tabix_converter.xml" target_datatype="tabix"/></datatype> + <!-- Phylogenetic tree datatypes --> + <datatype extension="phyloxml" type="galaxy.datatypes.xml:Phyloxml" display_in_upload="true" /> + <datatype extension="nhx" type="galaxy.datatypes.data:Newick" display_in_upload="true" /> + <datatype extension="nex" type="galaxy.datatypes.data:Nexus" display_in_upload="true" /><!-- Start RGenetics Datatypes --><datatype extension="affybatch" type="galaxy.datatypes.genetics:Affybatch" display_in_upload="true"/><!-- eigenstrat pedigree input file --> diff -r 6e79399b38d22512d8438522d26945c53f95b11a -r ef7f11e995473293a2e45f5517a627ad7177a3b1 lib/galaxy/web/controllers/tracks.py --- a/lib/galaxy/web/controllers/tracks.py +++ b/lib/galaxy/web/controllers/tracks.py @@ -553,11 +553,14 @@ # Get dataset and indexed datatype. dataset = self.get_hda_or_ldda( trans, track[ 'hda_ldda'], track[ 'dataset_id' ] ) data_sources = self._get_datasources( trans, dataset ) - indexed_type = data_sources['index']['name'] - - # Get converted dataset and append track's genome data. - converted_dataset = dataset.get_converted_dataset( trans, indexed_type ) - data_provider = get_data_provider( indexed_type )( converted_dataset, dataset ) + if 'data_standalone' in data_sources: + indexed_type = data_sources['data_standalone']['name'] + data_provider = get_data_provider( indexed_type )( dataset ) + else: + indexed_type = data_sources['index']['name'] + # Get converted dataset and append track's genome data. + converted_dataset = dataset.get_converted_dataset( trans, indexed_type ) + data_provider = get_data_provider( indexed_type )( converted_dataset, dataset ) # HACK: pass in additional params, which are only used for summary tree data, not BBI data. track[ 'genome_wide_data' ] = { 'data': data_provider.get_genome_data( chroms_info, level=3, detail_cutoff=0, draw_cutoff=0 ) } https://bitbucket.org/galaxy/galaxy-central/changeset/c71026b3d7ac/ changeset: c71026b3d7ac user: james_taylor date: 2012-09-10 23:40:56 summary: circster: render in entire window, ensure initially entire plot fits in view and is centered affected #: 2 files diff -r ef7f11e995473293a2e45f5517a627ad7177a3b1 -r c71026b3d7ac3c01ed6ee5350962de96b6ca47dd static/scripts/viz/visualization.js --- a/static/scripts/viz/visualization.js +++ b/static/scripts/viz/visualization.js @@ -823,26 +823,27 @@ className: 'circster', initialize: function(options) { - this.width = options.width; - this.height = options.height; this.total_gap = options.total_gap; this.genome = options.genome; this.dataset_arc_height = options.dataset_arc_height; this.track_gap = 5; - - // Compute radius start based on model. - this.radius_start = this.width/2 - this.model.get('tracks').length * (this.dataset_arc_height + this.track_gap); }, render: function() { var self = this, - dataset_arc_height = this.dataset_arc_height; + dataset_arc_height = this.dataset_arc_height, + width = self.$el.width(), + height = self.$el.height(), + // Compute radius start based on model, will be centered + // and fit entirely inside element by default + init_radius_start = ( Math.min(width,height)/2 + - this.model.get('tracks').length * (this.dataset_arc_height + this.track_gap) ); // Set up SVG element. var svg = d3.select(self.$el[0]) .append("svg") - .attr("width", self.width) - .attr("height", self.height) + .attr("width", width) + .attr("height", height) .attr("pointer-events", "all") // Set up zooming, dragging. .append('svg:g') @@ -851,14 +852,14 @@ "translate(" + d3.event.translate + ")" + " scale(" + d3.event.scale + ")"); })) - .attr("transform", "translate(" + self.width / 2 + "," + self.height / 2 + ")") + .attr("transform", "translate(" + width / 2 + "," + height / 2 + ")") .append('svg:g') // -- Render each dataset in the visualization. -- this.model.get('tracks').each(function(track, index) { var dataset = track.get('genome_wide_data'), - radius_start = self.radius_start + index * (dataset_arc_height + self.track_gap), + radius_start = init_radius_start + index * (dataset_arc_height + self.track_gap), // Layout chromosome arcs. layout_class = (dataset instanceof GenomeWideBigWigData ? CircsterBigWigLayout : CircsterSummaryTreeLayout ), arcs_layout = new layout_class({ diff -r ef7f11e995473293a2e45f5517a627ad7177a3b1 -r c71026b3d7ac3c01ed6ee5350962de96b6ca47dd templates/visualization/circster.mako --- a/templates/visualization/circster.mako +++ b/templates/visualization/circster.mako @@ -69,8 +69,7 @@ var genome = new Genome(JSON.parse('${ h.to_json_string( genome ) }')) visualization = new GenomeVisualization(JSON.parse('${ h.to_json_string( viz_config ) }')), viz_view = new CircsterView({ - width: 700, - height: 700, + el: $('#vis'), // Gap is difficult to set because it very dependent on chromosome size and organization. total_gap: 2 * Math.PI * 0.1, genome: genome, @@ -81,7 +80,7 @@ // -- Render viz. -- viz_view.render(); - $('#vis').append(viz_view.$el); + }); </script></%def> https://bitbucket.org/galaxy/galaxy-central/changeset/6568368038dc/ changeset: 6568368038dc user: james_taylor date: 2012-09-10 23:41:20 summary: Automated merge with https://bitbucket.org/galaxy/galaxy-central affected #: 4 files diff -r 04cd4894e8406028c6acfd521cbcef7a396748b2 -r 6568368038dc220ce1f66d5566570f32633055d9 datatypes_conf.xml.sample --- a/datatypes_conf.xml.sample +++ b/datatypes_conf.xml.sample @@ -198,6 +198,10 @@ <display file="igv/vcf.xml" /><converter file="vcf_bgzip_to_tabix_converter.xml" target_datatype="tabix"/></datatype> + <!-- Phylogenetic tree datatypes --> + <datatype extension="phyloxml" type="galaxy.datatypes.xml:Phyloxml" display_in_upload="true" /> + <datatype extension="nhx" type="galaxy.datatypes.data:Newick" display_in_upload="true" /> + <datatype extension="nex" type="galaxy.datatypes.data:Nexus" display_in_upload="true" /><!-- Start RGenetics Datatypes --><datatype extension="affybatch" type="galaxy.datatypes.genetics:Affybatch" display_in_upload="true"/><!-- eigenstrat pedigree input file --> diff -r 04cd4894e8406028c6acfd521cbcef7a396748b2 -r 6568368038dc220ce1f66d5566570f32633055d9 lib/galaxy/web/controllers/tracks.py --- a/lib/galaxy/web/controllers/tracks.py +++ b/lib/galaxy/web/controllers/tracks.py @@ -553,11 +553,14 @@ # Get dataset and indexed datatype. dataset = self.get_hda_or_ldda( trans, track[ 'hda_ldda'], track[ 'dataset_id' ] ) data_sources = self._get_datasources( trans, dataset ) - indexed_type = data_sources['index']['name'] - - # Get converted dataset and append track's genome data. - converted_dataset = dataset.get_converted_dataset( trans, indexed_type ) - data_provider = get_data_provider( indexed_type )( converted_dataset, dataset ) + if 'data_standalone' in data_sources: + indexed_type = data_sources['data_standalone']['name'] + data_provider = get_data_provider( indexed_type )( dataset ) + else: + indexed_type = data_sources['index']['name'] + # Get converted dataset and append track's genome data. + converted_dataset = dataset.get_converted_dataset( trans, indexed_type ) + data_provider = get_data_provider( indexed_type )( converted_dataset, dataset ) # HACK: pass in additional params, which are only used for summary tree data, not BBI data. track[ 'genome_wide_data' ] = { 'data': data_provider.get_genome_data( chroms_info, level=4, detail_cutoff=0, draw_cutoff=0 ) } diff -r 04cd4894e8406028c6acfd521cbcef7a396748b2 -r 6568368038dc220ce1f66d5566570f32633055d9 static/scripts/viz/visualization.js --- a/static/scripts/viz/visualization.js +++ b/static/scripts/viz/visualization.js @@ -823,26 +823,27 @@ className: 'circster', initialize: function(options) { - this.width = options.width; - this.height = options.height; this.total_gap = options.total_gap; this.genome = options.genome; this.dataset_arc_height = options.dataset_arc_height; this.track_gap = 5; - - // Compute radius start based on model. - this.radius_start = this.width/2 - this.model.get('tracks').length * (this.dataset_arc_height + this.track_gap); }, render: function() { var self = this, - dataset_arc_height = this.dataset_arc_height; + dataset_arc_height = this.dataset_arc_height, + width = self.$el.width(), + height = self.$el.height(), + // Compute radius start based on model, will be centered + // and fit entirely inside element by default + init_radius_start = ( Math.min(width,height)/2 + - this.model.get('tracks').length * (this.dataset_arc_height + this.track_gap) ); // Set up SVG element. var svg = d3.select(self.$el[0]) .append("svg") - .attr("width", self.width) - .attr("height", self.height) + .attr("width", width) + .attr("height", height) .attr("pointer-events", "all") // Set up zooming, dragging. .append('svg:g') @@ -851,14 +852,14 @@ "translate(" + d3.event.translate + ")" + " scale(" + d3.event.scale + ")"); })) - .attr("transform", "translate(" + self.width / 2 + "," + self.height / 2 + ")") + .attr("transform", "translate(" + width / 2 + "," + height / 2 + ")") .append('svg:g') // -- Render each dataset in the visualization. -- this.model.get('tracks').each(function(track, index) { var dataset = track.get('genome_wide_data'), - radius_start = self.radius_start + index * (dataset_arc_height + self.track_gap), + radius_start = init_radius_start + index * (dataset_arc_height + self.track_gap), // Layout chromosome arcs. layout_class = (dataset instanceof GenomeWideBigWigData ? CircsterBigWigLayout : CircsterSummaryTreeLayout ), arcs_layout = new layout_class({ diff -r 04cd4894e8406028c6acfd521cbcef7a396748b2 -r 6568368038dc220ce1f66d5566570f32633055d9 templates/visualization/circster.mako --- a/templates/visualization/circster.mako +++ b/templates/visualization/circster.mako @@ -69,8 +69,7 @@ var genome = new Genome(JSON.parse('${ h.to_json_string( genome ) }')) visualization = new GenomeVisualization(JSON.parse('${ h.to_json_string( viz_config ) }')), viz_view = new CircsterView({ - width: 700, - height: 700, + el: $('#vis'), // Gap is difficult to set because it very dependent on chromosome size and organization. total_gap: 2 * Math.PI * 0.1, genome: genome, @@ -81,7 +80,7 @@ // -- Render viz. -- viz_view.render(); - $('#vis').append(viz_view.$el); + }); </script></%def> 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