Skip to content

gzip-compression functionality for reading and writing FASTQ and FASTA files.#107

Merged
ssnn-airr merged 8 commits intoimmcantation:masterfrom
ivandatasci:gzip_fastx2
Jan 14, 2026
Merged

gzip-compression functionality for reading and writing FASTQ and FASTA files.#107
ssnn-airr merged 8 commits intoimmcantation:masterfrom
ivandatasci:gzip_fastx2

Conversation

@ivandatasci
Copy link
Copy Markdown
Contributor

This pull request adds gzip-compression functionality using the standard python library gzip. Compression is executed (or not) according to file name suffix.

  1. Unit tests
    Unit tests and toy files have been added.

  2. Help strings
    All help strings have been updated to reflect this new capability.

  3. Compression control of autogenerated file names
    The default format continues to be uncompressed FASTQ. That means that programmes (like PairSeq.py) writing files to user-defined directories would still write to .fastq unless the user also specifies --gzip-output, in which case the files will be compressed (.fastq.gz)

  4. Consistent suffix abbreviation
    If an input files is .fastq (or .fastq.gz), its auto-generated suffix will be .fastq (or .fastq.gz).
    If an input files is .fq (or .fq.gz), its auto-generated suffix will be .fq (or .fq.gz).

bin/AlignSets.py Outdated
# For explicit output files, check if gzip is needed
if out_args.get('gzip_output', False) and not out_file.endswith('.gz'):
out_file = out_file + '.gz'
from presto.IO import openFile
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency, I will move this and other imports to the top of the files.

@ssnn-airr ssnn-airr merged commit 07f3032 into immcantation:master Jan 14, 2026
2 checks passed
Copy link
Copy Markdown
Contributor

@ssnn-airr ssnn-airr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merged. I made some changes and added some tests to IO and ci.yml, and removed not needed tests and files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants