From 202e1547b4e9a894673dbd0e7fb89a45650c0ed3 Mon Sep 17 00:00:00 2001 From: christian Date: Wed, 10 Aug 2016 16:51:37 +0200 Subject: Rewrite BD sources; use computed QTL data in BD --- .../wqflask/static/new/javascript/biodalliance.js | 22 ++++++++++------------ .../wqflask/templates/marker_regression_gn1.html | 22 ++++++++++++++++++++++ 2 files changed, 32 insertions(+), 12 deletions(-) diff --git a/wqflask/wqflask/static/new/javascript/biodalliance.js b/wqflask/wqflask/static/new/javascript/biodalliance.js index 3af223f3..b6808d8a 100644 --- a/wqflask/wqflask/static/new/javascript/biodalliance.js +++ b/wqflask/wqflask/static/new/javascript/biodalliance.js @@ -4,6 +4,7 @@ var BD = {}; BD.browser = null; BD.data = {}; +BD.sources = []; var getChrLen = function(chr) { return js_data[chr * 1]; @@ -50,21 +51,18 @@ BD.putData = function(data) { } }; +BD.putSource = function(source) { + BD.sources.push(source); +}; + BD.openBrowser = function() { console.log("opening browser"); if (!BD.browser) { - BD.browser = BD.createBrowser(BD.data.chr, 0, BD.data.length * 1000000, BD.data.species, - [{name: 'Genome', - twoBitURI: 'http://www.biodalliance.org/datasets/GRCm38/mm10.2bit', - desc: 'Mouse reference genome build GRCm38', - tier_type: 'sequence', - provides_entrypoints: true}, - {name: 'QTL', - tier_type: 'qtl', - uri: 'http://localhost:8880/static/qtl/lod2.csv', - stylesheet_uri: "http://localhost:8880/stylesheets/qtl-stylesheet.xml" - }] - ); + BD.browser = BD.createBrowser(BD.data.chr, + 0, + BD.data.length * 1000000, + BD.data.species, + BD.sources); } else { BD.browser.setLocation(BD.data.chr, 0, BD.data.length * 1000000); } diff --git a/wqflask/wqflask/templates/marker_regression_gn1.html b/wqflask/wqflask/templates/marker_regression_gn1.html index e83a8cec..47e282cf 100644 --- a/wqflask/wqflask/templates/marker_regression_gn1.html +++ b/wqflask/wqflask/templates/marker_regression_gn1.html @@ -362,6 +362,28 @@ createTable(); } }); + + BD.putSource({name: 'Genome', + twoBitURI: 'http://www.biodalliance.org/datasets/GRCm38/mm10.2bit', + desc: 'Mouse reference genome build GRCm38', + tier_type: 'sequence', + provides_entrypoints: true + }); + BD.putSource({name: 'QTL', + tier_type: 'qtl', + uri: 'http://localhost:5003/generated_text/{{csv_filename}}', + style: [{ + type: 'default', + style: { + glyph: "LINEPLOT", + MIN: 0, + MAX: 2.5, + HEIGHT: 120, + STEPS: 500, + COLOR1: "blue", + } + }] + }); -- cgit v1.2.3