...
 
Commits (50)
......@@ -3,7 +3,7 @@
"samples" : {
"number" : 1,
"original_names" : [ "/some/file" ] ,
"original_names" : [ "/some/file_1" ] ,
"run_timestamp" : [ "2015-02-19 16:37:06" ] ,
"producer" : [ "vidjil dev 0cf35de (2015-02-17)" ] ,
"log" : [ "Some log" ],
......
......@@ -3,7 +3,7 @@
"samples" : {
"number" : 1,
"original_names" : [ "/some/file" ] ,
"original_names" : [ "/some/file_2" ] ,
"run_timestamp" : [ "2015-02-19 16:37:06" ] ,
"producer" : [ "vidjil dev 0cf35de (2015-02-17)" ] ,
"log" : [ "Some log" ],
......
This diff is collapsed.
......@@ -277,7 +277,7 @@ VidjilAutoComplete.prototype = {
if (uncached.length > 0) {
$.ajax({
type: "GET",
type: "POST",
data: {
keys: JSON.stringify(uncached)
},
......
/*
* Vidjil browser, main configuration file
* Vidjil client, main configuration file
* This file must be named 'js/conf.js' to be taken into account
* */
var config = {
/****************
* Static alerts
*/
// "alert": "Rescue server",
/****************
* External services
*/
/* Used for the 'align' script
* If this is not defined, the 'align' button is not available
*/
"cgi_address" : "https://db.vidjil.org/cgi/", // Public test server
// "cgi_address" : "http://127.0.1.1/cgi-bin/",
/* The following options control how the user may have access to .vidjil files.
/* Proxy config for IMGT querying */
/*
"proxy": "https://db.vidjil.org/vidjil/proxy/imgt",
*/
/* Used for the standalone http://app.vidjil.org/analyze page */
"segmenter_address" : "https://db.vidjil.org/vidjil/segmenter",
/* Do we have access to a CloneDB ? */
"clonedb": false,
/****************
/* Access to .vidjil files
* Any combination of 1), 2) and 3) should work
*/
......@@ -42,32 +65,19 @@ var config = {
// "autoload" : "data/Stanford-S22.vidjil",
// "autoload_analysis" : "data/Stanford-S22.analysis"
// Proxy config for IMGT querying
/*
"proxy": "https://db.vidjil.org/vidjil/proxy/imgt"
*/
/* Used for the standalone segmenter page */
"segmenter_address" : "https://db.vidjil.org/vidjil/segmenter",
/* Do we have access to a CloneDB ? */
"clonedb": false,
/* Load extra scripts */
/****************
* Load extra scripts
*/
/* "addons" : ["js/lib/important-lib.js", "js/myscript.js"], */
/****************
* Tips of the day
*/
"doc_address" : "doctips/",
"available_tips" : [
'T01', 'T02', 'T03',
'T30', 'T31', 'T32'
],
"available_tips" : [ ]
// [ 'T01', 'T02', 'T03', 'T30', 'T31', 'T32' ]
/****************
* Static alerts
*/
// "alert": "Rescue server",
}
......@@ -472,10 +472,6 @@ List.prototype = {
span_name.innerHTML = clone.getShortName();
span_name.title = clone.getNameAndCode();
span_name.style.color = clone.getColor();
//update star color
var span_star = div_elem.getElementsByClassName("starBox")[0];
span_star.style.color = this.m.tag[clone.getTag()].color
//update clone axis
var span_axis = div_elem.getElementsByClassName("axisBox")[0];
......
......@@ -1204,8 +1204,11 @@ changeAlleleNotation: function(alleleNotation) {
* @param {integer[]} - list - array of clone index
* */
updateElemStyle: function (list) {
this.updateModel();
for (var i = 0; i < this.view.length; i++) {
for (var i = 0; i < list.length; i++) {
this.clone(list[i]).updateColor();
this.clone(list[i]).updateCloneTagIcon();
}
for (i = 0; i < this.view.length; i++) {
this.view[i].updateElemStyle(list);
}
},
......
......@@ -249,7 +249,7 @@ webpage.
1. Install rvm
``` bash
\curl -sSL https://get.rvm.io | bash
curl -sSL https://get.rvm.io | sudo bash
```
Afterwards you may need to launch:
......@@ -311,7 +311,16 @@ webpage.
- `WATIR_MARIONETTE`
should be set to something evalued to `True` (*e.g. 1*)
if the tests must be launched on a recent Firefox version (\> 45)
2. If you have set a configuration file (browser/js/conf.js), you should remove it during the tests. The easiest way to do it is to launch these commands before and after the tests
``` bash
# before tests
mv browser/js/conf.js browser/js/conf.js.bak
# after tests
mv browser/js/conf.js.bak browser/js/conf.js
```
4. Headless mode
On servers without a X server the client tests can be launched in headless
......@@ -332,15 +341,6 @@ webpage.
yum install xvfb
```
If you have set a configuration file (browser/js/conf.js), you should remove it during the headless testing. The easiest way to do it is to launch these commands before and after the test
``` bash
# before tests
mv browser/js/conf.js browser/js/conf.js.bak
# after tests
mv browser/js/conf.js.bak browser/js/conf.js
```
Then the client tests can be launched in headless mode with:
``` bash
......
......@@ -97,6 +97,26 @@ queries, such as the compare patients).
Also some user characteristics are preloaded (groups and whether the person
is an admin), which also prevents may DB calls.
## Scheduler
The scheduler is handled by Web2py. Here we summarise the way it works.
Web2py has several workers. Its number is determined by the number of items
given after the `-K` parameter to `web2py.py`. One of them is called the
*ticker*. It is the master worker that will assign tasks to all the workers
(including itself).
At regular interval the worker signals that it is still alive (it is called
the heartbeat and can be customised in Vidjil through the
`SCHEDULER_HEARTBEAT` parameter in `defs.py`).
Every 5 heartbeats (it is hardcoded in web2py in `gluon/scheduler.py`) the
*ticker* will assign jobs. Each worker will also try to remove the dead
workers. In our case it often produces an “*Error cleaning up*” error in the
logs (see #3558).
When a job timeouts it is not killed (see #2213). In `gluon/scheduler.py` a
worker seems to be able to kill a process when the worker's state (and not the
task's state) is `STOP_TASK`.
# Tests
# Packaging
......
......@@ -268,7 +268,7 @@ Contact us (<mailto:contact@vidjil.org>) to have more information and help.
# Docker -- Troubleshooting
### Error "Can't connect to MySQL server on 'mysql'"
## Error "Can't connect to MySQL server on 'mysql'"
The mysql container is not fully launched. This can happen especially at the first launch.
You may relaunch the containers.
......@@ -298,6 +298,16 @@ you can look into:
```
If the database does not exist, mysql will display an error after logging in.
## Launching manually the backup
The backup should be handled by the backup container. If so, connect to this
container and run (for a full backup, otherwise add the `-i` option when
running `backup.sh`):
```sh
cd /usr/share/vidjil/server
sh backup.sh vidjil /mnt/backup >> /var/log/cron.log 2>&1
```
# Docker -- Updating a Docker installation
......
......@@ -37,7 +37,9 @@ This is an almost minimal `.vidjil` file, describing clones in one sample.
The `seg` element is optional: clones without `seg` elements will be shown on the grid with '?/?'.
The `_average_read_length` is also optional, but allows to plot GENSCAN-like plots more precisely than getting only the length of the sequence.
All other elements are required. The `reads.germlines` list can have only one element the case of data on a unique locus.
There is here one clone on the `TRG` locus with a designation `TRGV5*01 5/CC/0 TRGJ1*02`.
There is here one clone on the `TRG` locus with a designation (`name`) `TRGV5*01 5/CC/0 TRGJ1*02`.
Note that this `name` is just used to name the clone.
The actual values used for X- and Y- axis in the V/J grid plot are `seg.5.name` and `seg.3.name` fields.
Note that other elements could be added by some program (such as `tag`, to identify some clones,
or `clusters`, to further cluster some clones, see below).
......@@ -65,6 +67,7 @@ or `clusters`, to further cluster some clones, see below).
"clones": [
{
"id": "clone-001",
"name": "TRGV5*01 5/CC/0 TRGJ1*02",
"sequence": "CTCATACACCCAGGAGGTGGAGCTGGATATTGATACTACGAAATCTAATTGAAAATGATTCTGGGGTCTATTACTGTGCCACCTGGGCCTTATTATAAGAAACTCTTTGGCAGTGGAAC",
"reads" : [ 243241 ],
"_average_read_length": [ 119.3 ],
......@@ -85,7 +88,7 @@ or `clusters`, to further cluster some clones, see below).
## `.vidjil` file – several related samples
This a `.vidjil` file obtained by merging with `fuse.py` two `.vidjil` files corresponding to two samples.
Clones that have a same `id` are gathered (see 'What is a clone?', above).
Clones that are from different files but that have a same `id` are gathered (see 'What is a clone?', above).
It is the responsibility of the program generating the initial `.vidjil` files to choose these `id` to
do a correct gathering.
......
This diff is collapsed.
### Without distributions computing
!LAUNCH: python3 ../../fuse.py --output fused_with_distrib_step1.vidjil ../../../algo/tests/data/results-two-clones-1-2.vidjil ../../../algo/tests/data/results-two-clones-1-3.vidjil; cat fused_with_distrib_step1.vidjil
$ Get correct file name in original_names field
1:"/some/file_1"
1:"/some/file_2"
$ should not have distribution if not asked
0:distributions
### With distributions computing
#rm fused.vidjil
!LAUNCH: python3 ../../fuse.py --output fused_with_distrib_step2.vidjil -D ../../../algo/tests/data/results-two-clones-1-2.vidjil ../../../algo/tests/data/results-two-clones-1-3.vidjil; cat fused_with_distrib_step2.vidjil
$ Get correct file name in original_names field and distributions
2:"/some/file_1"
2:"/some/file_2"
$ should have two time 'distributions' (console log + into vidjil file)
2:distributions
$ Axis title should be present 122 times (2*60+1/file)
122:lenCDR3
\ No newline at end of file
#######################################
### Part without clones (--no-clone) ##
#######################################
!LAUNCH: python3 ../../fuse.py --no-clones --output fused_without_clones.vidjil ../../../algo/tests/data/results-two-clones-1-2.vidjil ../../../algo/tests/data/results-two-clones-1-3.vidjil; cat fused_without_clones.vidjil
$ Should not have field clones
0:"clones": \[
###################################
### Part with unsegmented clones ##
###################################
!LAUNCH: python3 ../../fuse.py -D --no-clones --output fused_with_unsegmented_clones_and_complete_distributions.vidjil ../../../algo/tests/data/results-two-clones-1-2.vidjil ../../../algo/tests/data/results-two-clones-1-3.vidjil; cat fused_with_unsegmented_clones_and_complete_distributions.vidjil
$ Get correct keys for distributions json content
1:"repertoires"
1:"keys"
1:"filters"
$ Get correct files names
r:/some/file_[12]
$ Correct number of entries for some keys (2*30 + 1 by repertoire)
122:"seg5"
122:"lenCDR3"
############################
### Part with real clones ##
############################
!LAUNCH: python3 ../../fuse.py -d germline,seg5 --no-clones --output fused_with_real_clones_and_complete_distributions.vidjil ../../../algo/tests/data/results_five_segmented_clones.vidjil ../../../algo/tests/data/results-two-clones-1-2.vidjil ../../../algo/tests/data/results-two-clones-1-3.vidjil; cat fused_with_real_clones_and_complete_distributions.vidjil
$ Get correct keys for distributions json content
1:"repertoires"
1:"keys"
1:"filters"
$ No clones
0:"id"
$ Correct number of entries for some keys (1 by repertoire)
3:"seg5"
$ Get correct files names
:sequence_file
$ Filenames (original_files and repname)
2:"sequence_file"
2:"/some/file_1"
2:"/some/file_2"
$ Case of an entire result (axes: germline, seg5)
lr1:"values": { "IGK": { .* "IGKV3-20\*01": \[ 1, 3898 \]
lr1:"values": { "IGK": { .* "IGKV1-39\*01": \[ 1, 5653 \]
lr1:"values": { "IGK": { .* "IGKV1-33\*01": \[ 1, 2597 \]
lr1:"values": { "IGK": { .* "IGKV4-1\*01": \[ 1, 2520 \]
lr1:"values": { "IGK": { .* "IGKV3-15\*01": \[ 1, 2502 \]
$ Case for the two other files (axes: germline, seg5)
lr1:"values": { "IGH": { "\?": \[ 2, 900 \]
lr1:"values": { "IGH": { "\?": \[ 2, 350 \]
####################################################
### Part with real clones, only some distribution ##
####################################################
!LAUNCH: python3 ../../fuse.py -d seg5,seg3 -d evalue -d unknow_AXIS --no-clones --output fused_only_some_axes.vidjil ../../../algo/tests/data/results_five_segmented_clones.vidjil ../../../algo/tests/data/results-two-clones-1-2.vidjil ../../../algo/tests/data/results-two-clones-1-3.vidjil; cat fused_only_some_axes.vidjil
$ Get correct keys for distributions json content
1:"repertoires"
1:"keys"
1:"filters"
$ No clones
0:"id"
$ Correct number of entries for some keys (1 by repertoire): seg5
3:"seg5"
$ Correct number of entries for some keys (1 by repertoire): unknow_AXIS (axis name)
3:"unknow_AXIS"
$ Correct number of entries for some keys (1 by repertoire): unknow_axis (axis returned value)
3:"unknow_axis"
$ Get correct files names
:sequence_file
$ Filenames (original_files and repname)
2:"sequence_file"
2:"/some/file_1"
2:"/some/file_2"