Skip to content

Commit 1bd7712

Browse files
committed
readme updated
1 parent f5b321a commit 1bd7712

File tree

6 files changed

+164
-98
lines changed

6 files changed

+164
-98
lines changed

README.md

+85-29
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,98 @@
1-
# VDJviz: a lightweight immune repertoire browser
1+
# VDJviz: a versatile immune repertoire browser
22

3-
This is a [Play Framework](https://www.playframework.com/) version 2.2.4 application. To run the server execute
4-
```
5-
play run
6-
```
7-
from the project directory. A local server could be accessed at `localhost:9000`.
3+
VDJviz is a web-based graphical user interface application that allows browsing and analyzing immune repertoire sequencing ([RepSeq](http://onlinelibrary.wiley.com/doi/10.1111/j.1365-2567.2011.03527.x/epdf)) data. It can be used to visualize results of [MITCR](mitcr.milaboratory.com), [MIGEC](https://github.com/mikessh/migec), [MIXCR](mixcr.milaboratory.com) and [MIGMAP](https://github.com/mikessh/migmap) RepSeq processing software as well as popular [IMGT/HighV-QUEST](http://www.imgt.org/HighV-QUEST/login.action) and [ImmunoSEQ Analyzer](http://www.adaptivebiotech.com/immunoseq/analyzer) services. VDJviz can be installed and used as a local server, alternatively you can use an online demo version available at [vdjviz.milaboratory.com](http://vdjviz.milaboratory.com) which currently has an upload limit of 25 datasets each having size at most 10,000 clonotypes. The list of VDJviz features at a glance:
84

9-
This application uses [VDJtools](https://github.com/mikessh/vdjtools) API to compute various immune repertoire statistics and [D3.js](http://d3js.org/) library for interactive graphs.
5+
- Clonotype table browsing with V/D/J markup.
6+
- CDR3 pattern matching for a single sample and across multiple samples with flexible filters.
7+
- Spectratype, V-Spectratype, V-J usage and clonality analysis. Those can be compared side-by-side using the Compare panel.
8+
- Summary statistics and rarefaction for multiple samples.
9+
- Clonotype sharing across samples (many-to-many intersection) with flexible clonotype matching criteria.
10+
- Uploaded data sharing.
11+
12+
VDJviz uses [VDJtools API](https://github.com/mikessh/vdjtools) as a back-end. The software utilizes [Play framework](https://www.playframework.com/) for running the server instance and state-of-art web graphics libraries such as [D3js](http://d3js.org/) for visualization.
13+
14+
## Installation
15+
16+
The most straightforward way to install VDJviz as a local server is to download the [latest release package](https://github.com/antigenomics/vdjviz/releases/latest).
17+
18+
After downloading unzip the package wherever you want, but please avoid long paths and spaces (Windows version is especially sensitive to it).
19+
20+
You can find the server executable in ``bin/`` directory. To set up the server:
21+
22+
- Run `vdjviz.bat` file (Windows)
23+
- Run `bash vdjviz -Dconfig.file=application.conf` in your console (Linux/Mac OS)
24+
25+
Wait until the server is started, and go to ``localhost:9000`` URL in your browser to open VDJviz.
26+
The user generator is enabled in the config by default, so you can login with `vdjviz1@vdjviz.com` as an email and `vdjviz1` as password,
27+
28+
To stop application just press `Ctrl-C` at any time in console.
1029

1130
## Server configuration
1231

13-
Before using this application you will need to edit `application.conf` and `securesocial.conf` files in the `conf/` directory
32+
VDJviz server configuration can be performed by manually editing ``application.conf`` file in the ``bin/`` directory. The configuration file has the following fields:
33+
34+
- ``application.secret``
35+
The secret key used in cryptographic hash functions.
36+
37+
- ``uploadPath``
38+
Specifies the path that will be used by VDJviz to store user's uploaded files.
39+
You can use '~' symbol as a shortcut for user home directory.
40+
Default: `~/vdjviz/`
41+
42+
- ``maxFileSize``
43+
File size limit in kB
44+
Default: `0` (no limit)
45+
46+
- ``maxFilesCount``
47+
Limit on the number of uploaded files per user.
48+
Default: ``0`` (no limit)
49+
50+
- ``maxClonotypesCount``
51+
Limit on the number of clonotypes for each uploaded file.
52+
Default: ``0`` (no limit)
53+
54+
- ``allowSharing``
55+
Disable or enable sharing feature
56+
Default: ``true`` (enabled)
57+
58+
- ``maxSharedGroups``
59+
Maximum number of shared analyses per user.
60+
Default: ``0`` (no limit)
61+
62+
- ``deleteAfter``
63+
Time period after which uploaded files are deleted from the server, in hours.
64+
Default: ``0`` (never)
1465

15-
*application.conf*
16-
- `uploadPath`, points to the path that will be used to store user-uploaded files
17-
- `maxFileSize`, max allowed file size (set it to `0` to remove the limit)
18-
- `maxFilesCount`, max number of uploaded files per user (set it to `0` to remove the limit)
19-
- `maxClonotypesCount`, max number of rows in clonotype table (set it to `0` to remove the limit)
20-
- `deleteAfter`, time after the cache is deleted (disabled if set to `0`)
21-
- `application.secret`, the secret key used in cryptographic hash functions
22-
- `db.default.*`, database configuration
23-
- `smtp.*`, SMTP server configuration
66+
- ``applyNewLimitsToOldUsers``
67+
If set to ``true`` the server will automatically update limtis of all existing user accounts according to the ones specified in config. If set to ``false``, the limits will only be applied to newly created users.
68+
Default: ``true``
2469

25-
In fact the configuration file is used only when the application is creating user's account. After that server is guided by your account's limits for uploading files. This is done in order to be able to specify different limits for different accounts. So if you change the default configuration it will not affect already created accounts.
70+
- ``createDefaultUsers``
71+
Specifies whether the server will generate some default user accounts with predefined emails and passwords, setting their emails to ``<nameDefaultUser><id>@vdjviz.com`` (e.g. ``vdjviz1@vdjviz.com``) and passwords to ``<nameDefaultUser><id>`` (e.g. ``vdjviz1``). Set this option to ``false`` if you don't need this feature and prefer to use registration via SMTP.
72+
Default: ``true``
2673

27-
*securesocial.conf*
28-
- `smtp`, set up the SMTP server to send registration confirmation e-mails
74+
- ``nDefaultUsers``
75+
Number of default users to be created.
76+
Default: ``1``
2977

30-
## Database configuration
31-
The application uses [MySQL DBMS](http://www.mysql.com/) for handling metadata by default, if you want to change MySQL to another DBMS please see the [corresponding Play documentation section](https://www.playframework.com/documentation/2.2.4/JavaDatabase)
32-
- `db.default.user`, MySQL server username
33-
- `db.default.password`, MySQL server password
34-
<br>
78+
- ``nameDefaultUser``
79+
Default user name prefix.
80+
Default: `vdjviz`
3581

36-
After setting your login and password, create **vdjviz** database by typing `CREATE DATABASE vdjviz;` in MySQL console
82+
- ``db.default.url``
83+
Points to the path that will be used to store H2 database file.
84+
Default value: ``~/vdjviz/h2.db``
85+
Standalone version uses [H2 Database](http://www.h2database.com/html/main.html) for handling metadata by default, if you want to change H2 to another DBMS please see the corresponding Play documentation [section](https://www.playframework.com/documentation/2.2.4/JavaDatabase)
86+
You can also use this database to manually modify user limits.
3787

38-
##Dependency
88+
- ``allowRegistration``
89+
Show the Register button in login screen.
90+
Default: ``false``
3991

40-
- [milib](https://github.com/milaboratory/milib)
41-
- [vdjtools](https://github.com/mikessh/vdjtools)
92+
- ``allowChangePasswords``
93+
Show the Change Password button in login screen.
94+
Default: ``false``
4295

96+
- ``smtp.*``
97+
SMTP server configuration.
98+
If you don't want to use registration features, you can leave ``smtp.*`` fields empty and generate default users.

app/views/account/account.scala.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -2046,14 +2046,18 @@ var shared = false;
20462046
}
20472047

20482048
function openAnotherFiles() {
2049+
d3.select('.g3').remove();
2050+
d3.select('.heatMapBlockSelection').remove();
20492051
openProgress = 0;
20502052
step = steps.FILES_SELECT;
2051-
angular.copy(treshData, data);
2053+
//angular.copy(treshData, data);
20522054
}
20532055

20542056
function changeJoinParameters() {
2057+
d3.select('.g3').remove();
2058+
d3.select('.heatMapBlockSelection').remove();
20552059
step = steps.JOIN_RENDERING;
2056-
angular.copy(treshData, data);
2060+
//angular.copy(treshData, data);
20572061
}
20582062

20592063
function isJointRendering() {
@@ -2143,7 +2147,7 @@ var shared = false;
21432147
$scope.isJoinInformationStep = sampleCollectionFactory.isJoinInformationStep;
21442148
$scope.changeJoinParameters = sampleCollectionFactory.changeJoinParameters;
21452149
$scope.openAnotherFiles = function() {
2146-
$scope.selectedFiles.splice(0, $scope.selectedFiles.length);
2150+
//$scope.selectedFiles.splice(0, $scope.selectedFiles.length);
21472151
$scope.occurenceTreshold = 2;
21482152
sampleCollectionFactory.openAnotherFiles();
21492153
};

app/views/account/visualisation/sampleCollectionAnalysing.scala.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ <h3>Please refresh the page to reconnect</h3>
1515
<div ng-show="isJoinInformationStep()">
1616
<div class="panel panel-info separated">
1717
<div class="panel-body">
18-
<button class="btn btn-default sharp" ng-click="openAnotherFiles()">Open other files</button>
19-
<button class="btn btn-default sharp" ng-click="changeJoinParameters()">Change parameters</button>
18+
<button class="btn btn-default sharp" ng-click="$event.stopPropagation(); openAnotherFiles()">Open other files</button>
19+
<button class="btn btn-default sharp" ng-click="$event.stopPropagation(); changeJoinParameters()">Change parameters</button>
2020
</div>
2121
</div>
2222
</div>

conf/application.conf

+8-7
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,20 @@ application.secret="put your secret key here"
1212
# Specify the upload path for files
1313
# You can use '~' symbol for specifying path in your user's directory
1414
uploadPath = "~/vdjviz/"
15-
# Max allowed file size (no limit if set to `0`)
15+
# Max file size in kB, set it to 0 if you don't want to limit max file size, default 2048
1616
maxFileSize = 0
17-
# Max number of uploaded files per user (no limit if set to `0`)
17+
# Max files count, set it to 0, if you don't want to limit max files count, default 25
1818
maxFilesCount = 0
19-
# Max number of rows in clonotype table (no limit if set to `0`)
19+
# Max clonotypes count in each file, set it to 0, if you don't want to limit max clonotypes count, default 10000
2020
maxClonotypesCount = 0
21-
# Allow Sharing feature
22-
allowSharing = true
23-
# Max number of shared groups per user (no limit if set to `0`)
21+
# Max shared groups for account, set it to 0, if you don't want to limit max shared groups count, default 5
2422
maxSharedGroups = 0
25-
# Time after the files is deleted from the server (disabled if set to `0`)
23+
# When files must be deleted, integer value in hours, set it to 0, if you don't want to delete cache files, default 24
2624
deleteAfter = 0
2725

26+
# Allow Sharing feature
27+
allowSharing = true
28+
2829
# Apply new limits to old users
2930
# If set to ``true`` the server will automatically update limtis of all existing user accounts according to the ones specified in config.
3031
# If set to ``false``, the limits will only be applied to newly created users.

public/javascripts/visualisation.js

+62-47
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,8 @@ function rarefactionPlot(data, param) {
473473

474474
function joinHeapMap(data) {
475475
"use strict";
476+
var heatMap;
477+
var blockPage;
476478
var margin = { top: 0, right: 10, bottom: 50, left: 170 },
477479
col_number = data.colLabel.length,
478480
row_number = data.rowLabel.length,
@@ -514,6 +516,19 @@ function joinHeapMap(data) {
514516
}
515517

516518
var svg = place.append("svg")
519+
.on("selectstart", function() {
520+
blockPage.style('visibility', 'visible');
521+
//heatMap.style("visibility", "hidden");
522+
})
523+
.on("click", function() {
524+
blockPage.style('visibility', 'hidden');
525+
//heatMap.style("visibility", "visible");
526+
})
527+
.on("mouseup", function() {
528+
blockPage.style('visibility', 'hidden');
529+
//heatMap.style("visibility", "visible");
530+
})
531+
.attr("class", "noselection")
517532
.attr("width", "100%")
518533
.attr("height", height + margin.top + margin.bottom + 300)
519534
.append("g")
@@ -550,45 +565,13 @@ function joinHeapMap(data) {
550565
.attr("x", function(d, i) { return legendElementWidth * i; })
551566
.attr("y", (cellSize*2));
552567

553-
var rowLabels = svg.append("g")
554-
.selectAll(".rowLabelg")
555-
.data(rowLabel)
556-
.enter()
557-
.append("text")
558-
.html(function (d) {
559-
return d.cdr3aa_tspan;
560-
})
561-
.attr("x", 0)
562-
.attr("y", function (d, i) { return i * cellSize + 200; })
563-
.style("text-anchor", "end")
564-
.attr("transform", "translate(-6," + cellSize / 1.5 + ")")
565-
.attr("class", function (d,i) { return "rowLabel mono r"+i;} )
566-
;
567-
568-
569-
var colLabels = svg.append("g")
570-
.selectAll(".colLabelg")
571-
.data(colLabel)
572-
.enter()
573-
.append("text")
574-
.text(function (d) { return d; })
575-
.attr("x", -200)
576-
.attr("y", function (d, i) { return i * cellSize; })
577-
.style("text-anchor", "left")
578-
.attr("transform", "translate("+cellSize/2 + ",-6) rotate(-90)")
579-
.attr("class", function (d,i) { return "colLabel mono c"+i;} )
580-
;
581-
582568

583569
function stopEvent() {
584-
d3.event.preventDefault();
585-
d3.event.sourceEvent.stopPropagation();
586570
d3.event.preventDefault();
587571
d3.event.stopPropagation();
588-
d3.event.stopImmediatePropagation();
589572
}
590573

591-
var heatMap = svg
574+
heatMap = svg
592575
.append("g")
593576
.attr("class", "cell_heat_map g3")
594577
.selectAll(".heatmap")
@@ -637,6 +620,34 @@ function joinHeapMap(data) {
637620
d3.select("#heatmap_tooltip").classed("hidden", true);
638621
});
639622

623+
var rowLabels = svg.append("g")
624+
.selectAll(".rowLabelg")
625+
.data(rowLabel)
626+
.enter()
627+
.append("text")
628+
.html(function (d) {
629+
return d.cdr3aa_tspan;
630+
})
631+
.attr("x", 0)
632+
.attr("y", function (d, i) { return i * cellSize + 200; })
633+
.style("text-anchor", "end")
634+
.attr("transform", "translate(-6," + cellSize / 1.5 + ")")
635+
.attr("class", function (d,i) { return "rowLabel mono r"+i;} )
636+
;
637+
638+
639+
var colLabels = svg.append("g")
640+
.selectAll(".colLabelg")
641+
.data(colLabel)
642+
.enter()
643+
.append("text")
644+
.text(function (d) { return d; })
645+
.attr("x", -200)
646+
.attr("y", function (d, i) { return i * cellSize; })
647+
.style("text-anchor", "left")
648+
.attr("transform", "translate("+cellSize/2 + ",-6) rotate(-90)")
649+
.attr("class", function (d,i) { return "colLabel mono c"+i;} )
650+
;
640651

641652
var numCol = (colLabel.length + 2) * cellSize;
642653

@@ -668,20 +679,24 @@ function joinHeapMap(data) {
668679
.attr("class", function (d,i) { return "numLabel mono r"+i;} )
669680
;
670681

671-
var sa=d3.select(".g3")
672-
.on("mousedown", function() {
673-
return null;
674-
})
675-
.on("mousemove", function() {
676-
return null;
677-
})
678-
.on("mouseup", function() {
679-
return null;
680-
})
681-
.on("mouseout", function() {
682-
return null;
683-
})
684-
;
682+
d3.select('.heatMapBlockSelection').remove();
683+
684+
setTimeout(function() {
685+
var st = d3.select('.g3').node().getBoundingClientRect();
686+
687+
blockPage = d3.select('body')
688+
.append('div')
689+
.attr('class', 'heatMapBlockSelection')
690+
.style('visibility', 'hidden')
691+
.style('left', st.left + 'px')
692+
.style('top', st.top + 'px')
693+
.style('height', st.height + 'px')
694+
.style('width', st.width + 'px')
695+
.style('position', 'absolute')
696+
.style('opacity', '0.2');
697+
}, 10);
698+
699+
685700

686701
function cdrTransform(cdr) {
687702
var cdr3aa = cdr.cdr3aa,

public/stylesheets/main.css

-10
Original file line numberDiff line numberDiff line change
@@ -506,16 +506,6 @@ text.mono {
506506
fill: black!important;
507507
}
508508

509-
svg .cell_heat_map {
510-
-webkit-user-select: none;
511-
-moz-user-select: none;
512-
-ms-user-select: none;
513-
user-select: none;
514-
}
515-
svg .cell_heat_map::selection {
516-
background: none;
517-
}
518-
519509
.loading {
520510
position: relative;
521511
margin-left: auto;

0 commit comments

Comments
 (0)