Commit 497b03cc authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

scatterPlot.js, axis.js: 'otherSize' axis, size on the other selected time/sample

This was surprisingly easy to implement, with a simple call to getSize(this.m.tOther)
parent 8d3917ff
......@@ -117,7 +117,7 @@ Axis.prototype = {
/* use clone size
*
* */
useSize: function () {
useSize: function (other) {
this.init()
var self = this;
this.sizeScale = d3.scale.log()
......@@ -126,7 +126,8 @@ Axis.prototype = {
//clone position
this.pos = function(cloneID) {
var size = self.m.clone(cloneID).getSize()
var time = other ? self.m.tOther : self.m.t
var size = self.m.clone(cloneID).getSize(time)
if (size !=0 ) {
return self.sizeScale(size);
}else{
......
......@@ -103,7 +103,8 @@ function ScatterPlot(id, model) {
["gene_j", "gene J"],
["allele_v", "allele V"],
["allele_j", "allele J"],
["Size", "abundance"],
["Size", "size"],
["otherSize", "size (other point)"],
["sequenceLength", "clone length"],
["GCContent", "GC content"],
["n", "N length"],
......@@ -119,7 +120,8 @@ function ScatterPlot(id, model) {
// "V/abundance" : { "mode": "plot", "x" : "gene_v", "y": "Size"},
"V distribution" : { "mode": "bar", "x" : "gene_v", "y": "gene_j"},
"Clone length distribution" : { "mode": "bar", "x" : "sequenceLength", "y": "gene_v"},
"N length distribution" : { "mode": "bar", "x" : "n", "y": "gene_v"}
"N length distribution" : { "mode": "bar", "x" : "n", "y": "gene_v"},
"compare two samples" : { "mode": "plot", "x" : "Size", "y": "otherSize"}
};
this.default_preset = 1
......@@ -846,6 +848,9 @@ ScatterPlot.prototype = {
case "gene_j" :
this.sortBarTab(function(cloneID){return self.m.clone(cloneID).getJ(false)});
break;
case "otherSize" :
this.sortBarTab(function(cloneID){return self.m.clone(cloneID).getSize(m.tOther)});
break;
case "Size" :
this.sortBarTab(function(cloneID){return self.m.clone(cloneID).getSize()});
break;
......@@ -1976,8 +1981,11 @@ ScatterPlot.prototype = {
case "gene_j" :
axis.useGermline(this.m.germlineJ, "J", false)
break;
case "otherSize" :
axis.useSize(true)
break;
case "Size" :
axis.useSize()
axis.useSize(false)
break;
case "sequenceLength" :
axis.custom(function(cloneID) {
......
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