Skip to content

Commit

Permalink
fix compress output in proksee and suffix mamangement in write_compre…
Browse files Browse the repository at this point in the history
…ssed_or_not fct
  • Loading branch information
JeanMainguy committed Nov 23, 2023
1 parent 1be04d6 commit 8ebbf4a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ppanggolin/formats/writeFlatGenomes.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ def mp_write_genomes_file(organism: Organism, output: Path, organisms_file: Path

# Write ProkSee data for the organism
write_proksee_organism(organism, output_file, features=['all'], genome_sequences=genome_sequences,
**{arg: kwargs[arg] for arg in kwargs.keys() & {'module_to_colors'}})
**{arg: kwargs[arg] for arg in kwargs.keys() & {'module_to_colors', 'compress'}})

if gff:
gff_outdir = output / "gff"
Expand Down
2 changes: 1 addition & 1 deletion ppanggolin/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def write_compressed_or_not(file_path: Path, compress: bool = False) -> Union[gz
:return: file-like object, compressed or not
"""
if compress:
return gzip.open(file_path.with_suffix(".gz"), mode="wt")
return gzip.open(file_path.parent / (file_path.name + '.gz'), mode="wt")
else:
return open(file_path, "w")

Expand Down

0 comments on commit 8ebbf4a

Please sign in to comment.