From 03bd10f4ac9e21e5c0b65185b7c94c5d825e7e52 Mon Sep 17 00:00:00 2001 From: Tammy DiPrima Date: Mon, 9 May 2016 15:14:47 -0400 Subject: [PATCH] Update tcgascope.js 1) Code was failing upon selecting LGG, and then executing the part that writes Diagnostic Images to the screen. This part of the code needed to be commented out, just as you do when doing openHealth.getText for GBM: // x = x.replace(/}/g, '},'); // x = '[' + x.slice(0, -2) + ']'; 2) Also, data itself is not well formed (lgg_patientids.json). I will create a pull request for that as well, shortly. Both changes need to be implemented in order for this to work properly. --- jobs/tcgascope.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/jobs/tcgascope.js b/jobs/tcgascope.js index 49dd529..4ed3116 100644 --- a/jobs/tcgascope.js +++ b/jobs/tcgascope.js @@ -611,8 +611,8 @@ openHealth.require('https://mathbiol.github.io/openHealth/tcga/tcga.js',function // check DxImages available already if(!openHealth.tcga.dt.lggDx){ openHealth.getText('https://sbu-bmi.github.io/appliedApps/lgg_patientids.json',function(x){ - x=x.replace(/}/g,'},') - x='['+x.slice(0,-2)+']' + //x=x.replace(/}/g,'},') + //x='['+x.slice(0,-2)+']' x=JSON.parse(x.replace(/\'/g,'"')) var y = {} // index of diagnostic images per patient x.map(function(xi){ @@ -999,8 +999,8 @@ openHealth.require('https://mathbiol.github.io/openHealth/tcga/tcga.js',function // check DxImages available already if(!openHealth.tcga.dt.lggDx){ openHealth.getText('https://sbu-bmi.github.io/appliedApps/lgg_patientids.json',function(x){ - x=x.replace(/}/g,'},') - x='['+x.slice(0,-2)+']' + //x=x.replace(/}/g,'},') + //x='['+x.slice(0,-2)+']' x=JSON.parse(x.replace(/\'/g,'"')) var y = {} // index of diagnostic images per patient x.map(function(xi){ @@ -1343,4 +1343,4 @@ openHealth.require('https://mathbiol.github.io/openHealth/tcga/tcga.js',function -}) \ No newline at end of file +})