Conversation
|
@GWMcElfresh, doesnt it already gzip them? not here, but downstream? |
|
it's sorta moot here, but are you sure we dont need to explicitly close the file connection? google suggests yes: |
|
My understanding is that because we're not explicitly opening the connection with |
OK, I dont really know. It's possible you beat gemini on this one |
I don't think it gzips them - it's just named .gz. Or if it does gzip them at some point, the files are at least not gzipped when they're written. See this: Further - nano (vim etc gunzip on the fly) on the original file: |
|
OK, you are correct. I will fix that; however, I want to also make something to retroactively gzip existing files. I googled the write.table(gzipfile()) pattern, and I cannot find anything that says this will automatically handle closing the connection. Do you see something different? |
|
This is apparently complicated (i.e. depends on the function used to write) - I'll test with delta-ing showConnections() calls in the morning. Worst case scenario is explicitly define the connection and close()ing it. |
|
It's certainly worth knowing if there's something better (seems like switching from base R to tidyr or something would do that); however, this is a base R solution that should work: |
|
thanks! I'll see if I can reproduce that linked Rdiscvr issue whenever the retrospective gzip happens too. I think it was probably auto-detecting the file as text, and the httr parsing issue probably doesn't happen on non-text files. |


Rationale
Currently, when saving the metadata to disk, the files aren't gzipped, although I believe this is the intention given the file name here:
DiscvrLabKeyModules/singlecell/resources/chunks/Functions.R
Line 84 in 35255c6
Related Pull Requests
entertainingly, this is likely why the metadata files are probably large here: bimberlabinternal/Rdiscvr#68 but nothing direct.
Changes
single line change here to zip the file, which should automatically clean up the connection as well.
DiscvrLabKeyModules/singlecell/resources/chunks/Functions.R
Line 110 in 35255c6