Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support xz-compressed files #46

Open
joverlee521 opened this issue Aug 24, 2022 · 2 comments
Open

Support xz-compressed files #46

joverlee521 opened this issue Aug 24, 2022 · 2 comments

Comments

@joverlee521
Copy link

Hello @lmdu,

I am planning to use pyfastx within Nextstrain's Augur to support a new data curation command and it would be really helpful to be able to support xz-compressed files. Would you be open to extending pyfastx to support xz-compressed files?

Groups working with large files are using xz to save space because xz has a better compression ratio than gzip. For example, Nextstrain hosts a file of all GenBank SARS-CoV-2 genomes that is xz-compressed.

With the condition that the file was originally compressed in multiple short blocks, it is possible to randomly access xz-compressed files. python-xz is an example of this in pure Python and xz-random-access is an example of this in C.

Thank you!

@lmdu
Copy link
Owner

lmdu commented Nov 24, 2022

Thank you! In the future, I will consider to add support for parsing xz compressed FASTA/Q files.

@corneliusroemer
Copy link
Contributor

Great to hear @lmdu! We are slowly moving from xz to zstd due to faster compression/decompression at no compression ratio loss compared to xz.

Just like xz random access, zstd random access seems to be possible as well. I've found these resources:

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

No branches or pull requests

3 participants