Skip to content

Commit

Permalink
refactor: Gzip DIAMOND outs
Browse files Browse the repository at this point in the history
  • Loading branch information
jvfe committed Sep 28, 2023
1 parent 361c766 commit 0613ab9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions bin/annotate.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python
import gzip
import plyvel
import os
import time
Expand Down Expand Up @@ -42,7 +43,7 @@ def getAll(
):
check = True
query = None
with open(input, "r") as f:
with gzip.open(input, "rb") as f:
write(out, "Query", "Annotation")
for line in f:
ls = line.split(sep)
Expand Down Expand Up @@ -105,7 +106,7 @@ def getBestHits(
match = False
check = True
query = None
with open(input, "r") as f:
with gzip.open(input, "rb") as f:
write(out, "Query", "Annotation")
for line in f:
ls = line.split(sep)
Expand Down
2 changes: 1 addition & 1 deletion conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ process {

// Alignment
withName: DIAMOND_BLASTX {
ext.args = '--more-sensitive --top 3'
ext.args = '--more-sensitive --top 3 --compress 1'
publishDir = [
path: { "${params.outdir}/alignment/${meta.id}" },
mode: params.publish_dir_mode,
Expand Down

0 comments on commit 0613ab9

Please sign in to comment.