aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wqflask/wqflask/static/new/javascript/biodalliance.js22
-rw-r--r--wqflask/wqflask/templates/marker_regression_gn1.html22
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",
+ }
+ }]
+ });
</script>