Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
genotoul-bioinfo
D-GENIES
Commits
739f0e5c
Commit
739f0e5c
authored
Feb 06, 2018
by
Floreal Cabanettes
Browse files
Fix filename
parent
986ca4be
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/dgenies/lib/functions.py
View file @
739f0e5c
...
...
@@ -142,13 +142,14 @@ class Functions:
return
j1
.
email
@
staticmethod
def
send_fasta_ready
(
mailer
,
job_name
,
sample_name
,
compressed
=
False
,
path
=
"fasta-query"
,
status
=
"success"
):
def
send_fasta_ready
(
mailer
,
job_name
,
sample_name
,
compressed
=
False
,
path
=
"fasta-query"
,
status
=
"success"
,
ext
=
"fasta"
):
web_url
=
Functions
.
config
.
web_url
with
open
(
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
)),
"mail_templates"
,
"dl_fasta.html"
))
\
as
t_file
:
template
=
Template
(
t_file
.
read
())
message_html
=
template
.
render
(
job_name
=
job_name
,
status
=
status
,
url_base
=
web_url
,
sample_name
=
sample_name
,
compressed
=
compressed
,
path
=
path
)
sample_name
=
sample_name
,
compressed
=
compressed
,
path
=
path
,
ext
=
ext
)
message
=
"D-Genies
\n\n
"
\
"Job %s - Download fasta
\n\n
"
%
job_name
message
+=
"Query fasta file for job %s (query: %s) is ready to download.
\n
"
%
(
job_name
,
sample_name
)
...
...
src/dgenies/lib/mail_templates/dl_fasta.html
View file @
739f0e5c
...
...
@@ -29,7 +29,7 @@
<p>
Hi,
</p>
{% if status == "success" %}
<p>
Query fasta file for job {{ job_name }} (query: {{ sample_name }}) is ready to download.
<br/>
You can
<a
href=
"{{ url_base }}/{{ path }}/{{ job_name }}/{{ sample_name }}.
fasta
{% if compressed %}.gz{% endif %}"
>
click here
</a>
to download it.
</p>
You can
<a
href=
"{{ url_base }}/{{ path }}/{{ job_name }}/{{ sample_name }}.
{{ ext }}
{% if compressed %}.gz{% endif %}"
>
click here
</a>
to download it.
</p>
{% else %}
<p>
Build of query fasta file for job {{ job_name }} has failed. You can try again. If the problem persists, please contact the support.
</p>
{% endif %}
...
...
src/dgenies/lib/paf.py
View file @
739f0e5c
...
...
@@ -716,10 +716,13 @@ class Paf:
except
Exception
:
o_fasta
=
None
status
=
"fail"
query_fasta
=
"_._"
parts
=
os
.
path
.
basename
(
query_fasta
).
rsplit
(
"."
,
1
)
Functions
.
send_fasta_ready
(
mailer
=
self
.
mailer
,
job_name
=
self
.
id_job
,
sample_name
=
"as_reference_"
+
os
.
path
.
basename
(
query_fasta
).
rsplit
(
"."
,
1
)[
0
],
sample_name
=
"as_reference_"
+
parts
[
0
],
ext
=
parts
[
1
],
compressed
=
False
,
path
=
"download"
,
status
=
status
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment