diff options
author | zsloan | 2022-11-30 20:26:36 +0000 |
---|---|---|
committer | zsloan | 2022-11-30 20:26:36 +0000 |
commit | 69f9e2ebf31e7bf01162f8d9e9510d739b64e75c (patch) | |
tree | cb9f8141b0301b98a778a19aeed9df83e5e98d43 /wqflask | |
parent | 9c5b1f48914da17c08fc95da858e3d06e41721bb (diff) | |
download | genenetwork2-69f9e2ebf31e7bf01162f8d9e9510d739b64e75c.tar.gz |
Remove box plot (violin plot is enough)
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/static/new/javascript/show_trait.js | 157 | ||||
-rw-r--r-- | wqflask/wqflask/templates/show_trait_statistics.html | 8 |
2 files changed, 0 insertions, 165 deletions
diff --git a/wqflask/wqflask/static/new/javascript/show_trait.js b/wqflask/wqflask/static/new/javascript/show_trait.js index 1562ac25..7dcfbd89 100644 --- a/wqflask/wqflask/static/new/javascript/show_trait.js +++ b/wqflask/wqflask/static/new/javascript/show_trait.js @@ -325,39 +325,6 @@ updateBarChart = function() { } }; -update_box_plot = function() { - var y_value_list = [] - if (sampleLists.length > 1) { - i = 0; - for (var sample_group in root.selected_samples){ - var trait_sample_data = _.values(root.selected_samples[sample_group]) - var trait_vals = []; - for (j = 0, len = trait_sample_data.length; j < len; j++) { - this_sample_data = trait_sample_data[j]; - trait_vals.push(this_sample_data.value); - } - root.box_data[i]['y'] = trait_vals - i++; - } - } else { - var trait_sample_data = _.values(root.selected_samples['samples_all']) - var trait_vals = []; - for (j = 0, len = trait_sample_data.length; j < len; j++) { - this_sample_data = trait_sample_data[j]; - trait_vals.push(this_sample_data.value); - } - root.box_data[0]['y'] = trait_vals - } - - if ($('input[name="transform"]').val() != ""){ - root.box_layout['yaxis']['title'] = "<b>" + js_data.unit_type + " (" + $('input[name="transform"]').val() + ")</b>" - } else { - root.box_layout['yaxis']['title'] = "<b>" + js_data.unit_type + "</b>" - } - - Plotly.newPlot('box_plot', root.box_data, root.box_layout, root.modebar_options) -} - updateViolinPlot = function() { var y_value_list = [] if (sampleLists.length > 1) { @@ -542,9 +509,6 @@ editDataChange = function() { if ($('#bar_chart').hasClass('js-plotly-plot')){ updateBarChart(); } - if ($('#box_plot').hasClass('js-plotly-plot')){ - update_box_plot(); - } if ($('#violin_plot').hasClass('js-plotly-plot')){ updateViolinPlot(); } @@ -1482,127 +1446,6 @@ $('.histogram_samples_group').change(function() { return updateHistogram(); }); -root.box_layout = { - xaxis: { - showline: true, - titlefont: { - family: "arial", - size: 20 - }, - tickfont: { - size: 16 - }, - }, - yaxis: { - title: "<b>" + js_data.unit_type +"</b>", - autorange: true, - showline: true, - titlefont: { - family: "arial", - size: 20 - }, - ticklen: 4, - tickfont: { - size: 16 - }, - tickformat: tickDigits, - zeroline: false, - automargin: true - }, - margin: { - l: 90, - r: 30, - t: 30, - b: 80 - } -}; -if (fullSampleLists.length > 1) { - root.box_layout['width'] = 600; - root.box_layout['height'] = 500; - var trace1 = { - y: getSampleVals(fullSampleLists[0]), - type: 'box', - name: sampleGroupList[0], - boxpoints: 'Outliers', - jitter: 0.5, - whiskerwidth: 0.2, - fillcolor: 'cls', - pointpos: -3, - marker: { - color: 'blue', - size: 3 - }, - line: { - width: 1 - } - } - var trace2 = { - y: getSampleVals(fullSampleLists[1]), - type: 'box', - name: sampleGroupList[1], - boxpoints: 'Outliers', - jitter: 0.5, - whiskerwidth: 0.2, - fillcolor: 'cls', - pointpos: -3, - marker: { - color: 'red', - size: 3 - }, - line: { - width: 1 - } - } - var trace3 = { - y: getSampleVals(fullSampleLists[2]), - type: 'box', - name: sampleGroupList[2], - boxpoints: 'Outliers', - jitter: 0.5, - whiskerwidth: 0.2, - fillcolor: 'cls', - pointpos: -3, - marker: { - color: 'green', - size: 3 - }, - line: { - width: 1 - } - } - root.box_data = [trace1, trace2, trace3] -} else { - root.box_layout['width'] = 300; - root.box_layout['height'] = 400; - root.box_data = [ - { - type: 'box', - y: getSampleVals(fullSampleLists[0]), - name: "<b>Trait " + js_data.trait_id + "</b>", - boxpoints: 'Outliers', - jitter: 0.5, - whiskerwidth: 0.2, - fillcolor: 'cls', - pointpos: -3, - marker: { - size: 3 - }, - line: { - width: 1 - } - } - ] -} - -box_obj = { - data: box_data, - layout: root.box_layout -} - -$('.box_plot_tab').click(function() { - update_box_plot(); -}); - // Violin Plot root.violin_layout = { diff --git a/wqflask/wqflask/templates/show_trait_statistics.html b/wqflask/wqflask/templates/show_trait_statistics.html index 865959b1..4e7dd17f 100644 --- a/wqflask/wqflask/templates/show_trait_statistics.html +++ b/wqflask/wqflask/templates/show_trait_statistics.html @@ -16,9 +16,6 @@ <a href="#probability_plot" class="prob_plot_tab" data-toggle="tab">Probability Plot</a> </li> <li> - <a href="#box_plot_tab" class="box_plot_tab" data-toggle="tab">Box Plot</a> - </li> - <li> <a href="#violin_plot_tab" class="violin_plot_tab" data-toggle="tab">Violin Plot</a> </li> </ul> @@ -103,11 +100,6 @@ </div> </div> </div> - <div class="tab-pane" id="box_plot_tab"> - <div id="box_plot_container"> - <div id="box_plot"></div> - </div> - </div> <div class="tab-pane" id="violin_plot_tab"> <div id="violin_plot_container"> <div id="violin_plot"></div> |