Commit 25e19c47 authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

merge -- 'user_log', a great new feature by Ryan and Marc

parents 0fdc65de 5e947adb
......@@ -181,6 +181,8 @@ distrib:
mkdir -p $$dir; \
cp "$$file" $$dir; \
done
make -C release/$(DIST_DIR)/doc html
cd release && tar cvzf $(RELEASE_ARCHIVE) $(DIST_DIR) \
&& rm -rf $(DIST_DIR)
......
......@@ -44,7 +44,7 @@ can manage, upload, analyze and annotate their runs directly on the web applicai
- Stable releases can be downloaded from http://bioinfo.lille.inria.fr/vidjil
- Development code is under [[algo/]]
- Documentation: [[doc/algo.org]]
- Documentation, compilation and installation instructions: [[doc/algo.org]]
** The web application
......
......@@ -8,4 +8,9 @@
.sp_legend2 {
opacity: 0.8;
}
.sp_system {
top : 0;
left : -0.5em;
}
\ No newline at end of file
......@@ -2005,3 +2005,7 @@ label.highlight_label {
pointer-events: none;
opacity: 0.4;
}
.db_table td.pre-line {
white-space: pre-line;
}
......@@ -242,7 +242,12 @@
<div id="logo" style="float: right;" onclick="console.log({'type': 'popup', 'default':'welcome'})">Vidjil <span class='logo'>(beta)</span></div>
<div class="menu" style="float: right"> <a href="help" target="_blank">help</a></div>
<div class="menu" style="float: right" onmouseover="showSelector('helpSelector');"> help
<div id="helpSelector" class="selector"><div>
<a class="buttonSelector" href="help" target="_blank">help</a>
<a class="buttonSelector getHelp" onclick="report.sendMail()">get support</a>
</div></div>
</div>
<div style="float: right" class="menu" onmouseover="showSelector('paletteSelector');"> palette
<div id="paletteSelector" class="selector"><div>
......@@ -251,6 +256,7 @@
<a class="buttonSelector" onclick="changeStyle('solarizeD')">dark</a>
</div></div>
</div>
<div style="float: right; margin: 5px;" id='live-ajax'></div>
<div id="fps" style="float: right; display: none"> </div>
<div id="header_messages" class="message_container header"></div>
......
......@@ -709,7 +709,8 @@ Builder.prototype = {
var div = document.createElement('div');
div.className = "info_line locus_line";
var span2 ;
var span2 = document.createElement('span')
span2.className = "locus_row"
var keys = 0 ;
var key_list = this.m.system_available;
......@@ -721,14 +722,15 @@ Builder.prototype = {
key = key_list[k];
// Are we at the start of a new group of locus ?
if (key.substring(0,2) != last_key.substring(0,2) || keys == 0) {
if (key.substring(0,2) != last_key.substring(0,2)) {
if (keys > 0)
if (keys > 0) {
// Flush existing span2
div.appendChild(span2)
span2 = document.createElement('span')
span2.className = "locus_row"
}
span2 = document.createElement('span')
span2.className = "locus_row"
}
last_key = key ;
......
......@@ -307,11 +307,14 @@ function igBlastPost(data, system) {
igBlastInput["germline_db_V"] = "IG_DB/imgt.Homo_sapiens.V.f.orf.p";
igBlastInput["germline_db_D"] = "IG_DB/imgt.Homo_sapiens.D.f.orf";
igBlastInput["germline_db_J"] = "IG_DB/imgt.Homo_sapiens.J.f.orf";
}
if (system[0] == "T") {
igBlastInput["SEARCH_TYPE"] = "IG";
igBlastInput["seqtype"] = "Ig";
} else if (system[0] == "T") {
igBlastInput["germline_db_V"] = "IG_DB/imgt.TR.Homo_sapiens.V.f.orf.p";
igBlastInput["germline_db_D"] = "IG_DB/imgt.TR.Homo_sapiens.D.f.orf";
igBlastInput["germline_db_J"] = "IG_DB/imgt.TR.Homo_sapiens.J.f.orf.p";
igBlastInput["SEARCH_TYPE"] = "TCR";
igBlastInput["seqtype"] = "TCR";
}
......
......@@ -981,6 +981,19 @@ Database.prototype = {
return args
},
ajax_indicator_start: function() {
var tgt = $('#live-ajax');
tgt.empty();
$('<img/>', {src: 'images/ajax-loader.gif'}).appendTo($('<div/>', {class: 'active-container'}).appendTo(tgt));
$('body').css('cursor', 'wait');
},
ajax_indicator_stop: function() {
var tgt = $('#live-ajax');
tgt.empty();
$('body').css('cursor', 'default');
},
// Log functions, to server
// 'quiet' is set to true to avoid infinite loops with timeouts
log : function (lvl, msg) { this.request('default/logger', {'lvl': lvl, 'msg': msg}, true) },
......
......@@ -591,6 +591,26 @@ Report.prototype = {
$('<td/>', {'class': 'log-message', 'text': log_line['message']}).appendTo(line);
return line;
sendMail : function() {
var clones = ''
var list = m.getSelected()
if (list.length>0){
clones += "Let's look on the following clones: \n" // + list.length
for (var i=0; i<list.length; i++){
clones += m.clone(list[i]).getFasta() + '\n'
}
}/**/
var link = "mailto:team@vidjil.org"
+ "?cc="
+ "&subject=" + escape("[Vidjil] Question")
+ "&body=" + escape("Dear Vidjil team,"
+ "\n\nI have a question on the results I obtain on the following sample: " + window.location.href
+ "\n\n" + clones)
;
window.location.href = link;
}
}
......
......@@ -97,6 +97,14 @@ try {
console.log("=== main.js finished ===");
$(document).ajaxStart(function () {
//show ajax indicator
db.ajax_indicator_start('loading data.. please wait..');
}).ajaxStop(function () {
//hide ajax indicator
db.ajax_indicator_stop();
});
(function worker(){
db.loadNotifications();
setTimeout(worker, 300000);
......
......@@ -29,7 +29,7 @@ class TestMultilocus < BrowserTest
end
def test_00_germline
assert ($b.div(:id => 'info').span(:class => 'systemBoxNameMenu').text.include? 'TRA'), 'missing system TRA'
assert ($b.div(:id => 'info').span(:class => 'systemBoxNameMenu', :index => 1).text.include? 'TRA'), 'missing system TRA'
end
def test_00_legend_scatterplot
......@@ -197,6 +197,19 @@ class TestMultilocus < BrowserTest
$b.window(:title => "analysis-example").use
$b.window(:title => "IMGT/V-QUEST").close
$b.clone_in_scatterplot('26').click
$b.span(:id => "toIMGT" ).click
assert ( $b.window(:title => "IMGT/V-QUEST").exists? ) , ">> fail opening second IMGT "
$b.window(:title => "IMGT/V-QUEST").use do
assert ($b.text.include? "Number of analysed sequences: 1"), ">> fail IMGT analysis"
assert ($b.text.include? "Homsap IGHV3-9*01"), ">> IMGT expected V not found"
assert ($b.text.include? "Homsap IGHJ6*02"), ">> IMGT expected J not found"
end
$b.window(:title => "analysis-example").use
end
end
......@@ -214,6 +227,19 @@ class TestMultilocus < BrowserTest
assert ($b.text.include? "TRBV28*01"), ">> igblast: expected V not found"
assert ($b.text.include? "TRBJ2-5*01"), ">> igblast: expected Js not found"
end
$b.window(:title => "IgBLAST Search Results").close
$b.window(:title => "analysis-example").use
$b.clone_in_scatterplot('26').click
$b.span(:id => 'toIgBlast').click
assert ( $b.window(:title => "IgBLAST Search Results").exists? ) , ">> fail opening second igblast "
$b.window(:title => "IgBLAST Search Results").use do
assert ($b.text.include? "Length=318"), ">> igblast: was not launched on the correct sequence"
assert ($b.text.include? "IGHV3-9*01"), ">> igblast: expected V not found"
assert ($b.text.include? "IGHJ6*02"), ">> igblast: expected Js not found"
end
$b.window(:title => "analysis-example").use
end
......
......@@ -510,18 +510,15 @@
"id": "TGTGCTAGCAGTTTATGGGACAGGGGAGACACCCAGTACT"
},
{
"germline": "TRB",
"name": "TRBV29*01 -5/5/-0 TRBD2*01 -3/2/-6 TRBJ2-5*01",
"sequence": "YYGGGYYACGYAYAGCGGYGYTTYYCCTYTYTGYTYTGCYAAAYAACYYYYTGTGYCTYTGTGCYGYGTYCCCGGYCTGGGGGTGYYCCYGYCTTTGGGCYGGYCYGGCYCYGTGTYYGYYTYYAATGTYCYYCCYAG",
"germline": "IGH",
"name": "IGHV3-9*01 7/CCCGGA/17 IGHJ6*02",
"sequence": "GGAGTCGGGGGAGGCTTGGTACAGCCTGGCAGGTCCCTGAGACTCTCCTGTGCAGCCTCTGGATTCACCTTTGATGATTATGCCATGCACTGGGTCCGGCAAGCTCCAGGGAAGGGCCTGGAGTGGGTCTCAGGTATTAGTTGGAATAGTGGTAGCATAGGCTATGCGGACTCTGTGAAGGGCCGATTCACCATCTCCAGAGACAACGCCAAGAACTCCCTGTATCTGCAAATGAACAGTCTGAGAGCTGAGGACACGGCCTTGTATTACTGTGCACCCGGAGGTATGGACGTCTGGGGCCAAGGGACCCTGGTCACC",
"top": 14,
"seg": {
"5end": 92,
"4end": 108,
"5start": 0,
"3": "TRBJ2-5*01",
"5": "TRBV29*01",
"4": "TRBD2*01",
"4start": 98,
"3": "IGHJ6*02",
"5": "IGHV3-9*01",
"3start": 111
},
"reads": [
......@@ -533,7 +530,7 @@
"2": 331
}
],
"id": "TGTGCYGYGTYCCCGGYCTGGGGGTGYYCCYGT"
"id": "CGCCAAGAACTCCCTGTATCTGCAAATG"
},
{
"germline": "TRB",
......
*Packaging Vidjil into a Debian Package
**Requirements
- The release version of Vidjil you wish to package
- Knowledge of debian packaging
In this documentation we will not go over all the specifics of creating a
debian package. You can find the required information here:
https://wiki.debian.org/HowToPackageForDebian
and https://wiki.debian.org/Packaging/Intro?action=show&redirect=IntroDebianPackaging
** Creating the orig archive
Debian packages use an orig archive to map a changelog. In order to create
this archive for vidjil you must:
Extract the release archive you wish to package:
$ tar -xf vidjil-<version>.tgz
$ cd vidjil-<version>/
Download the necessary germlines and data files:
$ mkdir browser # if it doesn't exist
$ make germline
$ make data
Archive the folder as follows:
Note that debian uses a different version annotation than vidjil, so it is
likely that you will need to determine the correct annotation to use.
$ cd ..
$ tar -cvzf vidjil_<debian-version-annotation>.orig.tar.gz
Make a standard compliant debian folder for the package (see documentation
in Requirements section) and add the 'missing-sources' file (this is a
workaround to the issue that Lintian cannot find the sources for some of the
binaries included) with the following content:
$ /browser/cgi/align.cgi
$ /browser/cgi/similarity.cgi
$ /algo/tools/similarity
Commit the source changes (for some reason the dep.mk files need to be
committed):
$ dpkg-source --commit
Build the package just like any debian package:
$ debuild -us -uc
You're done! You can now install the debian package with:
$ sudo ``dpkg -i path/to/package
......@@ -103,6 +103,7 @@ def showlog():
line["user"] = ""
line["mes"] = " ".join(tmp[6:])
line["mes"] = line["mes"].replace(" at ", "\nat ")
line["mes"] = vidjil_utils.log_links(line["mes"])
if not parsed:
......
......@@ -185,6 +185,10 @@ class VidjilAuth(Auth):
if key not in self.permissions:
self.permissions[key] = {}
query = db(self.vidjil_accessible_query(PermissionEnum.read.value, object_of_action)).select(self.db[object_of_action].ALL)
for row in query:
self.permissions[key][row.id] = False
query = db(self.vidjil_accessible_query(action, object_of_action)).select(self.db[object_of_action].ALL)
for row in query:
self.permissions[key][row.id] = True
......
......@@ -45,7 +45,7 @@
<td> {{=line["type"]}} </td>
<td> {{=XML(line["file"])}} </td>
{{ pass }}
<td> {{=XML(line["mes"])}} </td>
<td class="pre-line"> {{=XML(line["mes"])}} </td>
</tr>
{{pass}}
</table>
......
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