Service notice: Several of our team members are on vacation so service will be slow through at least July 13th, possibly longer depending on how much backlog accumulates during that time. This means that for a while it may take us more time than usual to answer your questions. Thank you for your patience.

Exit codes in GATK 4.0

RMuletRMulet BarcelonaMember


In my BASH scripts I often use "$?" to monitor the exit status of a process and normally stop if there is an error. However, I am using the latest version of GATK ( and some tools return 0 exit status even if they fail. Instead, they display the following message to STDOUT:

Tool returned:

Though inconvenient for error handling in BASH scripts, this might be an intended behaviour, but not all tools exhibit it. To mention a few, MarkDuplicates, CollectMultipleMetrics, CollectGcBiasMetrics always have a 0 exit status, whereas VariantsToTable or CountVariants do return 1 if they encounter an error.

A similar issue had been reported in the past for previous versions of GATK (

Best regards,


Issue · Github
by Sheila

Issue Number
Last Updated
Closed By

Best Answers


Sign In or Register to comment.