anchor.diff:                      tmp_lines = data.split(/\n/);
                       //Over-write mutation type
                       for (var j = 3 ; j < tmp_lines.length; j ++ ) {
  -                        var tmp_columns = tmp_lines[j].split(/\s+/);
  +                        var tmp_columns = tmp_lines[j].split(/\t/);
                           mutationMap[tmp_columns[2]] = tmp_columns[5];
                       }
                   }
  
positive.code: }
  
  function findAxisTitle() {
      var tmp_result = [];
      var xLegend;
      var yLegend;
      var tmp_plot_type = document.getElementById("plot_type").value;
      if (tmp_plot_type == plot_type_list[0][0]) {    //"mrna_vs_copy_no"
          var tmp_xLegend_index = findIndex(document.getElementById("data_type_copy_no").value, genetic_profile_copy_no);;
          var tmp_yLegend_index = findIndex(document.getElementById("data_type_mrna").value, genetic_profile_mrna);
          xLegend = genetic_profile_copy_no[tmp_xLegend_index][1];
          yLegend = genetic_profile_mrna[tmp_yLegend_index][1];
      } else if (tmp_plot_type == plot_type_list[1][0]) {  //"mrna_vs_dna_mythelation"
          var tmp_yLegend_index = findIndex(document.getElementById("data_type_mrna").value, genetic_profile_mrna);
          xLegend = genetic_profile_dna_methylation[0][1];
          yLegend = genetic_profile_mrna[tmp_yLegend_index][1];
      } else if (tmp_plot_type == plot_type_list[2][0]) {  //"rppa_protein_level_vs_mrna"
          var tmp_xLegend_index = findIndex(document.getElementById("data_type_mrna").value, genetic_profile_mrna);;
          xLegend = genetic_profile_mrna[tmp_xLegend_index][1];
          yLegend = genetic_profile_rppa[0][1];
      }
      tmp_result = [xLegend, yLegend];
      return tmp_result;
  }
  
  function generateScatterPlots() {
  
negative.code:             }
          }
      }
  
  
      //Create SVG dots
      var symbol = ["triangle-down", "diamond", "triangle-up", "square", "cross", "triangle-up", "circle"];
      var mutationTypes = ["frameshift", "nonsense", "splice", "in_frame", "nonstart", "nonstop", "missense"];
      var mutationFillTypes = ["#1C1C1C", "#1C1C1C", "#FFAA22", "#FFAA22", "#FFAA22", "#1C1C1C", "#FFAA22"];
      var gisticStrokeTypes = ["#00008B", "#00BFFF", "#000000", "#FF69B4", "#FF0000"];
      var gisticLegendText = ["Homdel", "Hetloss",  "Gain", "Amp", "Mutated", "Normal"];
      var gisticLegendStrokeTypes = ["#00008B", "#00BFFF", "#FF69B4", "#FF0000", "none", "#000000"];
      var gisticLegendFillTypes = ["none", "none", "none", "none", "orange", "none"];
  
      //----------------- Plot dots for Putative Copy No VS. mRNA view (with data noise)
      if ( type == 1 ) {
          //Define noise level
          var ramRatio = 0;
          if ((data_type_copy_no.indexOf("gistic") != -1) || (data_type_copy_no.indexOf("cna") != -1)) {
              ramRatio = 20;
          }
          svg.selectAll("path")
                  .data(dataset)
                  .enter()
                  .append("svg:path")
                  .attr("transform", function(d) { return "translate(" + (xScale(d[0]) + ((Math.random() * (ramRatio)) - (ramRatio/2))) + ", " + yScale(d[1]) + ")";})
                  .attr("d", d3.svg.symbol()
                          .size( function(d) {
                              switch (d[2]) {
                                  case "non" : return 15;
                                  default : return 25;
                              }
                          })
                          .type( function (d) {
                              switch (d[2]) {
                                  case mutationTypes[0] : return symbol[0];
                                  case mutationTypes[1] : return symbol[1];
                                  case mutationTypes[2] : return symbol[2];
                                  case mutationTypes[3] : return symbol[3];
                                  case mutationTypes[4] : return symbol[4];
                                  case mutationTypes[5] : return symbol[5];
                                  case mutationTypes[6] : return symbol[6];
                                  default: return "circle";
                              }
                          })
                  )
                  .attr("fill", function(d) {
                      switch (d[2]) {
                          case mutationTypes[0]: return mutationFillTypes[0];
                          case mutationTypes[1]: return mutationFillTypes[1];
                          case mutationTypes[2]: return mutationFillTypes[2];
                          case mutationTypes[3]: return mutationFillTypes[3];
                          case mutationTypes[4]: return mutationFillTypes[4];
                          case mutationTypes[5]: return mutationFillTypes[5];
                          case mutationTypes[6]: return mutationFillTypes[6];
                          default: return "#00AAF8";
                      }
                  })
                  .attr("stroke", function(d) {
                      switch (d[2]) {
                          case "non": return "none";
                          default: return "#D24939";
                      }
                  });
          //Making Qtips
          svg.selectAll('path').each(function(d, i) {
              $(this).qtip({
                  content: {text: 'qtip failed'},
                  events: {
                      render: function(event, api) {
                          var content = '<font size="2">' + "Mutation: <strong>" + d[5] + '</strong>(' + d[3] + ')' +  '</br>'
                                  + "Case ID: <strong>" + "<a href='tumormap.do?case_id=" + d[4] + "&cancer_study_id=" + cancer_study_id + "'>" + d[4] + '</a></strong>' +  '</font>';
                          api.set('content.text', content);
                      }
                  },
                  show: 'mouseover',
                  hide: 'mouseout',
                  style: { classes: 'ui-tooltip-light ui-tooltip-rounded ui-tooltip-shadow ui-tooltip-lightyellow' },
                  position: {my:'left bottom',at:'top right'}
              });
          });
  
          //--------------- Plot dots for other views
      } else {
          svg.selectAll("path")
                  .data(dataset)
                  .enter()
                  .append("svg:path")
                  .attr("transform", function(d) { return "translate(" + xScale(d[0]) + ", " + yScale(d[1]) + ")";})
                  .attr("d", d3.svg.symbol()
                          .size(35)
                          .type( function (d) {
                              switch (d[2]) {
                                  default: return "circle";
                              }
                          }
                  ))
                  .attr("fill", function(d) {
                      switch (d[3]) {
                          case "non" : return "none";
                          default: return "orange";
                      }
                  })
                  .attr("stroke", function(d) {
                      if ((d[2] == "0")&&(d[3] != "non")) {
                          return "none";
                      } else {
                          switch (d[2]) {
                              case "-2": return gisticStrokeTypes[0];
                              case "-1": return gisticStrokeTypes[1];
                              case "0": return gisticStrokeTypes[2];
                              case "1": return gisticStrokeTypes[3];
                              case "2": return gisticStrokeTypes[4];
                              default: return "black";
                          }
                      }
                  })
                  .attr("stroke-width", function(d) {
                      switch(d[3]) {
                          case "non" : return "1";
                          default: return "1.5";
                      }
                  });
          svg.selectAll('path').each(function(d, i) {
              $(this).qtip({
                  content: {text: 'qtip failed'},
                  events: {
                      render: function(event, api) {
                          var content = '<font size="2">' + "Mutation: <strong>" + d[5] + '</strong>(' + d[3] + ')' +  '</br>'
                                  + "Case ID: <strong>" + "<a href='tumormap.do?case_id=" + d[4] + "&cancer_study_id=" + cancer_study_id + "'>" + d[4] + '</a></strong>' +  '</font>';
                          api.set('content.text', content);
                      }
                  },
                  show: 'mouseover',
                  hide: 'mouseout',
                  style: { classes: 'ui-tooltip-light ui-tooltip-rounded ui-tooltip-shadow ui-tooltip-lightyellow' },
                  position: {my:'left bottom',at:'top right'}
              });
          });
      }
  
      //Error Handling -- empty dataset
      var xHasData = false;
      var yHasData = false;
      for (var j = 0; j < xData.length; j++) {
          if (xData[j] != "NaN") {
              xHasData = true;
          }
      }
      for (var k = 0; k < yData.length; k++) {
          if (yData[k] != "NaN") {
              yHasData = true;
          }
      }
      if ((yHasData == false) || (xHasData == false)) {
          var errorTxt1 = "An error occurred processing your request.";
          var errorTxt2 = "It maybe that your gene/case set combination has no data for this data type. ";
          var errorTxt3 = "If you believe this is an error, please contact us cbioportal@cbio.mskcc.org.";
          svg.append("text")
                  .attr("x", 220)
                  .attr("y", 280)
                  .attr("fill", "#DF3A01")
                  .text(errorTxt1)
          svg.append("text")
                  .attr("x", 120)
                  .attr("y", 295)
                  .attr("fill", "#DF3A01")
                  .text(errorTxt2)
          svg.append("text")
                  .attr("x", 130)
                  .attr("y", 310)
                  .attr("fill", "#DF3A01")
                  .text(errorTxt3);
      } else {
          //Create the legend
          if (type == 1) {  //Legend for Mutations
              var legend = svg.selectAll(".legend")
                      .data(mutationTypes)
                      .enter().append("g")
                      .attr("class", "legend")
                      .attr("transform", function(d, i) { return "translate(610, " + (30 + i * 15) + ")"; });
              legend.append("path")
                      .attr("width", 18)
                      .attr("height", 16)
                      .attr("d", d3.svg.symbol()
                              .size(30)
                              .type(function(d, i) {
                                  switch(i) {
                                      case i: return symbol[i];
                                  }
                              })
                      )
                      .attr("fill", function (d, i) {
                          switch (i) {
                              case i: return mutationFillTypes[i];
                          }
                      })
                      .attr("stroke", function (d, i) {
                          switch (i) {
                              case i: return "#D24939";
                          }
                      })
              legend.append("text")
                      .attr("dx", ".75em")
                      .attr("dy", ".35em")
                      .style("text-anchor", "front")
                      .text(function(d, i) {
                          switch (i) {
                              case i: return mutationTypes[i];
                          }
                      });
          } else {  //Legend for Gistic plus mutation annotation
              var legend = svg.selectAll(".legend")
                      .data(gisticLegendText)
                      .enter().append("g")
                      .attr("class", "legend")
                      .attr("transform", function(d, i) { return "translate(610, " + (30 + i * 15) + ")"; })
              legend.append("path")
                      .attr("width", 18)
                      .attr("height", 18)
                      .attr("d", d3.svg.symbol()
                              .size(40)
                              .type(function(d, i) {
                                  return "circle";
                              })
                      )
                      .attr("fill", function (d, i) {
                          switch(i) {
                              case i: return gisticLegendFillTypes[i];
                          }
                      })
                      .attr("stroke", function (d, i) {
                          switch (i) {
                              case i: return gisticLegendStrokeTypes[i];
                          }
                      })
                      .attr("stroke-width", function (d, i) {
                          return 1.1;
                      })
              legend.append("text")
                      .attr("dx", ".75em")
                      .attr("dy", ".35em")
                      .style("text-anchor", "front")
                      .text(function(d, i) {
                          switch (i) {
                              case i: return gisticLegendText[i];
                          }
                      });
          }
      }
  
      //Append axis Titles
      svg.append("text")
              .attr("class", "label")
              .attr("x", 350)
              .attr("y", 580)
              .style("text-anchor", "middle")
              .style("font-weight","bold")
              .text(xLegend);
      svg.append("text")
              .attr("class", "label")
              .attr("transform", "rotate(-90)")
              .attr("x", -270)
              .attr("y", 45)
              .style("text-anchor", "middle")
              .style("font-weight","bold")
              .text(yLegend);
  
  }
  
  function drawBoxPlots(svg, midLine, top, bottom, quan1, quan2, mean, IQR) {
  