-
Notifications
You must be signed in to change notification settings - Fork 67
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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: |
There was a problem hiding this comment.
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.
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 |
62c90a1
to
4f422c0
Compare
Zstd has a nonstandard python api which requires customization. Also allows for multithreading compression.
Zstd has a nonstandard python api which requires customization. Also allows for multithreading
compression.