Attention une mise à jour du service Gitlab va être effectuée le mardi 30 novembre entre 17h30 et 18h00. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes. Cette mise à jour intermédiaire en version 14.0.12 nous permettra de rapidement pouvoir mettre à votre disposition une version plus récente.

Commit ffed3af0 authored by Thonier Florian's avatar Thonier Florian
Browse files

export: change simple space by specific javascript code

update tests
parent 7e8c5549
Pipeline #7204 failed with stages
in 2 minutes and 15 seconds
......@@ -715,25 +715,20 @@ Report.prototype = {
if (this.m.clone(cloneID).hasSeg('5', '3')){
var seg = this.m.clone(cloneID).seg
var seq = this.m.clone(cloneID).getSequence()
var seqV = seq.substring(0, seg['5'].stop + 1)
var seqN = seq.substring(seg['5'].stop + 1, seg['3'].start)
var seqJ = seq.substring(seg['3'].start)
var seqV = seq.substring(0, seg['5'].stop + 1) + "\u00A0"
var seqN = "\u00A0" + seq.substring(seg['5'].stop + 1, seg['3'].start) + "\u00A0"
var seqJ = "\u00A0" + seq.substring(seg['3'].start)
$('<span/>', {'class': 'v_gene', 'text': seqV}).appendTo(sequence);
$('<span/>', {'text': " "}).appendTo(sequence);
if (this.m.clone(cloneID).getGene("4") != "undefined D"){
var seqN1 = seq.substring(seg['5'].stop + 1, seg['4'].start)
var seqD = seq.substring(seg['4'].start , seg['4'].stop + 1)
var seqN2 = seq.substring(seg['4'].stop + 1, seg['3'].start)
var seqN1 = "\u00A0" + seq.substring(seg['5'].stop + 1, seg['4'].start) + "\u00A0"
var seqD = "\u00A0" +seq.substring(seg['4'].start , seg['4'].stop + 1) + "\u00A0"
var seqN2 = "\u00A0" +seq.substring(seg['4'].stop + 1, seg['3'].start) + "\u00A0"
$('<span/>', {'class': 'n_gene', 'text': seqN1}).appendTo(sequence);
$('<span/>', {'text': " "}).appendTo(sequence);
$('<span/>', {'class': 'd_gene', 'text': seqD}).appendTo(sequence);
$('<span/>', {'text': " "}).appendTo(sequence);
$('<span/>', {'class': 'n_gene', 'text': seqN2}).appendTo(sequence);
$('<span/>', {'text': " "}).appendTo(sequence);
} else {
$('<span/>', {'class': 'n_gene', 'text': seqN}).appendTo(sequence);
$('<span/>', {'text': " "}).appendTo(sequence);
}
$('<span/>', {'class': 'j_gene', 'text': seqJ}).appendTo(sequence);
}
......
......@@ -322,13 +322,13 @@ class TestMultilocus < BrowserTest
n_gene = $b.element(:class => 'n_gene', :index => 0)
# This is true with a 0-based index, which is the case for the vidjil
# JSON version used
assert (n_gene.text == 'A'), ("N1 should be A, it is '" + n_gene.text + "'")
assert (n_gene.text == ' A '), ("N1 should be A, it is '" + n_gene.text + "'")
n_gene = $b.element(:class => 'n_gene', :index => 1)
assert (n_gene.text == ''), ("N2 should be empty, it is '" + n_gene.text + "'")
assert($b.element(:class => 'j_gene').text == 'YYGYYTYYAATGTYCYYCCYAG')
assert($b.element(:class => 'v_gene').text == 'YTYTYAYTGGTGCTGGYACCTYAAAYGYYTGYCCTYTGGGYYAGGCYCYYAYACGYAYAYCTYTYCYCTGCTGYATTGGCTYYCCYYAYYYTTTGYCTYTGTGCYGYGTYTGCGGYYTYTGYAAYCGCYYTTTTGYYAGYAGCCGGCY')
assert($b.element(:class => 'j_gene').text == ' YYGYYTYYAATGTYCYYCCYAG')
assert($b.element(:class => 'v_gene').text == 'YTYTYAYTGGTGCTGGYACCTYAAAYGYYTGYCCTYTGGGYYAGGCYCYYAYACGYAYAYCTYTYCYCTGCTGYATTGGCTYYCCYYAYYYTTTGYCTYTGTGCYGYGTYTGCGGYYTYTGYAAYCGCYYTTTTGYYAGYAGCCGGCY ')
end
$b.window(:title => "analysis-example.vidjil – helloworld").close
......
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