From 59741722374a124ea13251c2b9dabca1bcfe2859 Mon Sep 17 00:00:00 2001 From: eleeisb Date: Tue, 18 Jun 2019 11:52:17 -0700 Subject: [PATCH] oncogrid bugfix - converted data scores to int type --- static/js/visualizations/createOncogridPlot.js | 2 +- visualizations/oncogrid_data_views_v2.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/visualizations/createOncogridPlot.js b/static/js/visualizations/createOncogridPlot.js index a78273429..d73ab0842 100644 --- a/static/js/visualizations/createOncogridPlot.js +++ b/static/js/visualizations/createOncogridPlot.js @@ -69,7 +69,7 @@ define (['jquery', 'oncogridjs'], var donorFill = function (d) { var fieldname = d.fieldName; - var data_value = d.value ? d.value.toLowerCase() : 'not reported'; + var data_value = d.value ? (isNaN(d.value) ? d.value.toLowerCase() : d.value) : 'not reported'; if (data_value === 'not reported') return 'white'; var field_legend; diff --git a/visualizations/oncogrid_data_views_v2.py b/visualizations/oncogrid_data_views_v2.py index 90cd4a6c8..a1c498db4 100644 --- a/visualizations/oncogrid_data_views_v2.py +++ b/visualizations/oncogrid_data_views_v2.py @@ -132,7 +132,7 @@ def get_donor_data_list(bq_statement): age_at_diagnosis = row['f'][6]['v'] days_to_death = row['f'][7]['v'] data_category = row['f'][8]['v'] - score = row['f'][9]['v'] + score = int(row['f'][9]['v']) if case_barcode not in donors: donors[case_barcode] = { 'case_code': project_short_name + ' / ' + case_barcode,