lists.galaxyproject.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
List overview
Download
galaxy-commits
May 2014
----- 2024 -----
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
galaxy-commits@lists.galaxyproject.org
1 participants
242 discussions
Start a n
N
ew thread
commit/galaxy-central: guerler: Charts: Heatmaps revised plugin code, now modularized and enabled for variable data
by commits-noreply@bitbucket.org
01 May '14
01 May '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/f6561aae5484/
Changeset: f6561aae5484 User: guerler Date: 2014-05-01 21:25:06 Summary: Charts: Heatmaps revised plugin code, now modularized and enabled for variable data Affected #: 3 files diff -r 5f89fecb2f0703ce237cc185b2ccbb2bc0fd2658 -r f6561aae5484240c8b76cc32a7b4b1f501b0e660 config/plugins/visualizations/charts/static/charts/heatmap/config.js --- a/config/plugins/visualizations/charts/static/charts/heatmap/config.js +++ b/config/plugins/visualizations/charts/static/charts/heatmap/config.js @@ -4,6 +4,7 @@ title : 'Heatmap', library : '', tag : 'div', + use_panels : true, columns : { col_label : { title : 'Columns', diff -r 5f89fecb2f0703ce237cc185b2ccbb2bc0fd2658 -r f6561aae5484240c8b76cc32a7b4b1f501b0e660 config/plugins/visualizations/charts/static/charts/heatmap/heatmap-plugin.js --- a/config/plugins/visualizations/charts/static/charts/heatmap/heatmap-plugin.js +++ b/config/plugins/visualizations/charts/static/charts/heatmap/heatmap-plugin.js @@ -20,313 +20,215 @@ cellSize: 0, // color buckets - colorBuckets: 0, + nColors: 0, // default settings optionsDefault: { - margin : { + pace : 1000, + margin : { top : 50, right : 10, bottom : 50, left : 100 }, - colors : ['#005824','#1A693B','#347B53','#4F8D6B','#699F83','#83B09B','#9EC2B3','#B8D4CB','#D2E6E3','#EDF8FB','#FFFFFF','#F1EEF6','#E6D3E1','#DBB9CD','#D19EB9','#C684A4','#BB6990','#B14F7C','#A63467','#9B1A53','#91003F'] + colors : ['#005824','#1A693B','#347B53','#4F8D6B','#699F83','#83B09B','#9EC2B3','#B8D4CB','#D2E6E3','#EDF8FB','#FFFFFF','#F1EEF6','#E6D3E1','#DBB9CD','#D19EB9','#C684A4','#BB6990','#B14F7C','#A63467','#9B1A53','#91003F'] }, // initialize initialize: function(options) { + // link this + var self = this; + // load options this.options = Utils.merge(options, this.optionsDefault) - // add ui elements - this.options.div.append(this._templateTooltip()); - this.options.div.append(this._templateSelect()); + // check requirements + if (!this.options.data || !this.options.div) { + console.debug('FAILED - HeatMapPlugin::initialize() - Parameters (container and/or data) missing.'); + return; + } - // access data - var data = this.options.data; + // link data + this.data = this.options.data; - // identify unique labels - var col_hash = {}; - var row_hash = {}; + // set element + this.setElement(this.options.div); - // create label indices - this.colNumber = 0; - this.rowNumber = 0; - for (var i in data) { - var cell = data[i]; + // + // data indexing + // + + // labels in alphabetical order + this.rowLabel = []; + this.colLabel = []; + + // unique keys (key indices are unique per label and indicate the labels rank in the alphabetical sorting) + this.colRank = {}; + this.rowRank = {}; + + // identify unqiue labels + for (var i in this.data) { + var cell = this.data[i]; // add label to index list var col_label = cell.col_label; - if (col_hash[col_label] === undefined) { - col_hash[col_label] = ++this.colNumber; + if (this.colRank[col_label] === undefined) { + this.colRank[col_label] = true; + this.colLabel.push(col_label); } var row_label = cell.row_label; - if (row_hash[row_label] === undefined) { - row_hash[row_label] = ++this.rowNumber; + if (this.rowRank[row_label] === undefined) { + this.rowRank[row_label] = true; + this.rowLabel.push(row_label); } } - // add indices to data - for (var i in data) { - var cell = data[i]; - cell.col = col_hash[cell.col_label]; - cell.row = row_hash[cell.row_label]; + // set sizes + this.rowNumber = this.rowLabel.length + this.colNumber = this.colLabel.length + + // sort labels alphabetical + this.rowLabel.sort(); + this.colLabel.sort(); + + // generate sorted key list for rows + this.rowIndex = [] + for (var i in this.rowLabel) { + var row_label = this.rowLabel[i]; + var row_index = parseInt(i); + this.rowRank[row_label] = row_index; + + // should contain clustering + this.rowIndex.push(row_index); } - // add row labels - this.rowIndex = [] - for (var key in row_hash) { - this.rowLabel.push(key); - this.rowIndex.push(row_hash[key]); + // generate sorted key list for columns + this.colIndex = [] + for (var i in this.colLabel) { + var col_label = this.colLabel[i]; + var col_index = parseInt(i); + this.colRank[col_label] = col_index; + + // should contain clustering + this.colIndex.push(col_index); } - // add col labels - this.colIndex = [] - for (var key in col_hash) { - this.colLabel.push(key); - this.colIndex.push(col_hash[key]); + // + // parse indexing to cells, identify data range + // + + // min/max + this.max = undefined; + this.min = undefined + + // add indices to data + for (var i in this.data) { + // get cell data + var cell = this.data[i]; + + // add rank + cell.col_rank = this.colRank[cell.col_label]; + cell.row_rank = this.rowRank[cell.row_label]; + + // identify max/min values + if (this.min == undefined || this.min > cell.value) { + this.min = cell.value; + } + if (this.max == undefined || this.max < cell.value) { + this.max = cell.value; + } } - console.log(this.rowIndex); - console.log(this.colIndex); + // middle + this.mid = (this.max + this.min) / 2; + + // + // set colors + // // identify buckets - this.colorBuckets = this.options.colors.length; + this.nColors = this.options.colors.length; + // color scale + this.colorScale = d3.scale.quantile() + .domain([this.min, this.mid, this.max]) + .range(this.options.colors); + + // + // add ui elements + // + // create ui elements + this.$tooltip = $(this._templateTooltip()); + this.$select = $(this._templateSelect()); + + // append + this.$el.append(this.$tooltip); + this.$el.append(this.$select); + + // add event to select field + this.$select.on('change', function(){ + self._order(this.value); + }); + + // // draw - this._draw(this.options.div, this.options.data); + // + this._draw(); }, - _draw: function(container, data) { + _draw: function() { + // link this + var self = this; + + // container + var container_width = this.$el.width(); + var container_height = this.$el.height(); + // get height - this.width = parseInt(container.width()) - this.options.margin.left; - this.height = parseInt(container.height()) - 2*this.options.margin.top; + this.width = this.$el.width() - this.options.margin.left - this.options.margin.right; + this.height = this.$el.height() - this.options.margin.top - this.options.margin.bottom; // calculate cell size - this.cellSize = Math.min( this.height / (this.rowNumber), - this.width / (this.colNumber)); + this.cellSize = Math.min(parseInt(this.height / this.rowNumber), + parseInt(this.width / this.colNumber)); // set width/height for plugin - this.width = this.options.cellSize * this.colNumber; - this.height = this.options.cellSize * this.rowNumber; + this.width = this.cellSize * this.colNumber; + this.height = this.cellSize * this.rowNumber; - // set legend width - this.legendElementWidth = this.options.cellSize * 2.5; - - // configure - var margin = this.options.margin; - var cellSize = this.cellSize; - var colNumber = this.colNumber; - var rowNumber = this.rowNumber; - var colorBuckets = this.colorBuckets; - var colors = this.options.colors; - var rowIndex = this.rowIndex; - var colIndex = this.colIndex; - var colLabel = this.colLabel; - var rowLabel = this.rowLabel; - var width = this.width; - var height = this.height; - var legendElementWidth = this.legendElementWidth; + // get dimensions + var margin = this.options.margin; + var width = this.width; + var height = this.height; - // color scale - var colorScale = d3.scale.quantile() - .domain([ -10, 0, 10]) - .range(colors); - - // add graph - var svg = d3.select(container[0]).append('svg') + // add main group and translate + this.svg = d3.select(this.$el[0]).append('svg') .attr("width", width + margin.left + margin.right) .attr("height", height + margin.top + margin.bottom) .append("g") - .attr("transform", "translate(" + margin.left + "," + margin.top + ")") + .attr("transform", "translate(" + (container_width - width) / 2 + "," + (container_height - height) / 2 + ")") - // row labels - var rowSortOrder=false; - var colSortOrder=false; - var rowLabels = svg.append("g") - .selectAll(".rowLabelg") - .data(rowLabel) - .enter() - .append("text") - .text(function (d) { return d; }) - .attr("x", 0) - .attr("y", function (d, i) { return rowIndex.indexOf(i+1) * cellSize; }) - .style("font-size", cellSize + "px") - .style("text-anchor", "end") - .attr("transform", "translate(-10," + cellSize / 1.5 + ")") - .attr("class", function (d,i) { return "rowLabel mono r"+i;} ) - .on("mouseover", function(d) { - d3.select(this).classed("text-hover",true); - d3.select(this).style("font-size", parseInt(cellSize * 1.3) + "px"); - }) - .on("mouseout" , function(d) { - d3.select(this).classed("text-hover",false); - d3.select(this).style("font-size", parseInt(cellSize) + "px"); - }) - .on("click", function(d,i) {rowSortOrder=!rowSortOrder; sortbylabel("r",i,rowSortOrder);d3.select("#order").property("selectedIndex", 4).node().focus();;}); + // reset sorting + this.rowSortOrder = false; + this.colSortOrder = false; - // column labels - var colLabels = svg.append("g") - .selectAll(".colLabelg") - .data(colLabel) - .enter() - .append("text") - .text(function (d) { return d; }) - .attr("x", 0) - .attr("y", function (d, i) { return colIndex.indexOf(i+1) * cellSize; }) - .style("font-size", cellSize + "px") - .style("text-anchor", "left") - .attr("transform", "translate("+cellSize/2 + ",-17) rotate (-90)") - .attr("class", function (d,i) { return "colLabel mono c"+i;} ) - .on("mouseover", function(d) { - d3.select(this).classed("text-hover",true); - d3.select(this).style("font-size", parseInt(cellSize * 1.3) + "px"); - }) - .on("mouseout" , function(d) { - d3.select(this).classed("text-hover",false); - d3.select(this).style("font-size", parseInt(cellSize) + "px"); - }) - .on("click", function(d,i) {colSortOrder=!colSortOrder; sortbylabel("c",i,colSortOrder);d3.select("#order").property("selectedIndex", 4).node().focus();;}); - - // heat map - var heatMap = svg.append("g").attr("class","g3") - .selectAll(".cellg") - .data(data,function(d){return d.row+":"+d.col;}) - .enter() - .append("rect") - .attr("x", function(d) { return colIndex.indexOf(d.col) * cellSize; }) - .attr("y", function(d) { return rowIndex.indexOf(d.row) * cellSize; }) - .attr("class", function(d){return "cell cell-border cr"+(d.row-1)+" cc"+(d.col-1);}) - .attr("width", cellSize) - .attr("height", cellSize) - .style("fill", function(d) { return colorScale(d.value); }) - // .on("click", function(d) { - // var rowtext=d3.select(".r"+(d.row-1)); - // if(rowtext.classed("text-selected")==false){ - // rowtext.classed("text-selected",true); - // }else{ - // rowtext.classed("text-selected",false); - // } - //}) - .on("mouseover", function(d){ - //highlight text - d3.select(this).classed("cell-hover",true); - d3.selectAll(".rowLabel").classed("text-highlight",function(r,ri){ return ri==(d.row-1);}); - d3.selectAll(".colLabel").classed("text-highlight",function(c,ci){ return ci==(d.col-1);}); - //d3.selectAll(".colLabel").style("font-size", parseInt(cellSize * 1.3) + "px"); - //d3.selectAll(".rowLabel").style("font-size", parseInt(cellSize * 1.3) + "px"); - - //Update the tooltip position and value - d3.select("#heatmap-tooltip") - .style("left", (d3.event.pageX+10) + "px") - .style("top", (d3.event.pageY-10) + "px") - .select("#value") - .text("lables:"+rowLabel[d.row-1]+","+colLabel[d.col-1]+"\ndata:"+d.value+"\nrow-col-idx:"+d.col+","+d.row+"\ncell-xy "+this.x.baseVal.value+", "+this.y.baseVal.value); - //Show the tooltip - d3.select("#heatmap-tooltip").classed("hidden", false); - }) - .on("mouseout", function(){ - d3.select(this).classed("cell-hover",false); - d3.selectAll(".rowLabel").classed("text-highlight",false); - d3.selectAll(".colLabel").classed("text-highlight",false); - //d3.selectAll(".colLabel").style("font-size", parseInt(cellSize) + "px"); - //d3.selectAll(".rowLabel").style("font-size", parseInt(cellSize) + "px"); - d3.select("#heatmap-tooltip").classed("hidden", true); - }); - - var legend = svg.selectAll(".legend") - .data([-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10]) - .enter().append("g") - .attr("class", "legend"); - - legend.append("rect") - .attr("x", function(d, i) { return legendElementWidth * i; }) - .attr("y", height+(cellSize*2)) - .attr("width", legendElementWidth) - .attr("height", cellSize) - .style("fill", function(d, i) { return colors[i]; }); - - legend.append("text") - .attr("class", "mono") - .text(function(d) { return d; }) - .attr("width", legendElementWidth) - .attr("x", function(d, i) { return legendElementWidth * i; }) - .attr("y", height + (cellSize*4)) - .style("font-size", cellSize + "px"); - - // change ordering of cells - function sortbylabel(rORc,i,sortOrder) { - var t = svg.transition().duration(3000); - var values=[]; - var sorted; // sorted is zero-based index - d3.selectAll(".c"+rORc+i) - .filter(function(ce){ - values.push(ce.value); - }); - if(rORc=="r"){ // sort valuesatio of a gene - sorted=d3.range(colNumber).sort(function(a,b){ if(sortOrder){ return values[b]-values[a];}else{ return values[a]-values[b];}}); - t.selectAll(".cell") - .attr("x", function(d) { return sorted.indexOf(d.col-1) * cellSize; }); - t.selectAll(".colLabel") - .attr("y", function (d, i) { return sorted.indexOf(i) * cellSize; }); - } else { // sort valuesatio of a contrast - sorted=d3.range(rowNumber).sort(function(a,b){if(sortOrder){ return values[b]-values[a];}else{ return values[a]-values[b];}}); - t.selectAll(".cell") - .attr("y", function(d) { return sorted.indexOf(d.row-1) * cellSize; }); - t.selectAll(".rowLabel") - .attr("y", function (d, i) { return sorted.indexOf(i) * cellSize; }); - } - } - - d3.select("#order").on("change",function(){ - order(this.value); - }); - - function order(value) { - if(value=="hclust"){ - var t = svg.transition().duration(3000); - t.selectAll(".cell") - .attr("x", function(d) { return colIndex.indexOf(d.col) * cellSize; }) - .attr("y", function(d) { return rowIndex.indexOf(d.row) * cellSize; }); - - t.selectAll(".rowLabel") - .attr("y", function (d, i) { return rowIndex.indexOf(i+1) * cellSize; }); - - t.selectAll(".colLabel") - .attr("y", function (d, i) { return colIndex.indexOf(i+1) * cellSize; }); - - } else if (value=="probecontrast") { - var t = svg.transition().duration(3000); - t.selectAll(".cell") - .attr("x", function(d) { return (d.col - 1) * cellSize; }) - .attr("y", function(d) { return (d.row - 1) * cellSize; }); - - t.selectAll(".rowLabel") - .attr("y", function (d, i) { return i * cellSize; }); - - t.selectAll(".colLabel") - .attr("y", function (d, i) { return i * cellSize; }); - } else if (value=="probe") { - var t = svg.transition().duration(3000); - t.selectAll(".cell") - .attr("y", function(d) { return (d.row - 1) * cellSize; }); - - t.selectAll(".rowLabel") - .attr("y", function (d, i) { return i * cellSize; }); - } else if (value=="contrast"){ - var t = svg.transition().duration(3000); - t.selectAll(".cell") - .attr("x", function(d) { return (d.col - 1) * cellSize; }); - t.selectAll(".colLabel") - .attr("y", function (d, i) { return i * cellSize; }); - } - } - + // build + this.rowLabels = this._buildRowLabels(); + this.colLabels = this._buildColLabels(); + this.heatMap = this._buildHeatMap(); + this.legend = this._buildLegend(); + }, + + // selection of cells + _addSelectionTool: function() { + // + // selection + // var sa=d3.select(".g3") .on("mousedown", function() { if( !d3.event.altKey) { - d3.selectAll(".cell-selected").classed("cell-selected",false); - d3.selectAll(".rowLabel").classed("text-selected",false); - d3.selectAll(".colLabel").classed("text-selected",false); + d3.selectAll(".cell-selected").classed("cell-selected", false); + d3.selectAll(".rowLabel").classed("text-selected", false); + d3.selectAll(".colLabel").classed("text-selected", false); } var p = d3.mouse(this); sa.append("rect") @@ -374,8 +276,7 @@ // deselect all temporary selected state objects d3.selectAll(".cell-selection.cell-selected").classed("cell-selected", false); d3.selectAll(".text-selection.text-selected").classed("text-selected",false); - - d3.selectAll('.cell').filter(function(cell_d, i) { + d3.selectAll(".cell").filter(function(cell_d, i) { if(!d3.select(this).classed("cell-selected") && // inner circle inside selection frame (this.x.baseVal.value)+cellSize >= d.x && (this.x.baseVal.value)<=d.x+d.width && @@ -385,11 +286,11 @@ .classed("cell-selection", true) .classed("cell-selected", true); - d3.select(".r"+(cell_d.row-1)) + d3.select(".r"+(cell_d.row_rank)) .classed("text-selection",true) .classed("text-selected",true); - d3.select(".c"+(cell_d.col-1)) + d3.select(".c"+(cell_d.col_rank)) .classed("text-selection",true) .classed("text-selected",true); } @@ -417,14 +318,353 @@ }); }, + // build legend + _buildLegend: function() { + // link this + var self = this; + + // gather data + var cellSize = this.cellSize; + var height = this.height; + var legendCellWidth = this.width / this.nColors; + + // create range labels + var dataRange = []; + for(var i = 0; i < this.nColors; i++) { + dataRange.push(''); + } + + // prepare indices + var dataRangeMin = 0; + var dataRangeMid = parseInt((dataRange.length - 1) / 2); + var dataRangeMax = dataRange.length - 1; + + // add labels + dataRange[dataRangeMin] = this.min; + dataRange[dataRangeMid] = this.mid; + dataRange[dataRangeMax] = this.max; + + // create legend + var legend = this.svg.selectAll(".legend") + .data(dataRange) + .enter().append("g") + .attr("class", "legend"); + + // add boxes + legend.append("rect") + .attr("x", function(d, i) { + return legendCellWidth * i; + }) + .attr("y", height + cellSize) + .attr("width", legendCellWidth) + .attr("height", cellSize) + .style("fill", function(d, i) { + return self.options.colors[i]; + }); + + // add text + legend.append("text") + .attr("class", "mono") + .text(function(d) { + return d; + }) + .attr("width", legendCellWidth) + .attr("x", function(d, i) { + return legendCellWidth * i; + }) + .attr("y", height + cellSize) + .style("font-size", cellSize + "px"); + }, + + // build column labels + _buildColLabels: function() { + // link this + var self = this; + + // gather data + var cellSize = this.cellSize; + var colIndex = this.colIndex; + var colLabel = this.colLabel; + + // column labels + var colLabels = this.svg.append("g") + .selectAll(".colLabelg") + .data(colLabel) + .enter() + .append("text") + .text(function (d) { + return d; + }) + .attr("x", 0) + .attr("y", function (d, i) { + return colIndex.indexOf(i) * cellSize; + }) + .style("font-size", cellSize + "px") + .style("text-anchor", "left") + .attr("transform", "translate(" + cellSize / 2 + ", -17) rotate (-90)") + .attr("class", function (d, i) { + return "colLabel mono c" + i; + }) + .on("mouseover", function(d) { + d3.select(this).classed("text-hover",true); + d3.select(this).style("font-size", parseInt(cellSize * 1.3) + "px"); + }) + .on("mouseout" , function(d) { + d3.select(this).classed("text-hover",false); + d3.select(this).style("font-size", parseInt(cellSize) + "px"); + }) + .on("click", function(d, i) { + self.colSortOrder=!self.colSortOrder; + self._sortByLabel("c", i, self.colSortOrder); + d3.select("#order").property("selectedIndex", 4).node().focus(); + }); + }, + + // build row labels + _buildRowLabels: function() { + // link this + var self = this; + + // gather data + var cellSize = this.cellSize; + var rowIndex = this.rowIndex; + var rowLabel = this.rowLabel; + + // draw labels + var rowLabels = this.svg.append("g") + .selectAll(".rowLabelg") + .data(rowLabel) + .enter() + .append("text") + .text(function (d) { + return d; + }) + .attr("x", 0) + .attr("y", function (d, i) { + return rowIndex.indexOf(i) * cellSize; + }) + .style("font-size", cellSize + "px") + .style("text-anchor", "end") + .attr("transform", "translate(-10," + cellSize / 1.5 + ")") + .attr("class", function (d, i) { + return "rowLabel mono r" + i; + } ) + .on("mouseover", function(d) { + d3.select(this).classed("text-hover",true); + d3.select(this).style("font-size", parseInt(cellSize * 1.3) + "px"); + }) + .on("mouseout" , function(d) { + d3.select(this).classed("text-hover",false); + d3.select(this).style("font-size", parseInt(cellSize) + "px"); + }) + .on("click", function(d, i) { + self.rowSortOrder=!self.rowSortOrder; + self._sortByLabel("r", i, self.rowSortOrder); + d3.select("#order").property("selectedIndex", 4).node().focus(); + }); + }, + + // build heat map + _buildHeatMap: function() { + // link this + var self = this; + + // gather data + var cellSize = this.cellSize; + var rowIndex = this.rowIndex; + var rowLabel = this.rowLabel; + var colIndex = this.colIndex; + var colLabel = this.colLabel; + + // heat map + var heatMap = this.svg.append("g").attr("class","g3") + .selectAll(".cellg") + .data(self.data, function(d) { + return d.row_rank + ":" + d.col_rank; + }) + .enter() + .append("rect") + .attr("x", function(d) { + return colIndex.indexOf(d.col_rank) * cellSize; + }) + .attr("y", function(d) { + return rowIndex.indexOf(d.row_rank) * cellSize; + }) + .attr("class", function(d){ + return "cell cell-border cr" + d.row_rank + " cc" + d.col_rank; + }) + .attr("width", cellSize) + .attr("height", cellSize) + .style("fill", function(d) { + return self.colorScale(d.value); + }) + .on("mouseover", function(d){ + // highlight text + d3.select(this).classed("cell-hover",true); + d3.selectAll(".rowLabel").classed("text-highlight",function(r,ri){ return ri==(d.row_rank);}); + d3.selectAll(".colLabel").classed("text-highlight",function(c,ci){ return ci==(d.col_rank);}); + + // update the tooltip position and value + d3.select("#heatmap-tooltip") + .style("left", (d3.event.pageX+10) + "px") + .style("top", (d3.event.pageY-10) + "px") + .select("#value") + .text("Label: " + rowLabel[d.row_rank] + " | " + colLabel[d.col_rank] + ", Value: " + d.value); + // show the tooltip + d3.select("#heatmap-tooltip").classed("hidden", false); + }) + .on("mouseout", function(){ + d3.select(this).classed("cell-hover",false); + d3.selectAll(".rowLabel").classed("text-highlight",false); + d3.selectAll(".colLabel").classed("text-highlight",false); + d3.select("#heatmap-tooltip").classed("hidden", true); + }); + }, + + // change ordering of cells + _sortByLabel: function(rORc, i, sortOrder) { + // get cell size + var cellSize = this.cellSize; + + // define transition / prepare element + var t = this.svg.transition().duration(this.options.pace); + + // collect cells + var cells=[]; + t.selectAll(".c" + rORc + i) + .filter(function(ce){ + cells.push(ce); + }); + + // sort cells + cells.sort(function(a, b) { + if (sortOrder) { + return b.value - a.value; + } else { + return a.value - b.value; + } + }); + + // rows or columns + if(rORc == "r") { + // get sorted key list + var sorted = []; + for (var i in cells) { + sorted.push(cells[i].col_rank); + } + + // sort cells + t.selectAll(".cell") + .attr("x", function(d) { + return sorted.indexOf(d.col_rank) * cellSize; + }); + + // sort labels + t.selectAll(".colLabel") + .attr("y", function (d, i) { + return sorted.indexOf(i) * cellSize; + }); + } else { + // get sorted key list + sorted = []; + for (var i in cells) { + sorted.push(cells[i].row_rank); + } + + // sort cells + t.selectAll(".cell") + .attr("y", function(d) { + return sorted.indexOf(d.row_rank) * cellSize; + }); + + // sort labels + t.selectAll(".rowLabel") + .attr("y", function (d, i) { + return sorted.indexOf(i) * cellSize; + }); + } + }, + + // sort function + _order: function (value) { + // link this + var self = this; + + // gather data + var cellSize = this.cellSize; + var rowIndex = this.rowIndex; + var rowLabel = this.rowLabel; + var colIndex = this.colIndex; + var colLabel = this.colLabel; + + // set duration / select element + var t = this.svg.transition().duration(this.options.pace); + if(value=="hclust"){ + t.selectAll(".cell") + .attr("x", function(d) { + return colIndex.indexOf(d.col_rank) * cellSize; + }) + .attr("y", function(d) { + return rowIndex.indexOf(d.row_rank) * cellSize; + }); + + t.selectAll(".rowLabel") + .attr("y", function(d, i) { + return rowIndex.indexOf(i) * cellSize; + }); + + t.selectAll(".colLabel") + .attr("y", function(d, i) { + return colIndex.indexOf(i) * cellSize; + }); + + } else if (value=="byboth") { + t.selectAll(".cell") + .attr("x", function(d) { + return d.col_rank * cellSize; + }) + .attr("y", function(d) { + return d.row_rank * cellSize; + }); + + t.selectAll(".rowLabel") + .attr("y", function (d, i) { + return i * cellSize; + }); + + t.selectAll(".colLabel") + .attr("y", function (d, i) { + return i * cellSize; + }); + } else if (value=="byrow") { + t.selectAll(".cell") + .attr("y", function(d) { + return d.row_rank * cellSize; + }); + + t.selectAll(".rowLabel") + .attr("y", function (d, i) { + return i * cellSize; + }); + } else if (value=="bycol"){ + t.selectAll(".cell") + .attr("x", function(d) { + return d.col_rank * cellSize; + }); + t.selectAll(".colLabel") + .attr("y", function (d, i) { + return i * cellSize; + }); + } + }, + // template _templateSelect: function() { return '<select id="order">' + - '<option value="hclust">by cluster</option>' + - '<option value="probecontrast">by probe name and contrast name</option>' + - '<option value="probe">by probe name</option>' + - '<option value="contrast">by contrast name</option>' + - '<option value="custom">by log2 ratio</option>' + + '<option value="hclust">Cluster</option>' + + '<option value="byboth">Sort by row and column</option>' + + '<option value="byrow">Sort by row label</option>' + + '<option value="bycol">Sort by column label</option>' + '</select>'; }, diff -r 5f89fecb2f0703ce237cc185b2ccbb2bc0fd2658 -r f6561aae5484240c8b76cc32a7b4b1f501b0e660 config/plugins/visualizations/charts/static/charts/heatmap/heatmap.js --- a/config/plugins/visualizations/charts/static/charts/heatmap/heatmap.js +++ b/config/plugins/visualizations/charts/static/charts/heatmap/heatmap.js @@ -1,5 +1,5 @@ // dependencies -define(['utils/utils', 'plugin/charts/heatmap/heatmap-plugin'], function(Utils, Plugin) { +define(['utils/utils', 'plugin/charts/heatmap/heatmap-plugin'], function(Utils, HeatmapPlugin) { // widget return Backbone.View.extend( @@ -17,13 +17,17 @@ var self = this; this.app.datasets.request(request_dictionary, function() { - console.log(request_dictionary.groups); + // loop through data groups + for (var group_index in request_dictionary.groups) { + // get group + var group = request_dictionary.groups[group_index]; - // draw plot - new Plugin({ - 'data' : request_dictionary.groups[0].values, - 'div' : self.options.canvas[0] - }); + // draw plot + var heatmap = new HeatmapPlugin({ + 'data' : group.values, + 'div' : self.options.canvas[group_index] + }); + } // set chart state chart.state('ok', 'Heat map drawn.'); 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.
1
0
0
0
commit/galaxy-central: carlfeberhard: History: remove unused server templates history_common, history_item, and history_annotation_table; Pages: remove unused dialog for annotated histories
by commits-noreply@bitbucket.org
01 May '14
01 May '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/5f89fecb2f07/
Changeset: 5f89fecb2f07 User: carlfeberhard Date: 2014-05-01 15:17:19 Summary: History: remove unused server templates history_common, history_item, and history_annotation_table; Pages: remove unused dialog for annotated histories Affected #: 6 files diff -r 8ba0bd46e9fbd54fd6c525a276dd483daa9a79ba -r 5f89fecb2f0703ce237cc185b2ccbb2bc0fd2658 lib/galaxy/webapps/galaxy/controllers/page.py --- a/lib/galaxy/webapps/galaxy/controllers/page.py +++ b/lib/galaxy/webapps/galaxy/controllers/page.py @@ -697,16 +697,6 @@ return self._datasets_selection_grid( trans, **kwargs ) @web.expose - @web.require_login("get annotation table for history") - def get_history_annotation_table( self, trans, id ): - """ Returns HTML for an annotation table for a history. """ - history = self.get_history( trans, id, False, True ) - - if history: - datasets = self.get_history_datasets( trans, history ) - return trans.fill_template( "page/history_annotation_table.mako", history=history, datasets=datasets, show_deleted=False ) - - @web.expose def get_editor_iframe( self, trans ): """ Returns the document for the page editor's iframe. """ return trans.fill_template( "page/wymiframe.mako" ) diff -r 8ba0bd46e9fbd54fd6c525a276dd483daa9a79ba -r 5f89fecb2f0703ce237cc185b2ccbb2bc0fd2658 static/scripts/galaxy.pages.js --- a/static/scripts/galaxy.pages.js +++ b/static/scripts/galaxy.pages.js @@ -20,10 +20,7 @@ DIALOG_EMBED_DATASET : "embed_dataset", DIALOG_EMBED_WORKFLOW : "embed_workflow", DIALOG_EMBED_PAGE : "embed_page", - DIALOG_EMBED_VISUALIZATION : "embed_visualization", - - // Annotation dialogs. - DIALOG_HISTORY_ANNOTATE : "history_annotate", + DIALOG_EMBED_VISUALIZATION : "embed_visualization" }; // Initialize Galaxy elements. @@ -464,25 +461,8 @@ "</div>" ].join( '' ); // Insert embedded item into document. - //wym.insert(" "); // Needed to prevent insertion from occurring in child element in webkit browsers. wym.insert(item_embed_html); - // TODO: can we fix this? - // Due to oddities of wym.insert() [likely due to inserting a <div> and/or a complete paragraph], an - // empty paragraph (or two!) may be included either before an embedded item. Remove these paragraphs. - //$("#" + item_elt_id, wym._doc.body).each( function() { - // // Remove previous empty paragraphs. - // var removing = true; - // while (removing) - // { - // var prev_elt = $(this).prev(); - // if ( prev_elt.length != 0 && jQuery.trim(prev_elt.text()) == "" ) - // prev_elt.remove(); - // else - // removing = false; - // } - //}); - }); hide_modal(); }, @@ -495,55 +475,6 @@ } }); } - - // ANNOTATE HISTORY DIALOG - if ( dialogType == Galaxy.DIALOG_ANNOTATE_HISTORY ) { - $.ajax( - { - url: list_histories_for_selection_url, - data: {}, - error: function() { alert( "Grid refresh failed" ) }, - success: function(table_html) - { - show_modal( - "Insert Link to History", - table_html, - { - "Annotate": function() - { - // Insert links to history for each checked item. - var item_ids = new Array(); - $('input[name=id]:checked').each(function() { - var item_id = $(this).val(); - - // Get annotation table for history. - $.ajax( - { - url: get_history_annotation_table_url, - data: { id : item_id }, - error: function() { alert( "Grid refresh failed" ) }, - success: function(result) - { - // Insert into document. - wym.insert(result); - - init_galaxy_elts(wym); - - } - }); - }); - - hide_modal(); - }, - "Cancel": function() - { - hide_modal(); - } - } - ); - } - }); - } }; $(function(){ diff -r 8ba0bd46e9fbd54fd6c525a276dd483daa9a79ba -r 5f89fecb2f0703ce237cc185b2ccbb2bc0fd2658 templates/webapps/galaxy/page/editor.mako --- a/templates/webapps/galaxy/page/editor.mako +++ b/templates/webapps/galaxy/page/editor.mako @@ -19,7 +19,6 @@ set_accessible_url = "${h.url_for( controller='ITEM_CONTROLLER', action='set_accessible_async' )}", get_name_and_link_url = "${h.url_for( controller='ITEM_CONTROLLER', action='get_name_and_link_async' )}?id=", list_histories_for_selection_url = "${h.url_for(controller='page', action='list_histories_for_selection' )}", - get_history_annotation_table_url = "${h.url_for(controller='page', action='get_history_annotation_table' )}", editor_base_path = "${h.url_for('/static/wymeditor')}/", iframe_base_path = "${h.url_for('/static/wymeditor/iframe/galaxy')}/", save_url = "${h.url_for(controller='page', action='save' )}"; diff -r 8ba0bd46e9fbd54fd6c525a276dd483daa9a79ba -r 5f89fecb2f0703ce237cc185b2ccbb2bc0fd2658 templates/webapps/galaxy/page/history_annotation_table.mako --- a/templates/webapps/galaxy/page/history_annotation_table.mako +++ /dev/null @@ -1,61 +0,0 @@ -<%namespace file="../tagging_common.mako" import="render_tagging_element_html" /> -<%namespace file="../root/history_common.mako" import="render_dataset" /> - -<div class="annotated_item"> - <table> - ## Table header. - <tr> - <th colspan='2'>History '${history.get_display_name()}'</th> - </tr> - <tr> - ## Status messages and tags. - <td colspan='2'> - %if history.deleted: - <div class="warningmessagesmall"> - ${_('This is a deleted history.')} - </div> - %endif - ## Tags come for free with community tagging, so not sure if this is necessary. - ##%if trans.get_user() is not None: - ## Tags: ${render_tagging_element_html( tags=history.tags, editable=False, use_toggle_link=False )} - ##%endif - </td> - </tr> - <tr> - <td colspan="2" class="annotation" item_class="History" item_id="${trans.security.encode_id( history.id )}">Description of History: - <ol> - <li>What was the motivation for this history? - <li>What is the outcome of this history? - <li>What are unresolved questions from this history? - <li>What new questions arise from this history? - </ol> - </td> - </tr> - - ## Table body. For each dataset, there is an area to annotate the dataset. - %if not datasets: - <tr> - <td> - <div class="infomessagesmall" id="emptyHistoryMessage"> - ${_("Your history is empty. Click 'Get Data' on the left pane to start")} - </div> - </td> - </tr> - %else: - ## Render requested datasets. - %for data in datasets: - %if data.visible: - <tr> - <td valign="top" class="annotation" item_class="HistoryDatasetAssociation" item_id="${trans.security.encode_id( data.id )}">Describe this step: why was it done? what data did it produce?</td> - ##<td valign="top" class="annotation">Describe this step: why was it done? what data does it produce?</td> - <td> - <div class="historyItemContainer" id="historyItemContainer-${data.id}"> - ${render_dataset( data, data.hid, show_deleted_on_refresh = show_deleted, for_editing = False )} - </div> - </td> - </tr> - %endif - %endfor - %endif - </table> -</div> \ No newline at end of file diff -r 8ba0bd46e9fbd54fd6c525a276dd483daa9a79ba -r 5f89fecb2f0703ce237cc185b2ccbb2bc0fd2658 templates/webapps/galaxy/root/history_common.mako --- a/templates/webapps/galaxy/root/history_common.mako +++ /dev/null @@ -1,337 +0,0 @@ -<% _=n_ %> - -<%def name="render_download_links( data, dataset_id )"> - <% - from galaxy.datatypes.metadata import FileParameter - %> - %if not data.purged: - ## Check for downloadable metadata files - <% meta_files = [ k for k in data.metadata.spec.keys() if isinstance( data.metadata.spec[k].param, FileParameter ) ] %> - %if meta_files: - <div popupmenu="dataset-${dataset_id}-popup"> - <a class="action-button" href="${h.url_for( controller='dataset', action='display', dataset_id=dataset_id, \ - to_ext=data.ext )}">Download Dataset</a> - <a>Additional Files</a> - %for file_type in meta_files: - <a class="action-button" href="${h.url_for( controller='/dataset', action='get_metadata_file', \ - hda_id=dataset_id, metadata_name=file_type )}">Download ${file_type}</a> - %endfor - </div> - <div style="float:left;" class="menubutton split popup" id="dataset-${dataset_id}-popup"> - %endif - <a href="${h.url_for( controller='/dataset', action='display', dataset_id=dataset_id, to_ext=data.ext )}" title='${_("Download")}' class="icon-button disk"></a> - %if meta_files: - </div> - %endif - %endif -</%def> - -## Render the dataset `data` as history item, using `hid` as the displayed id -<%def name="render_dataset( data, hid, show_deleted_on_refresh = False, for_editing = True, display_structured = False )"> - <% - dataset_id = trans.security.encode_id( data.id ) - - if data.state in ['no state','',None]: - data_state = "queued" - else: - data_state = data.state - current_user_roles = trans.get_current_user_roles() - can_edit = not ( data.deleted or data.purged ) - %> - %if not trans.user_is_admin() and not trans.app.security_agent.can_access_dataset( current_user_roles, data.dataset ): - <div class="historyItemWrapper historyItem historyItem-${data_state} historyItem-noPermission" id="historyItem-${dataset_id}"> - %else: - <div class="historyItemWrapper historyItem historyItem-${data_state}" id="historyItem-${dataset_id}"> - %endif - - %if data.deleted or data.purged or data.dataset.purged: - <div class="warningmessagesmall"><strong> - %if data.dataset.purged or data.purged: - This dataset has been deleted and removed from disk. - %else: - This dataset has been deleted. - %if for_editing: - Click <a href="${h.url_for( controller='dataset', action='undelete', dataset_id=dataset_id )}" class="historyItemUndelete" id="historyItemUndeleter-${dataset_id}" target="galaxy_history">here</a> to undelete - %if trans.app.config.allow_user_dataset_purge: - or <a href="${h.url_for( controller='dataset', action='purge', dataset_id=dataset_id )}" class="historyItemPurge" id="historyItemPurger-${dataset_id}" target="galaxy_history">here</a> to immediately remove it from disk. - %else: - it. - %endif - %endif - %endif - </strong></div> - %endif - - %if data.visible is False: - <div class="warningmessagesmall"> - <strong>This dataset has been hidden. Click <a href="${h.url_for( controller='dataset', action='unhide', dataset_id=dataset_id )}" class="historyItemUnhide" id="historyItemUnhider-${dataset_id}" target="galaxy_history">here</a> to unhide.</strong> - </div> - %endif - - ## Header row for history items (name, state, action buttons) - <div style="overflow: hidden;" class="historyItemTitleBar"> - <div class="historyItemButtons"> - %if data_state == "upload": - ## TODO: Make these CSS, just adding a "disabled" class to the normal - ## links should be enough. However the number of datasets being uploaded - ## at a time is usually small so the impact of these images is also small. - <span title='${_("Display Data")}' class='icon-button display_disabled'></span> - %if for_editing: - <span title='Edit Attributes' class='icon-button edit_disabled'></span> - %endif - %else: - <% - if for_editing: - display_url = h.url_for( controller='dataset', action='display', dataset_id=dataset_id, preview=True, filename='' ) - else: - # Get URL for display only. - if data.history.user and data.history.user.username: - display_url = h.url_for( controller='dataset', action='display_by_username_and_slug', - username=data.history.user.username, slug=dataset_id, filename='' ) - else: - # HACK: revert to for_editing display URL when there is no user/username. This should only happen when - # there's no user/username because dataset is being displayed by history/view after error reported. - # There are no security concerns here because both dataset/display and dataset/display_by_username_and_slug - # check user permissions (to the same degree) before displaying. - display_url = h.url_for( controller='dataset', action='display', dataset_id=dataset_id, preview=True, filename='' ) - %> - %if data.purged: - <span class="icon-button display_disabled" title="Cannot display datasets removed from disk"></span> - %else: - <a class="icon-button display" dataset_id="${dataset_id}" title='${_("View data")}' href="${display_url}" - %if for_editing: - target="galaxy_main" - %endif - ></a> - %endif - - ## edit attr button - %if for_editing: - %if data.deleted and not data.purged: - <span title="Undelete dataset to edit attributes" class="icon-button edit_disabled"></span> - %elif data.purged: - <span title="Cannot edit attributes of datasets removed from disk" class="icon-button edit_disabled"></span> - %else: - <a class="icon-button edit" title='${_("Edit attributes")}' href="${h.url_for( controller='dataset', action='edit', dataset_id=dataset_id )}" target="galaxy_main"></a> - %endif - %endif - - %endif - - ## delete button - %if for_editing: - %if can_edit: - <a class="icon-button delete" title='${_("Delete")}' href="${h.url_for( controller='dataset', action='delete', dataset_id=dataset_id, show_deleted_on_refresh=show_deleted_on_refresh )}" id="historyItemDeleter-${dataset_id}"></a> - %else: - <span title="Dataset is already deleted" class="icon-button delete_disabled"></span> - %endif - %endif - </div> - ## Hack, do it in css - %if data_state == "paused": - <span class="fa fa-pause"></span> - %else: - <span class="state-icon"></span> - %endif - <span class="historyItemTitle">${hid}: ${data.display_name()}</span> - </div> - - ## Body for history items, extra info and actions, data "peek" - - <div id="info${data.id}" class="historyItemBody"> - %if not trans.user_is_admin() and not trans.app.security_agent.can_access_dataset( current_user_roles, data.dataset ): - <div>You do not have permission to view this dataset.</div> - %elif data_state == "upload": - <div>Dataset is uploading</div> - %elif data_state == "queued": - <div>${_('Job is waiting to run')}</div> - <div> - <a href="${h.url_for( controller='dataset', action='show_params', dataset_id=dataset_id )}" target="galaxy_main" title='${_("View Details")}' class="icon-button information"></a> - %if for_editing: - <a href="${h.url_for( controller='tool_runner', action='rerun', id=data.id )}" target="galaxy_main" title='${_("Run this job again")}' class="icon-button arrow-circle"></a> - %endif - </div> - %elif data_state == "paused": - <div> - ${_('Job is currently paused:')} <i>${data.display_info().strip().rstrip('.')}.</i> ${_('Use the history menu to resume.')}</div> - <div> - <a href="${h.url_for( controller='dataset', action='show_params', dataset_id=dataset_id )}" target="galaxy_main" title='${_("View Details")}' class="icon-button information"></a> - %if for_editing: - <a href="${h.url_for( controller='tool_runner', action='rerun', id=data.id )}" target="galaxy_main" title='${_("Run this job again")}' class="icon-button arrow-circle"></a> - %endif - </div> - %elif data_state == "running": - <div>${_('Job is currently running')}</div> - <div> - <a href="${h.url_for( controller='dataset', action='show_params', dataset_id=dataset_id )}" target="galaxy_main" title='${_("View Details")}' class="icon-button information"></a> - %if for_editing: - <a href="${h.url_for( controller='tool_runner', action='rerun', id=data.id )}" target="galaxy_main" title='${_("Run this job again")}' class="icon-button arrow-circle"></a> - %endif - </div> - %elif data_state == "error": - %if not data.purged: - <div>${data.get_size( nice_size=True )}</div> - %endif - <div> - An error occurred running this job: <i>${data.display_info().strip()}</i> - </div> - <div> - %if for_editing: - <a href="${h.url_for( controller='dataset', action='errors', id=data.id )}" target="galaxy_main" title="View or report this error" class="icon-button bug"></a> - %endif - %if data.has_data(): - ${render_download_links( data, dataset_id )} - %endif - <a href="${h.url_for( controller='dataset', action='show_params', dataset_id=dataset_id )}" target="galaxy_main" title='${_("View Details")}' class="icon-button information"></a> - %if for_editing: - <a href="${h.url_for( controller='tool_runner', action='rerun', id=data.id )}" target="galaxy_main" title='${_("Run this job again")}' class="icon-button arrow-circle"></a> - %endif - </div> - %elif data_state == "discarded": - <div> - The job creating this dataset was cancelled before completion. - </div> - <div> - <a href="${h.url_for( controller='dataset', action='show_params', dataset_id=dataset_id )}" target="galaxy_main" title='${_("View Details")}' class="icon-button information"></a> - %if for_editing: - <a href="${h.url_for( controller='tool_runner', action='rerun', id=data.id )}" target="galaxy_main" title='${_("Run this job again")}' class="icon-button arrow-circle"></a> - %endif - </div> - %elif data_state == 'setting_metadata': - <div>${_('Metadata is being Auto-Detected.')}</div> - %elif data_state == "empty": - <div>${_('No data: ')}<i>${data.display_info()}</i></div> - <div> - <a href="${h.url_for( controller='dataset', action='show_params', dataset_id=dataset_id )}" target="galaxy_main" title='${_("View Details")}' class="icon-button information"></a> - %if for_editing: - <a href="${h.url_for( controller='tool_runner', action='rerun', id=data.id )}" target="galaxy_main" title='${_("Run this job again")}' class="icon-button arrow-circle"></a> - %endif - </div> - %elif data_state in [ "ok", "failed_metadata" ]: - %if data_state == "failed_metadata": - <div class="warningmessagesmall" style="margin: 4px 0 4px 0"> - An error occurred setting the metadata for this dataset. - %if can_edit: - You may be able to <a href="${h.url_for( controller='dataset', action='edit', dataset_id=dataset_id )}" target="galaxy_main">set it manually or retry auto-detection</a>. - %endif - </div> - %endif - <div> - ${data.blurb}<br /> - ${_("format: ")} <span class="${data.ext}">${data.ext}</span>, - ${_("database: ")} - %if data.dbkey == '?' and can_edit: - <a href="${h.url_for( controller='dataset', action='edit', dataset_id=dataset_id )}" target="galaxy_main">${_(data.dbkey)}</a> - %else: - <span class="${data.dbkey}">${_(data.dbkey)}</span> - %endif - </div> - %if data.display_info(): - <div class="info">${_('Info: ')}${data.display_info()}</div> - %endif - <div> - %if data.has_data(): - ${render_download_links( data, dataset_id )} - - <a href="${h.url_for( controller='dataset', action='show_params', dataset_id=dataset_id )}" target="galaxy_main" title='${_("View Details")}' class="icon-button information"></a> - - %if for_editing: - <a href="${h.url_for( controller='tool_runner', action='rerun', id=data.id )}" target="galaxy_main" title='${_("Run this job again")}' class="icon-button arrow-circle"></a> - ## Visualization icon + visualizations. Using anchor attributes is a HACK to encode needed - ## information--URL base, dataset id, dbkey, visualizations--in anchor. - <% - visualizations = data.get_visualizations() - %> - %if visualizations: - <a href="${h.url_for( controller='visualization' )}" - class="icon-button chart_curve visualize-icon" - title="Visualize" - dataset_id="${dataset_id}" - %if data.dbkey != '?': - dbkey="${data.dbkey}" - %endif - visualizations="${','.join(visualizations)}"></a> - %endif - %if trans.user: - %if not display_structured: - <div style="float: right"> - <a href="${h.url_for( controller='tag', action='retag', item_class=data.__class__.__name__, item_id=dataset_id )}" target="galaxy_main" title="Edit dataset tags" class="icon-button tags"></a> - <a href="${h.url_for( controller='dataset', action='annotate', id=dataset_id )}" target="galaxy_main" title="Edit dataset annotation" class="icon-button annotate"></a> - </div> - %endif - <div style="clear: both"></div> - <div class="tag-area" style="display: none"> - <strong>Tags:</strong> - <div class="tag-elt"></div> - </div> - <div id="${dataset_id}-annotation-area" class="annotation-area" style="display: none"> - <strong>Annotation:</strong> - <div id="${dataset_id}-annotation-elt" style="margin: 1px 0px 1px 0px" class="annotation-elt editable-text" title="Edit dataset annotation"></div> - </div> - - %endif - %else: - ## When displaying datasets for viewing, this is often needed to prevent peek from overlapping - ## icons. - <div style="clear: both"></div> - %endif - <div style="clear: both"></div> - %for display_app in data.datatype.get_display_types(): - <% target_frame, display_links = data.datatype.get_display_links( data, display_app, app, request.base ) %> - %if len( display_links ) > 0: - ${data.datatype.get_display_label(display_app)} - %for display_name, display_link in display_links: - <a target="${target_frame}" href="${display_link}">${_(display_name)}</a> - %endfor - <br /> - %endif - %endfor - %for display_app in data.get_display_applications( trans ).itervalues(): - ${display_app.name} - %for link_app in display_app.links.itervalues(): - <a target="${link_app.url.get( 'target_frame', '_blank' )}" href="${link_app.get_display_url( data, trans )}">${_(link_app.name)}</a> - %endfor - <br /> - %endfor - %elif for_editing: - <a href="${h.url_for( controller='dataset', action='show_params', dataset_id=dataset_id )}" target="galaxy_main" title='${_("View Details")}' class="icon-button information"></a> - <a href="${h.url_for( controller='tool_runner', action='rerun', id=data.id )}" target="galaxy_main" title='${_("Run this job again")}' class="icon-button arrow-circle"></a> - %endif - - </div> - %if data.peek != "no peek": - <div><pre id="peek${data.id}" class="peek">${_(h.to_unicode(data.display_peek()))}</pre></div> - %endif - %else: - <div>${_('Error: unknown dataset state "%s".') % data_state}</div> - %endif - - ## Recurse for child datasets - - %if len( data.children ) > 0: - ## FIXME: This should not be in the template, there should - ## be a 'visible_children' method on dataset. - <% - children = [] - for child in data.children: - if child.visible: - children.append( child ) - %> - %if len( children ) > 0: - <div> - There are ${len( children )} secondary datasets. - %for idx, child in enumerate(children): - ${render_dataset( child, idx + 1, show_deleted_on_refresh = show_deleted_on_refresh )} - %endfor - </div> - %endif - %endif - - <div style="clear: both;"></div> - - </div> - - - </div> - -</%def> diff -r 8ba0bd46e9fbd54fd6c525a276dd483daa9a79ba -r 5f89fecb2f0703ce237cc185b2ccbb2bc0fd2658 templates/webapps/galaxy/root/history_item.mako --- a/templates/webapps/galaxy/root/history_item.mako +++ /dev/null @@ -1,3 +0,0 @@ -<%namespace file="history_common.mako" import="render_dataset" /> - -${render_dataset( data, hid )} 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.
1
0
0
0
← Newer
1
...
22
23
24
25
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Results per page:
10
25
50
100
200