Commit 0fd7adf5 authored by Daria Zenkova's avatar Daria Zenkova

it works! and in element there are no more saving of previous plot

parent 6a08fdef
This diff is collapsed.
...@@ -294,7 +294,7 @@ morpheus.PcaPlotTool.prototype = { ...@@ -294,7 +294,7 @@ morpheus.PcaPlotTool.prototype = {
var project = this.project; var project = this.project;
this.formBuilder.$form.find('[name="draw"]').on('click', function () { this.formBuilder.$form.find('[name="draw"]').on('click', function () {
_this.$chart.empty();
var colorBy = _this.formBuilder.getValue('color'); var colorBy = _this.formBuilder.getValue('color');
var sizeBy = _this.formBuilder.getValue('size'); var sizeBy = _this.formBuilder.getValue('size');
var pc1 = _this.formBuilder.getValue('x-axis'); var pc1 = _this.formBuilder.getValue('x-axis');
...@@ -315,15 +315,26 @@ morpheus.PcaPlotTool.prototype = { ...@@ -315,15 +315,26 @@ morpheus.PcaPlotTool.prototype = {
console.log(rowIndices); console.log(rowIndices);
console.log(colorBy, sizeBy, pc1, pc2); console.log(colorBy, sizeBy, pc1, pc2);
var req = ocpu.call("pcaPlot", { arguments = {
es : expressionSet, es : expressionSet,
columns : columnIndices.length > 0 ? columnIndices : null,
rows : rowIndices.length > 0 ? rowIndices : null,
c1 : pc1, c1 : pc1,
c2 : pc2, c2 : pc2
colour : colorBy, };
size : sizeBy if (columnIndices.length > 0) {
}, function (session) { arguments.columns = columnIndices;
}
if (rowIndices.length > 0) {
arguments.rows = rowIndices;
}
if (colorBy != "") {
arguments.colour = colorBy;
}
if (sizeBy != "") {
arguments.size = sizeBy;
}
console.log(arguments);
var req = ocpu.call("pcaPlot", arguments, function (session) {
var img = $('<img />', {src : session.getLoc() + 'graphics/1/png'}); var img = $('<img />', {src : session.getLoc() + 'graphics/1/png'});
_this.$chart.prepend(img); _this.$chart.prepend(img);
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment