From 28792f5e529af05b6cef96012cf703b3a9eeb3e3 Mon Sep 17 00:00:00 2001 From: Aysam Guerler Date: Wed, 10 Apr 2013 16:50:54 -0400 Subject: [PATCH 1/3] Enhance button for trackster visualization in data display viewer --- static/scripts/mvc/data.js | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/static/scripts/mvc/data.js b/static/scripts/mvc/data.js index 34c7d20b0a3..7a3e62d0a2c 100644 --- a/static/scripts/mvc/data.js +++ b/static/scripts/mvc/data.js @@ -112,7 +112,7 @@ var TabularDatasetChunkedView = Backbone.View.extend({ initialize: function(options) { // load trackster button - (new TabularButtonTrackster(options)).render(); + (new TabularButtonTracksterView(options)).render(); }, render: function() @@ -226,13 +226,13 @@ var TabularDatasetChunkedView = Backbone.View.extend({ }); // button for trackster visualization -var TabularButtonTrackster = Backbone.View.extend( +var TabularButtonTracksterView = Backbone.View.extend( { // gene region columns col: { chrom : null, start : null, - end : null, + end : null }, // url for trackster @@ -251,8 +251,7 @@ var TabularButtonTrackster = Backbone.View.extend( var metadata = options.model.attributes.metadata.attributes; if (typeof metadata.chromCol === "undefined" || typeof metadata.startCol === "undefined" || typeof metadata.endCol === "undefined") console.log("TabularButtonTrackster : Metadata for column identification is missing."); - else - { + else { // read in columns this.col.chrom = metadata.chromCol - 1; this.col.start = metadata.startCol - 1; @@ -260,7 +259,7 @@ var TabularButtonTrackster = Backbone.View.extend( } // check - if(this.col.chrom == null) + if(this.col.chrom) return; // get dataset id @@ -291,7 +290,7 @@ var TabularButtonTrackster = Backbone.View.extend( btn_viz_show: function (e) { // check - if(this.col.chrom == null) + if(this.col.chrom) return; // get selected data line @@ -301,7 +300,7 @@ var TabularButtonTrackster = Backbone.View.extend( var chrom = row.children().eq(this.col.chrom).html(); var start = row.children().eq(this.col.start).html(); var end = row.children().eq(this.col.end).html(); - if (chrom != "" && start != "" && end != "") + if (chrom !== "" && start !== "" && end !== "") { // get target gene region var btn_viz_pars = { @@ -325,21 +324,12 @@ var TabularButtonTrackster = Backbone.View.extend( }, // hide button - btn_viz_hide: function (e) + btn_viz_hide: function () { // hide button from screen $('#btn_viz').hide(); }, - - // create action - create_trackster_action_new : function (vis_url, dataset_params, dbkey) - { - return function () { - window.parent.location.href = vis_url + "/trackster?" + $.param(dataset_params); - } - }, - // create action create_trackster_action : function (vis_url, dataset_params, dbkey) { return function() { From 959a335b67dc1f13ce1524eb0f87b56f7717702b Mon Sep 17 00:00:00 2001 From: Aysam Guerler Date: Wed, 10 Apr 2013 17:30:27 -0400 Subject: [PATCH 2/3] Enhance button for trackster visualization in data display viewer --- static/scripts/mvc/data.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/static/scripts/mvc/data.js b/static/scripts/mvc/data.js index 7a3e62d0a2c..2735b75452b 100644 --- a/static/scripts/mvc/data.js +++ b/static/scripts/mvc/data.js @@ -257,11 +257,11 @@ var TabularButtonTracksterView = Backbone.View.extend( this.col.start = metadata.startCol - 1; this.col.end = metadata.endCol - 1; } - + // check - if(this.col.chrom) + if(this.col.chrom === null) return; - + // get dataset id if (typeof options.model.attributes.id === "undefined") console.log("TabularButtonTrackster : Dataset identification is missing."); @@ -290,7 +290,7 @@ var TabularButtonTracksterView = Backbone.View.extend( btn_viz_show: function (e) { // check - if(this.col.chrom) + if(this.col.chrom === null) return; // get selected data line From 56ace3827090a3e9b715cb8b0623871b3930dd78 Mon Sep 17 00:00:00 2001 From: Jeremy Goecks Date: Thu, 11 Apr 2013 08:44:42 -0400 Subject: [PATCH 3/3] Whitespace fixes for Vcf datatype. --- lib/galaxy/datatypes/tabular.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/datatypes/tabular.py b/lib/galaxy/datatypes/tabular.py index 316338a2a7c..9c710052000 100644 --- a/lib/galaxy/datatypes/tabular.py +++ b/lib/galaxy/datatypes/tabular.py @@ -546,12 +546,13 @@ class Vcf( Tabular ): def sniff( self, filename ): headers = get_headers( filename, '\n', count=1 ) return headers[0][0].startswith("##fileformat=VCF") + def display_peek( self, dataset ): """Returns formated html of peek""" return Tabular.make_html_table( self, dataset, column_names=self.column_names ) def get_track_type( self ): - return "VcfTrack", {"data": "tabix", "index": "summary_tree"} + return "VcfTrack", { "data": "tabix", "index": "summary_tree" } class Eland( Tabular ): """Support for the export.txt.gz file used by Illumina's ELANDv2e aligner"""