From 714d310766bba63d4b5218f98fa8d8ad5b93124f Mon Sep 17 00:00:00 2001 From: joshua-gould Date: Fri, 1 Apr 2016 11:51:28 -0400 Subject: [PATCH] auto scale 'copynumber' files --- src/ui/heat_map.js | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/src/ui/heat_map.js b/src/ui/heat_map.js index 61a8649..4eb81d7 100644 --- a/src/ui/heat_map.js +++ b/src/ui/heat_map.js @@ -681,6 +681,9 @@ morpheus.HeatMap.prototype = { gapSize : 10, updatingScroll : false, autoDisplay : function(options) { + if (options.filename == null) { + options.filename = ''; + } var colorScheme; if (options.extension === 'segtab' || options.extension === 'seg') { colorScheme = { @@ -736,6 +739,20 @@ morpheus.HeatMap.prototype = { 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) { @@ -1557,8 +1574,8 @@ morpheus.HeatMap.prototype = { } if (morpheus.DatasetUtil.getSeriesIndex(this.project - .getFullDataset(), 'ccf') !== -1) { - this.options.sizeBy = 'ccf'; + .getFullDataset(), 'allelic_fraction') !== -1) { + this.options.sizeBy = 'allelic_fraction'; } } @@ -1579,7 +1596,7 @@ morpheus.HeatMap.prototype = { sourcesSet.forEach(function(source) { _this.autoDisplay({ extension : morpheus.Util.getExtension(source), - filename : source + filename : '' + source }); }); } -- GitLab