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

Update doc + fix paf validator + improve noise removing

parent 906e927e
......@@ -85,8 +85,16 @@ def parse_args():
help="Id (name) of the job to delete from the gallery")
gallery_del.add_argument("-n", "--name", type=str, required=False,
help="Name of the job shown in the gallery")
gallery_del.add_argument("--remove-pict", help="Clear crons", type=bool, const=True, nargs="?", required=False,
default=False)
gallery_del.add_argument("--remove-pict", help="Remove picture file", action='store_const',
const=True, default=False)
# Run message
inforun = subparsers.add_parser("inforun", help="Set a message at the top of the run page")
inforun.set_defaults(which="inforun")
inforun.add_argument("-m", "--message", type=str, required=False, help="Message to add")
inforun.add_argument("-c", "--clear", help="Remove message", action='store_const',
const=True, default=False)
#inforun.add_argument("")
args = parser.parse_args()
......
......@@ -1431,7 +1431,7 @@ class JobManager:
:param status: new status
:type status: str (20)
"""
if self.config.analytics_enabled:
if self.config.analytics_enabled and MODE == "webserver":
from dgenies.database import Analytics
with Job.connect():
analytic = Analytics.get(Analytics.id_job == self.id_job)
......
......@@ -264,7 +264,7 @@ class Paf:
max_index = counts.index(max_value)
limit_index = -1
for i in range(max_index, len(counts)):
if counts[i] < max_value / 100:
if counts[i] < max_value / 50:
limit_index = i
break
if limit_index > -1:
......
......@@ -12,6 +12,7 @@ Returns True if file is valid, else False
from Bio import AlignIO
import shutil, os
import traceback
def paf(in_file):
......@@ -28,9 +29,9 @@ def paf(in_file):
n = 0
for line in aln:
parts = line.rstrip().split("\t")
if len(parts) < 12:
if len(parts) < 11:
return False
for i in (1, 2, 3, 6, 7, 8, 9, 10, 11):
for i in (1, 2, 3, 6, 7, 8, 9, 10):
if not parts[i].isdigit():
return False
if parts[4] not in ("+", "-"):
......@@ -39,9 +40,10 @@ def paf(in_file):
if n == 1000:
break
except:
traceback.print_exc()
return False
else:
return True
return True
def _filter_maf(in_file):
......
......@@ -63,6 +63,14 @@ Max file size: {{size}} ({{size_unc}} once uncompressed)
{% set puce=puce+1 %}
#### ({{puce}}) Aligner
You can choose aligner to use for mapping. By default, it's minimap2.
If your job fails due to memory limit reached, you can try mashmap. It uses less resources. But is only suitable for highly similar genomes as it only detect matches with more than 75% of identity.
{% set puce=puce+1 %}
### Plot alignment mode
Dot plot an existing alignment file.
......
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