-
Notifications
You must be signed in to change notification settings - Fork 6
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
Improvements to file, tempdir, and command handling #41
Improvements to file, tempdir, and command handling #41
Conversation
In matrixes.py: - Compute bigwig paths from bedgraph using os.path functions - Replace 'call("mkdir -p {}")' with 'os.makedirs' - Replace 'call(shell=True)' with 'check_call(shell=False)' - Remove obsolete tmpdir handling code
Thanks, much appreciated, but I have been rewriting the bigwig code to use rtracklayer (from bioconda-bioconductor) so this might be superfluous :/ This isn't your typical bioinformatics package that does not get updated, so before PRs you might want to make an issue first :) |
Thanks for this, but in 0.1.19 I've improved the handling of bigwigs. Furthermore, your tests failed for |
That's ok, I'm a heavy Bioconductor user, so I support that solution. But I see that your changes also removed the option for outputting single bigwigs for the sum of all inputs and all treatments. Is there a reason for that? I've been using that option in my workflow, and I'd like to know if there's a reason I shouldn't be using it. |
Sorry, I had no idea. I removed it because I thought I wasn't going to use Since the new code is much shorter and faster, I'll find a way to create On Mon, Oct 3, 2016 at 8:25 PM, Ryan C. Thompson notifications@github.com
|
|
I've made a number of improvements to file handling, tempdir handling, and command handling. In the files I edited:
tempfile
module.subprocess.check_call
is used instead ofsubprocess.call
, so that if a command fails, the program will abort.os.path
functions instead of string replacementos.makedirs
is used in place ofcall("mkdir -p")
.My original motivation for making these fixes was noticing that every invocation of epic used the same temporary directory for bedgraph files, which meant that if multiple instances of the script were running at once, it was possible that they could overwrite each others' temporary files, causing bigwig files to get associated with the wrong samples. This should no longer be an issue, since each invoocation creates its own randomly-named temporary directory.