about summary refs log tree commit diff
path: root/wqflask/wqflask/static/new/javascript/chr_lod_chart.js
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask/wqflask/static/new/javascript/chr_lod_chart.js')
-rw-r--r--wqflask/wqflask/static/new/javascript/chr_lod_chart.js31
1 files changed, 7 insertions, 24 deletions
diff --git a/wqflask/wqflask/static/new/javascript/chr_lod_chart.js b/wqflask/wqflask/static/new/javascript/chr_lod_chart.js
index c6cbd01b..0032858f 100644
--- a/wqflask/wqflask/static/new/javascript/chr_lod_chart.js
+++ b/wqflask/wqflask/static/new/javascript/chr_lod_chart.js
@@ -1,13 +1,12 @@
-// Generated by CoffeeScript 1.9.2
+// Generated by CoffeeScript 1.10.0
 var Chr_Lod_Chart;
 
 Chr_Lod_Chart = (function() {
-  function Chr_Lod_Chart(plot_height, plot_width, chr, manhattanPlot, mappingScale) {
+  function Chr_Lod_Chart(plot_height, plot_width, chr, manhattanPlot) {
     this.plot_height = plot_height;
     this.plot_width = plot_width;
     this.chr = chr;
     this.manhattanPlot = manhattanPlot;
-    this.mappingScale = mappingScale;
     this.qtl_results = js_data.qtl_results;
     console.log("qtl_results are:", this.qtl_results);
     console.log("chr is:", this.chr);
@@ -66,6 +65,8 @@ Chr_Lod_Chart = (function() {
       } else {
         this_chr = result.chr;
       }
+      console.log("this_chr is:", this_chr);
+      console.log("@chr[0] is:", parseInt(this.chr[0]));
       if (this_chr > parseInt(this.chr[0])) {
         break;
       }
@@ -95,18 +96,11 @@ Chr_Lod_Chart = (function() {
   Chr_Lod_Chart.prototype.create_coordinates = function() {
     var i, len, ref, result, results;
     ref = this.these_results;
-    console.log("THESE_RESULTS:", ref)
     results = [];
     for (i = 0, len = ref.length; i < len; i++) {
       result = ref[i];
       this.x_coords.push(parseFloat(result.Mb));
-      if (js_data.result_score_type == "LOD") {
-        this.y_coords.push(result.lod_score);
-      }
-      else {
-        console.log("LRS VALUE:", result['lrs_value'])
-        this.y_coords.push(result['lrs_value']);
-      }
+      this.y_coords.push(result.lod_score);
       results.push(this.marker_names.push(result.name));
     }
     return results;
@@ -119,19 +113,7 @@ Chr_Lod_Chart = (function() {
   };
 
   Chr_Lod_Chart.prototype.create_scales = function() {
-    if (this.mappingScale == "morgan") {
-        max_pos = 0
-        for (i = 0, len = this.these_results.length; i < len; i++) {
-           marker = this.these_results[i]
-           if (parseFloat(marker['Mb']) > max_pos){
-               max_pos = parseFloat(marker.Mb)
-           }
-        }
-        this.x_scale = d3.scale.linear().domain([0, max_pos]).range([this.x_buffer, this.plot_width]);
-    }
-    else {
-        this.x_scale = d3.scale.linear().domain([0, this.chr[1]]).range([this.x_buffer, this.plot_width]);
-    }
+    this.x_scale = d3.scale.linear().domain([0, this.chr[1]]).range([this.x_buffer, this.plot_width]);
     return this.y_scale = d3.scale.linear().domain([0, this.y_max]).range([this.plot_height, this.y_buffer]);
   };
 
@@ -278,6 +260,7 @@ Chr_Lod_Chart = (function() {
     $("#return_to_full_view").hide();
     $('#topchart').remove();
     $('#chart_container').append('<div class="qtlcharts" id="topchart"></div>');
+    hideBDButton();
     return create_lod_chart();
   };