Skip to content

Conversation

Copy link

Copilot AI commented Dec 16, 2025

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): Added zstandard.open() handling for .zst files in read_fasta() and read_fasta_seq(). Uses text mode 'rt' (unlike gzip's 'rb') as binary mode doesn't support readlines().

  • Archive tables (singlem/otu_table_collection.py, singlem/main.py, singlem/summariser.py): Auto-detect .zst files in archive table lists via extension check. Added add_zst_archive_otu_table_file() to StreamingOtuTableCollection.

  • File utilities: Updated extension stripping in FastaNameToSampleName.fasta_to_name(), genome handling in prodigal_biolib.py, and ORF checker to use zstdcat for .zst files.

  • Dependencies: Added zstandard = "*" to pixi.toml.

  • Tests: Added test_zst_good() and test_zst_archive_to_otu_table_conversion() with corresponding test data.

Example

# Both formats now work identically
read_fasta("sequences.fasta.gz")   # existing
read_fasta("sequences.fasta.zst")  # new

# Archive tables auto-detect format by extension
singlem summarise --input-gzip-archive-otu-table-list tables.txt  # handles both .gz and .zst

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
    • Triggering command: /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

This section details on the original issue you should resolve

<issue_title>zst format should be supported as an input format</issue_title>
<issue_description>like gz is.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 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.

Copilot AI and others added 3 commits December 16, 2025 03:36
Co-authored-by: wwood <15348+wwood@users.noreply.github.com>
Co-authored-by: wwood <15348+wwood@users.noreply.github.com>
…for zst

Co-authored-by: wwood <15348+wwood@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for zst format as an input format Add zst (Zstandard) compression support for input files Dec 16, 2025
Copilot AI requested a review from wwood December 16, 2025 03:45
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.

zst format should be supported as an input format

2 participants