Add zst (Zstandard) compression support for input files #276
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Zstandard compressed files (
.zst) are now supported as input format, matching existing gzip (.gz) functionality.Changes
Core I/O (
singlem/biolib_lite/seq_io.py): Addedzstandard.open()handling for.zstfiles inread_fasta()andread_fasta_seq(). Uses text mode'rt'(unlike gzip's'rb') as binary mode doesn't supportreadlines().Archive tables (
singlem/otu_table_collection.py,singlem/main.py,singlem/summariser.py): Auto-detect.zstfiles in archive table lists via extension check. Addedadd_zst_archive_otu_table_file()toStreamingOtuTableCollection.File utilities: Updated extension stripping in
FastaNameToSampleName.fasta_to_name(), genome handling inprodigal_biolib.py, and ORF checker to usezstdcatfor.zstfiles.Dependencies: Added
zstandard = "*"topixi.toml.Tests: Added
test_zst_good()andtest_zst_archive_to_otu_table_conversion()with corresponding test data.Example
No new CLI arguments needed—format detection is automatic via file extension.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
pixi.sh/usr/bin/curl curl -fsSL REDACTED e/git(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.