Commit 714d3107 authored by joshua-gould's avatar joshua-gould

auto scale 'copynumber' files

parent 66328feb
...@@ -681,6 +681,9 @@ morpheus.HeatMap.prototype = { ...@@ -681,6 +681,9 @@ morpheus.HeatMap.prototype = {
gapSize : 10, gapSize : 10,
updatingScroll : false, updatingScroll : false,
autoDisplay : function(options) { autoDisplay : function(options) {
if (options.filename == null) {
options.filename = '';
}
var colorScheme; var colorScheme;
if (options.extension === 'segtab' || options.extension === 'seg') { if (options.extension === 'segtab' || options.extension === 'seg') {
colorScheme = { colorScheme = {
...@@ -736,6 +739,20 @@ morpheus.HeatMap.prototype = { ...@@ -736,6 +739,20 @@ morpheus.HeatMap.prototype = {
color : 'red' color : 'red'
} ] } ]
}; };
} else if (options.filename.toLowerCase().indexOf('copynumber') !== -1) {
colorScheme = {
type : 'fixed',
map : [ {
value : -1.5,
color : 'blue'
}, {
value : 0,
color : 'white'
}, {
value : 1.5,
color : 'red'
} ]
};
} }
if (colorScheme && options.filename) { if (colorScheme && options.filename) {
...@@ -1557,8 +1574,8 @@ morpheus.HeatMap.prototype = { ...@@ -1557,8 +1574,8 @@ morpheus.HeatMap.prototype = {
} }
if (morpheus.DatasetUtil.getSeriesIndex(this.project if (morpheus.DatasetUtil.getSeriesIndex(this.project
.getFullDataset(), 'ccf') !== -1) { .getFullDataset(), 'allelic_fraction') !== -1) {
this.options.sizeBy = 'ccf'; this.options.sizeBy = 'allelic_fraction';
} }
} }
...@@ -1579,7 +1596,7 @@ morpheus.HeatMap.prototype = { ...@@ -1579,7 +1596,7 @@ morpheus.HeatMap.prototype = {
sourcesSet.forEach(function(source) { sourcesSet.forEach(function(source) {
_this.autoDisplay({ _this.autoDisplay({
extension : morpheus.Util.getExtension(source), extension : morpheus.Util.getExtension(source),
filename : source filename : '' + source
}); });
}); });
} }
......
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