Nous avons procédé ce jeudi matin 08 avril 2021 à une MAJ de sécurité urgente. Nous sommes passé de la version 13.9.3 à la version 13.9.5 les releases notes correspondantes sont ici:
https://about.gitlab.com/releases/2021/03/17/security-release-gitlab-13-9-4-released/
https://about.gitlab.com/releases/2021/03/31/security-release-gitlab-13-10-1-released/

Commit 3c8ec369 authored by marc duez's avatar marc duez Committed by Mathieu Giraud

aligner_sequence : add muted substitution layer

parent a5f47128
......@@ -84,7 +84,6 @@ LAYERS = {
'style': { 'borderColor': "#444" },
'enabled': false
},
'substitution':
{
......@@ -94,6 +93,14 @@ LAYERS = {
'style': { 'color': "black", 'fontWeight': "bold", 'pointer-events': "none" },
'enabled': true
},
'muteSubstitution':
{
'className': "seq_layer_text",
'condition': function (s,c) { return s.is_aligned; },
'text': function (s,c) { return s.muteSubstitutionString(); },
'style': { 'color': "black", 'fontWeight': "bold", 'pointer-events': "none" },
'enabled': true
},
'insertion':
{
'className': "seq_layer_text",
......
......@@ -32,7 +32,7 @@ ALIGNER_MENU = {
'checkbox': [{
'id': 'mutation',
'text': 'Highlight mutations',
'layers': ["insertion", "substitution", "deletion"],
'layers': ["insertion", "muteSubstitution", "substitution", "deletion"],
'title': 'Highlight substitutions, insertions, and deletions',
'enabled': true
},{
......
......@@ -304,6 +304,7 @@ Sequence.prototype = {
var start = -1;
var stop = -1;
var cdr3aa = "";
this.AAlink = [];
var clone = this.m.clone(this.id);
if (!clone.hasSequence()) return "";
......@@ -334,7 +335,11 @@ Sequence.prototype = {
if (cdr3aa != "" && cdr3aa.indexOf("#") != -1)
end = start +3 *cdr3aa.indexOf("#") ;
while (i<end){
while (i<end){
code = seq[i]+seq[i+1]+seq[i+2];
this.AAlink[this.pos[i]] = {code : code, index : 0};
this.AAlink[this.pos[i+1]] = {code : code, index : 1};
this.AAlink[this.pos[i+2]] = {code : code, index : 2};
this.seqAAs[i+2] = '|';
i=i+3;
}
......@@ -346,7 +351,11 @@ Sequence.prototype = {
i = start2;
this.seqAAs[i-1] = '|';
while (i<end){
while (i<end){
code = seq[i]+seq[i+1]+seq[i+2];
this.AAlink[this.pos[i]] = {code : code, index : 0};
this.AAlink[this.pos[i+1]] = {code : code, index : 1};
this.AAlink[this.pos[i+2]] = {code : code, index : 2};
this.seqAAs[i+2] = '|';
i=i+3;
}
......@@ -453,6 +462,31 @@ Sequence.prototype = {
return result;
},
muteSubstitutionString: function(){
var seq,ref;
seq = this.seq;
ref = this.segmenter.sequence[this.segmenter.sequence_order[0]].seq;
var sub = [];
for (var a in seq)
if (seq[a] != ref[a] && seq[a] != SYMBOL_VOID && ref[a] != SYMBOL_VOID &&
seq[a] != '\u00A0' && ref[a] != '\u00A0'){
var code = this.AAlink[a].code;
var split = this.AAlink[a].code.split('');
split[this.AAlink[a].index] = ref[a];
var code2 = split.join('');
if (tableAAdefault(code.toUpperCase()) == tableAAdefault(code2.toUpperCase()))
sub[a] = "_";
else
sub[a] = '\u00A0';
}
else
sub[a] = '\u00A0';
return sub.join('');
},
substitutionString: function(){
var seq,ref;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment