-
Notifications
You must be signed in to change notification settings - Fork 355
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
piped commands that fail don't trigger an error in subprocess.check_call #15
Comments
Brent;
I'll update this once I have a chance to work this through. Thanks again. |
maybe this could be implemented by some check_?? decoroator. e.g. for this, it'd be check_bam_ok for other functions, it could be check_file_exists or check_file_non_empty they could all expect a path to a file as the only argument and raise an Exception if the appropriate checks did not pass. |
Brent; |
With a command like this in ngsalign/bwa.py:
if bwa mem fails, the process will continue running and error farther in the pipeline so the bam transaction completes and something later in the pipeline that's expecting a valid BAM files errors. Since this part of the transaction completes, it makes this harder to debug. I'm not sure what is portable, but, in bash, we can have the check_call fail by using:
where we added set -o pipefail at the start.
The text was updated successfully, but these errors were encountered: