Skip to content

Commit

Permalink
Added styling for genomikon parts and fixed SequenceDNA.asNewSequenceDNA
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandremeunier committed Nov 20, 2013
1 parent 465a25f commit 6ae8c93
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion data/data.js
Expand Up @@ -452,7 +452,7 @@ var cd = { // Common data, filled by loadBaseData()
"feature_types" : { //colours determined in main.css, .feat_misc
'misc' : { 'category':'General', 'annotation_row_offset':0 , 'name':'Misc' } ,
'note' : { 'category':'General', 'annotation_row_offset':0 , 'name':'Note' } ,
'genomicon_part' : { 'category':'General', 'is_main_type':1 , 'annotation_row_offset':0 , 'name':'Genomikon Part' } ,
'genomikon_part' : { 'category':'General', 'is_main_type':1 , 'annotation_row_offset':0 , 'name':'Genomikon Part' } ,

'alu_element' : { 'category':'DNA', 'is_main_type':1 , 'annotation_row_offset':1 , 'name':'Alu element' },
'cds' : { 'category':'DNA', 'is_main_type':1 , 'annotation_row_offset':1 , 'name':'Coding sequence' },
Expand Down
11 changes: 11 additions & 0 deletions public/main.css
Expand Up @@ -94,6 +94,12 @@
background-color:black;
color:white;
}
.designer_row_feature_genomikon_part {
height:34px;
background-color:#FFFBD0;
color:#9C2A99;
}




Expand Down Expand Up @@ -449,6 +455,11 @@ h1 {
left:55px;
}

.feat_genomikon_part {
background-color:#FF4848;
left: 35px;
}

.feat_cds {
background-color:#FF4848;
left:75px;
Expand Down
3 changes: 2 additions & 1 deletion util/sequence/sequences.js
Expand Up @@ -122,7 +122,8 @@ SequenceDNA.prototype.insert = function ( base , text , skip_feature_adjustment

SequenceDNA.prototype.asNewSequenceDNA = function ( start , stop ) {
var me = this ;
var ret = new SequenceDNA ( me.name , me.seq.substr ( start , stop-start+1 ) ) ;
//var ret = new SequenceDNA ( me.name , me.seq.substr ( start , stop-start+1 ) ) ; ALEX
var ret = new SequenceDNA ( me.name , me.seq.substr ( start-1 , stop-start+1 ) ) ;
$.each ( (me.features||[]) , function ( k , v ) {
if ( v['_range'][0].from > stop ) return ;
if ( v['_range'][v['_range'].length-1].to < start ) return ;
Expand Down
1 change: 1 addition & 0 deletions util/topDisplay/top_display.js
Expand Up @@ -67,6 +67,7 @@ TopDisplayDNA.prototype.get_feature_div = function ( v ) {
else if ( v['_type'].match(/^gene$/i) ) cl = 'gene' ;
else if ( v['_type'].match(/^CDS$/i) ) cl = 'cds' ;
else if ( v['_type'].match(/^note$/i) ) cl = 'note' ;
else if ( v['_type'].match(/^genomikon/i) ) cl = 'genomikon_part' ;

// Name
var name = '' ;
Expand Down

0 comments on commit 6ae8c93

Please sign in to comment.