Skip to content

Commit

Permalink
Fix query fasta that is not compressed when asked
Browse files Browse the repository at this point in the history
  • Loading branch information
pbordron committed Mar 30, 2022
1 parent 1629fa6 commit c606965
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
### Bugfix

- Fix some Jinja2 requirement constraints
- Fix exported query fasta file that was not compressed when asked.

## 1.3.0 (2022-03-01)

Expand Down
2 changes: 1 addition & 1 deletion src/dgenies/lib/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def compress(filename):
while os.path.exists(compressed):
compressed = "%s/%d_%s" % (file_path, n, basename)
n += 1
with open(filename, "rb") as infile, xopen(compressed, "wb") as outfile:
with open(filename, "rb") as infile, xopen(compressed, mode="wb", format="gz") as outfile:
shutil.copyfileobj(infile, outfile)
os.remove(filename)
return compressed
Expand Down
2 changes: 1 addition & 1 deletion src/dgenies/static/js/dgenies.result.export.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ dgenies.result.export.ask_export_fasta = function () {
.css("margin", "12px 12px 20px 0");
let body = $("<p>");
body.append(icon);
body.append("Compression is recommanded on slow connections. Download Gzip file?");
body.append("Compression is recommended on slow connections. Download Gzip file?");
dialog.append(body);
dialog.dialog({
resizable: false,
Expand Down
2 changes: 1 addition & 1 deletion src/dgenies/static/js/dgenies.result.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c606965

Please sign in to comment.