Skip to content

Commit

Permalink
MAINT: Parameterize getSamplePlotData metad. field
Browse files Browse the repository at this point in the history
This will make it easier to unit-test this function, due to #85
restrictions
  • Loading branch information
fedarko committed Apr 26, 2019
1 parent 83e8135 commit 64c80d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rankratioviz/support_files/js/display.js
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,8 @@ define(["./feature_computation", "vega", "vega-embed"], function(
* getSamplePlotData().
*/
exportData() {
var tsv = this.getSamplePlotData();
var currMetadataField = this.samplePlotView.signal("xAxis");
var tsv = this.getSamplePlotData(currMetadataField);
if (tsv.length > 0) {
RRVDisplay.downloadDataURI(
"rrv_sample_plot_data.tsv",
Expand All @@ -622,8 +623,7 @@ define(["./feature_computation", "vega", "vega-embed"], function(
* due to either no log ratio being selected or the current log ratio
* being NaN for all samples -- then this just returns an empty string.
*/
getSamplePlotData() {
var currMetadataField = this.samplePlotView.signal("xAxis");
getSamplePlotData(currMetadataField) {
var outputTSV = "Sample ID\tLog Ratio";
var uniqueMetadata = true;
if (
Expand Down

0 comments on commit 64c80d8

Please sign in to comment.