Merge back with central.

This commit is contained in:
Dannon Baker
2013-04-11 11:57:50 -04:00
2 changed files with 12 additions and 21 deletions
+2 -1
View File
@@ -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"""
+10 -20
View File
@@ -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,18 +251,17 @@ 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;
this.col.end = metadata.endCol - 1;
}
// check
if(this.col.chrom == null)
if(this.col.chrom === null)
return;
// get dataset id
if (typeof options.model.attributes.id === "undefined")
console.log("TabularButtonTrackster : Dataset identification is missing.");
@@ -291,7 +290,7 @@ var TabularButtonTrackster = Backbone.View.extend(
btn_viz_show: function (e)
{
// check
if(this.col.chrom == null)
if(this.col.chrom === null)
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() {