Commit 6a7e6af6 authored by Floreal Cabanettes's avatar Floreal Cabanettes
Browse files

Update documentation, Implements #131

parent ef31e883
How to run a job? How to run a job?
----------------- -----------------
![illustrating](/static/images/D-GENIES-run.png) ### New alignment mode
### (1) Main menu Launch a new mapping between two fasta files and dot plot it.
{% if mode == "webserver" %}
![illustrating](/static/images/D-GENIES-run_na.png)
{% else %}
![illustrating](/static/images/D-GENIES-run-standalone_na.png)
{% endif %}
{% set puce=1 %}
#### ({{puce}}) Main menu
You just need to click on the *run* tab of the main menu, and follow the fields. All results will be stored in the result menu. You just need to click on the *run* tab of the main menu, and follow the fields. All results will be stored in the result menu.
### (2) Updatable job name {% set puce=puce+1 %}
#### ({{puce}}) Updatable job name
Required field Required field
An unique job name is set automatically. You could change it. Note that is a job already exists with this name, it will be automatically renamed. An unique job name is set automatically. You could change it. Note that is a job already exists with this name, it will be automatically renamed.
### (3) User email {% set puce=puce+1 %}
{% if mode == "webserver" %}
#### ({{puce}}) User email
Required field Required field
Please fill your email. When the mail will be finished, you will receive a mail to inform you that your job is done. Also, some features in the result page will send you a mail to this address. Please fill your email. When the mail will be finished, you will receive a mail to inform you that your job is done. Also, some features in the result page will send you a mail to this address.
### (4) Target file {% set puce=puce+1 %}
{% endif %}
#### ({{puce}}) Target fasta
Required field Required field
...@@ -31,10 +51,78 @@ Allowed extensions: fa, fasta, fna, fa.gz, fasta.gz, fna.gz ...@@ -31,10 +51,78 @@ Allowed extensions: fa, fasta, fna, fa.gz, fasta.gz, fna.gz
Max file size: ###size### (###size_unc### once uncompressed, ###size_ava### in all-vs-all mode) Max file size: ###size### (###size_unc### once uncompressed, ###size_ava### in all-vs-all mode)
### (5) Query file {% set puce=puce+1 %}
#### ({{puce}}) Query fasta
Optional field
Works like the target fasta. If not given, target file will be mapped to itself, in all-vs-all mode.
Max file size: ###size### (###size_unc### once uncompressed)
{% set puce=puce+1 %}
### Plot alignment mode
Dot plot an existing alignment file.
{% if mode == "webserver" %}
![illustrating](/static/images/D-GENIES-run_pa.png)
{% else %}
![illustrating](/static/images/D-GENIES-run-standalone_pa.png)
{% endif %}
{% if mode == "webserver" %}
{% set puce=4 %}
{% else %}
{% set puce=3 %}
{% endif %}
For numbers from 1 to {% if mode == "webserver" %}3{% else %}2{% endif %}, see previous section.
#### ({{puce}}) Alignment file
Required field (except if backup file is filled, see bellow)
An alignment file in PAF or MAF format.
Allowed extensions: paf, maf
With the selector at the left, you can choose giving a local file or an URL. For a local file, select it by clicking on the button at the right.
{% set puce=puce+1 %}
#### ({{puce}}) Target file
Required field (except if backup file is filled, see bellow)
Could be the fasta file for the target or the corresponding index file.
To improve bandwidth and computation time, we recommend to use the index file. This file format is described [here](/documentation/formats#index-file). You can use [our tool](https://raw.githubusercontent.com/genotoul-bioinfo/dgenies/v{{version}}/src/dgenies/bin/index.py) to build it.
Allowed extensions:
Fasta: fa, fasta, fna, fa.gz, fasta.gz, fna.gz
Index: idx
With the selector at the left, you can choose giving a local file or an URL. For a local file, select it by clicking on the button at the right.
{% set puce=puce+1 %}
#### ({{puce}}) Query file
Optional field
Could be the fasta file for the query or the corresponding index file.
Works like the target file.
{% set puce=puce+1 %}
#### ({{puce}}) Backup file
Optional field Optional field
Works like the target file. If not given, target file will be mapped to itself, in all-vs-all mode. If you download backup from a previous job, you can add it here to restore the job. In this case, don't fill previous fields, only this one is required.
Max file size: ###size### (###size_unc### once uncompressed) With the selector at the left, you can choose giving a local file or an URL. For a local file, select it by clicking on the button at the right.
\ No newline at end of file \ No newline at end of file
How to run a job?
-----------------
![illustrating](/static/images/D-GENIES-run-standalone.png)
### (1) Main menu
You just need to click on the *run* tab of the main menu, and follow the fields. All results will be stored in the result menu.
### (2) Updatable job name
Required field
An unique job name is set automatically. You could change it. Note that is a job already exists with this name, it will be automatically renamed.
### (3) Target file
Required field
With the selector at the left, you can choose giving a local file or an URL. For a local file, select it by clicking on the button at the right.
File must be in fasta format. We recommend using gzipped files to preserve bandwidth and faster job submission.
Allowed extensions: fa, fasta, fna, fa.gz, fasta.gz, fna.gz
Max file size: ###size### (###size_unc### once uncompressed, ###size_ava### in all-vs-all mode)
### (4) Query file
Optional field
Works like the target file. If not given, target file will be mapped to itself, in all-vs-all mode.
Max file size: ###size### (###size_unc### once uncompressed)
\ No newline at end of file
...@@ -29,11 +29,12 @@ To come back to the initial view, click on the icon at the top right of the dotp ...@@ -29,11 +29,12 @@ To come back to the initial view, click on the icon at the top right of the dotp
Several export options are available: Several export options are available:
* Export as image (SVG or PNG - suitable for publication). The zoom will be ignored. All other changes (see below) will be kept at export. * Export as image (SVG or PNG - suitable for publication). All changes applied to the dot plot will be kept on export, including zoom.
* Download the PAF file generated by minimap2. * Download the PAF file generated by minimap2.
* Download the association table: TSV file with, for each contig of the query, the associated chromosome of the target with position of the match. * Download the association table: TSV file with, for each contig of the query, the associated chromosome of the target with position of the match.
* List of contigs of the query which have no match with any chromosome of the target. * List of contigs of the query which have no match with any chromosome of the target.
* List of chromosomes of the target which have no match with any contig of the query. * List of chromosomes of the target which have no match with any contig of the query.
* Export the job as a tar file which can be re-uploaded in the run form to restore the job ([see here](/documentation/run#plot-alignment-mode)).
And, if you sorted the dotplot: And, if you sorted the dotplot:
...@@ -42,10 +43,13 @@ And, if you sorted the dotplot: ...@@ -42,10 +43,13 @@ And, if you sorted the dotplot:
### (4) Color scheme ### (4) Color scheme
You can change the default color scheme. Two other color schemes are available: You can change the default color scheme. Five other color schemes are available:
* Colorblind colors: colors more distinguishable for colorblind people. * Colorblind colors: colors more distinguishable for colorblind people.
* Black & White: for black & white printing. * Black & White: for black & white printing.
* Reverse default: default colors but colors with the lower mapping identity have the lower brightness.
* Reverse Coloblind: same as reverse default, but with colorblind colors.
* All black: all in black.
To change color scheme, click on the legend. To change color scheme, click on the legend.
...@@ -57,32 +61,32 @@ You can remove too small matches by moving the slider. By increments, it remove ...@@ -57,32 +61,32 @@ You can remove too small matches by moving the slider. By increments, it remove
Set the minimal identity to show. All matches with a lower identity value will be hidden. Set the minimal identity to show. All matches with a lower identity value will be hidden.
### Strong precision ### (7) Strong precision
By default, we add a line cap to each line to ease visualization, but it makes limit of the matches less precise. You can remove them by checking the box. When checked, the strong precision check-box reduces match borders removing small matches from the graphical panel, often showing gaps between non contiguous matches.
### (7) Line breadth ### (8) Line breadth
Change the match lines thickness with the slider. Change the match lines thickness with the slider.
### (8) Chrom. border breadth ### (9) Chrom. border breadth
Change the visibility of the chromosomes borders with the slider. Change the visibility of the chromosomes borders with the slider.
### (9) Sort ### (10) Sort
You can sort (or unsort) contigs by clicking on the button. Contigs of the query will be sorted according to the reference. It will take few seconds. You can sort (or unsort) contigs by clicking on the button. Contigs of the query will be sorted according to the reference. It will take few seconds.
How it works? For each contig of the query we search the region which have the biggest matches with the target and store these coordinates. Then, we sort contigs by their associated coordinates. How it works? For each contig of the query we search the region which have the biggest matches with the target and store these coordinates. Then, we sort contigs by their associated coordinates.
### (10) Hide noise ### (11) Hide noise
To remove noise. A match is considered noise if its size is small and its size frequency is quite high. Therefore we group matches by size bins, the number of bins corresponds to one tenth of the number of alignments, the bins are scanned in increasing size order to find the most represented one and from this one the one corresponding to one percent of its count is searched. All the alignments in bins smaller in size than this one are considered noise. It will take few seconds. To remove noise. A match is considered noise if its size is small and its size frequency is quite high. Therefore we group matches by size bins, the number of bins corresponds to one tenth of the number of alignments, the bins are scanned in increasing size order to find the most represented one and from this one the one corresponding to one percent of its count is searched. All the alignments in bins smaller in size than this one are considered noise. It will take few seconds.
### (11) Similarity summary ### (12) Similarity summary
To ease dot plot comparison, clicking the summary button generates a bar graph presenting the reference similarity profile, meaning the sums of the projections of the matches on the reference per similarity category divided by the total reference length. This graph is produced after sorting the query along the reference, removing included matches and noise filtering; result not shown on the graphical panel. It gives a realistic view of the overall reference and query similarity which is often not very precisely measured through visual inspection. To ease dot plot comparison, clicking the summary button generates a bar graph presenting the reference similarity profile, meaning the sums of the projections of the matches on the reference per similarity category divided by the total reference length. This graph is produced after sorting the query along the reference, removing included matches and noise filtering; result not shown on the graphical panel. It gives a realistic view of the overall reference and query similarity which is often not very precisely measured through visual inspection.
### (12) Delete job ### (13) Delete job
By clicking on the button, your job will be definitively removed on the server. Be careful, this operation can not be undone! By clicking on the button, your job will be definitively removed on the server. Be careful, this operation can not be undone!
\ No newline at end of file
...@@ -28,6 +28,10 @@ ...@@ -28,6 +28,10 @@
color: #ffffff; color: #ffffff;
font-weight: bold; font-weight: bold;
} }
h4 {
font-weight: bold !important;
margin-top: 25px !important;
}
{% if toc %} {% if toc %}
#body { #body {
width: calc(100% - 300px); width: calc(100% - 300px);
......
...@@ -28,6 +28,24 @@ if MODE == "webserver": ...@@ -28,6 +28,24 @@ if MODE == "webserver":
from peewee import DoesNotExist from peewee import DoesNotExist
def get_latest_version():
latest = ""
win32 = ""
try:
call = requests.get("https://api.github.com/repos/genotoul-bioinfo/dgenies/releases/latest")
if call.ok:
release = json.loads(call.content.decode("utf-8"))
if "tag_name" in release:
latest = release["tag_name"][1:]
for asset in release["assets"]:
if asset["name"].endswith(".exe"):
win32 = asset["browser_download_url"]
break
except ConnectionError:
pass
return latest, win32
@app.context_processor @app.context_processor
def global_templates_variables(): def global_templates_variables():
return { return {
...@@ -325,9 +343,12 @@ def get_file(file, gzip=False): # pragma: no cover ...@@ -325,9 +343,12 @@ def get_file(file, gzip=False): # pragma: no cover
@app.route("/documentation/run", methods=['GET']) @app.route("/documentation/run", methods=['GET'])
def documentation_run(): def documentation_run():
with open(os.path.join(app_folder, "md", "doc_run.md" if MODE == "webserver" else "doc_run_standalone.md"), "r", version = get_latest_version()[0]
encoding='utf-8') as install_instr: with open(os.path.join(app_folder, "md", "doc_run.md"), "r", encoding='utf-8') as install_instr:
content = install_instr.read() content = install_instr.read()
env = Environment()
template = env.from_string(content)
content = template.render(mode=MODE, version=version)
md = Markdown(extensions=[TocExtension(baselevel=1)]) md = Markdown(extensions=[TocExtension(baselevel=1)])
max_upload_file_size = config_reader.max_upload_file_size max_upload_file_size = config_reader.max_upload_file_size
if max_upload_file_size == -1: if max_upload_file_size == -1:
...@@ -386,20 +407,7 @@ def documentation_dotplot(): ...@@ -386,20 +407,7 @@ def documentation_dotplot():
@app.route("/install", methods=['GET']) @app.route("/install", methods=['GET'])
def install(): def install():
latest = "" latest, win32 = get_latest_version()
win32 = ""
try:
call = requests.get("https://api.github.com/repos/genotoul-bioinfo/dgenies/releases/latest")
if call.ok:
release = json.loads(call.content.decode("utf-8"))
if "tag_name" in release:
latest = release["tag_name"][1:]
for asset in release["assets"]:
if asset["name"].endswith(".exe"):
win32 = asset["browser_download_url"]
break
except ConnectionError:
pass
with open(os.path.join(app_folder, "md", "INSTALL.md"), "r", encoding='utf-8') as install_instr: with open(os.path.join(app_folder, "md", "INSTALL.md"), "r", encoding='utf-8') as install_instr:
content = install_instr.read() content = install_instr.read()
......
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