nrlab-CRUK / TAP

Trim and Align Pipeline
0 stars 0 forks source link

Picard tasks failing due to memory aren't being retried #4

Open rich7409 opened 1 year ago

rich7409 commented 1 year ago

The Picard tasks are dying with OutOfMemoryError but are not being retried when Nextflow is set up to do just that.

rich7409 commented 1 year ago

Turns out that when Picard dies the exit code is 1 (general failure). That is not helpful in this case. We can't change Picard, but I've added a little Groovy script to scan the .command.log file written as the process runs looking for java.lang.OutOfMemoryError. If it finds this text in the file, it changes its own exit code to 104 indicating a retry is possible. Otherwise it exits with the same exit code as the Picard process (passed in as a parameter).