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

open_or_gzopen -> compressed_open. Add support for zstd. #937

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yesimon
Copy link
Contributor

@yesimon yesimon commented Mar 8, 2019

Zstd has a nonstandard python api which requires customization. Also allows for multithreading
compression.

@yesimon
Copy link
Contributor Author

yesimon commented Mar 8, 2019

Resolves #929 #715

Copy link
Member

@dpark01 dpark01 left a comment

Choose a reason for hiding this comment

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

This is wonderful. I think the only little thing I'd ask is to add a test somewhere. The least-effort place to do this might be in TestIlluminaDir which already has gz, bz2, and lz4 tarballs, and we could just add one more (admittedly though, it's not the most unit-y place to do it).

@@ -397,14 +443,14 @@ def read_tabfile(inFile):
''' Read a tab text file (possibly gzipped) and return contents as an
iterator of arrays.
'''
with open_or_gzopen(inFile, 'rU') as inf:
with compressed_open(inFile, 'rt') as inf:
Copy link
Member

Choose a reason for hiding this comment

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

Since this was originally rU, can we have the new invocation include newline=None as a kwarg? I think this is trying to defend against the incredibly common scenario of users providing SampleSheets created by MS Excel.

@dpark01
Copy link
Member

dpark01 commented Mar 8, 2019

Oh one more thing, edit the description of this PR (or do it in a commit message) to include the magic words "closes (issue x) and closes (issue y)" or "fixes" or "resolves".. simply referencing the issues w/o the magic words won't do it. https://help.github.com/en/articles/closing-issues-using-keywords

Zstd has a nonstandard python api which requires customization. Also allows for multithreading
compression.
dpark01 added a commit to broadinstitute/viral-core that referenced this pull request Nov 7, 2019
 and re-add all the compressors as conda dependencies (instead of relying on apt packages in the docker image) so as to facilitate the re-enabling of the conda package builds
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