Fixes for trackster visualizing single sample vcf and for getting colors of non-standard bases.

This commit is contained in:
Daniel Blankenberg
2013-04-18 15:39:32 -04:00
parent 461c9c3a18
commit 6c6e08a7ef
4 changed files with 11 additions and 4 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+8 -1
View File
@@ -1577,7 +1577,14 @@ extend(VariantPainter.prototype, Painter.prototype, {
height += this.divider_height;
if (this.data.length !== 0) {
// Sample data is separated by commas, so this computes # of samples:
height += (this.data[0][7].match(/,/g).length + 1) * this.get_row_height();
var comma_match = this.data[0][7].match(/,/g);
if ( comma_match === null ) {
comma_match = 1;
}
else {
comma_match = comma_match.length + 1;
}
height += ( comma_match * this.get_row_height() );
}
}
return height;
+1 -1
View File
@@ -1120,7 +1120,7 @@ var TracksterView = Backbone.View.extend({
},
get_base_color: function(base) {
return this.config.values[ base.toLowerCase() + '_color' ];
return this.config.values[ base.toLowerCase() + '_color' ] || this.config.values[ 'n_color' ];
}
});