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

Errors in reformat-vcf-table.py return exit code 0 #24

Open
stevekm opened this issue Jul 10, 2019 · 2 comments
Open

Errors in reformat-vcf-table.py return exit code 0 #24

stevekm opened this issue Jul 10, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@stevekm
Copy link
Member

stevekm commented Jul 10, 2019

When a error is encountered with the reformat-vcf-table.py script, but its stdout is being piped, the overall exit code of the processes is returned as 0, allowing broken files to pass through the Nextflow pipelines. Example:

reformat-vcf-table.py -c MuTect2 -s "${tumorID}" -i "${tsv_file}" | \
        paste-col.py --header "Sample" -v "${tumorID}"  > output.tsv

If an error is encountered by reformat-vcf-table.py here while it is in the middle of processing the file contents, a partial file will be created in output.tsv and the returned exit code of 0 will allow Nextflow to propagate output.tsv further down the pipeline.

Need to figure out how to ensure that non-zero exit code is returned in these cases.

@stevekm stevekm added the bug Something isn't working label Jul 10, 2019
@stevekm stevekm changed the title Errors in reformat-vcf-table.py leave exit code 0 Errors in reformat-vcf-table.py return exit code 0 Jul 10, 2019
@stevekm
Copy link
Member Author

stevekm commented Sep 5, 2019

So far I have been band-aiding this by including tests on pipeline steps that use these kinds of stdin/stdout Python scripts to check the line count of the output file. Need to develop a better solution to address this.

@stevekm
Copy link
Member Author

stevekm commented Oct 12, 2019

consider addingset -o pipefail to script settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant